Skip to main content

SIM Enabled devices

Note:
  • Access to SIM enabled devices is currently in Private Beta. Reach out to our Support team to get enrolled into the Beta program.
  • Currently, only iPhone devices with iOS 13 version and above are supported with SIMs.

Introduction

Browserstack App Automate provides access to SIM-equipped devices and enables you to test SIM-related use cases such as:

  • Receiving SMS on the allocated device during your test session
  • Composing and sending SMS from the allocated device during your test session

In this guide, you will learn about:

Supported OS and devices

Supported Devices iOS Version
iPhone XS and above 13 and above

Obtain a SIM enabled device

Use the enableSim capability for W3C protocol and browserstack.enableSim capability for JSON wire protocol in your test scripts to obtain a device with SIM.

Capability Description
enableSim Set this capability to "true" to to obtain a device with SIM
simOptions Set the configuration region to a country name to obtain a device with SIM from that country
Allowed values: India, USA, Ireland, Germany
Capability Description
browserstack.enableSim Set this capability to "true" to obtain a device with SIM
browserstack.simOptions Set the configuration region to a country name to obtain a device with SIM from that country
Allowed values: India, USA, Ireland, Germany

Example:

MutableCapabilities capabilities = new MutableCapabilities();
capabilities.setCapability("platformName", "ios");
capabilities.setCapability("platformVersion", "15");
capabilities.setCapability("deviceName", "iPhone 13 Pro");
HashMap<String, Object> browserstackOptions = new HashMap<String, Object>();
browserstackOptions.put("enableSim", "true");
HashMap<String, String> simOptions = new HashMap<String, String>();
simOptions.put("region","US");
browserstackOptions.put("simOptions", simOptions);
capabilities.setCapability("bstack:options", browserstackOptions);
var capabilities = {
	"platformName" : "ios",
	"appium:platformVersion" : "15",
	"appium:deviceName" : "iPhone 13 Pro",
	'bstack:options' : {
		"enableSim" : "true",
		"simOptions" : { 
 			"region" : "US"
		}
	}
}
SafariOptions capabilities = new SafariOptions();
capabilities.AddAdditionalCapability("platformName", "ios");
capabilities.AddAdditionalCapability("platformVersion", "15");
capabilities.AddAdditionalCapability("deviceName", "iPhone 13 Pro");
Dictionary<string, object> browserstackOptions = new Dictionary<string, object>();
browserstackOptions.Add("enableSim","true");
Dictionary<string, string> simOptions = new Dictionary<string, string>();
simOptions.Add("region","US");
browserstackOptions.Add("simOptions",simOptions);
capabilities.AddAdditionalCapability("bstack:options", browserstackOptions);
# Use Appium-Python-Client v0.27 or above
desired_cap = {
	"platformName" : "ios",
	"platformVersion" : "15",
	"deviceName" : "iPhone 13 Pro",
	'bstack:options' : {
		"enableSim" : "true",
		"simOptions" : { 
 			"region" : "US"
		}
	}
}
capabilities = {
	"platformName" => "ios",
	"platformVersion" => "15",
	"deviceName" => "iPhone 13 Pro",
	'bstack:options' => {
		"enableSim" => "true",
		"simOptions" : { 
 			"region" : "US"
		}
	}
}
DesiredCapabilities desiredcapabilities = new DesiredCapabilities();
desiredCapabilities.setCapability("os_version", "15");
desiredCapabilities.setCapability("device", "iPhone 13 Pro");
desiredCapabilities.setCapability("browserstack.enableSim","true");
HashMap<String, String> simOptions = new HashMap<String, String>();
simOptions.put("region","US");
desiredCapabilities.setCapability("browserstack.simOptions", simOptions);
var capabilities = {
	"os_version" : "15",
	"device" : "iPhone 13 Pro",
	"browserstack.enableSim" : "true",
	"browserstack.simOptions" : { 
 		"region" : "US"
	}
}
SafariOptions capabilities = new SafariOptions();
capabilities.AddAdditionalCapability("os_version", "15");
capabilities.AddAdditionalCapability("device", "iPhone 13 Pro");
capabilities.AddAdditionalCapability("browserstack.enableSim", "true");
Dictionary<string, string> simOptions = new Dictionary<string, string>();
simOptions.Add("region", "US");
capabilities.AddAdditionalCapability("browserstack.simOptions", simOptions);
desired_cap = {
	"os_version" : "15",
	"device" : "iPhone 13 Pro",
	"browserstack.enableSim" : "true"
	"browserstack.simOptions" : { 
 		"region" : "US"
	}
}
capabilities = {
	"os_version" => "15",
	"device" => "iPhone 13 Pro",
	"browserstack.enableSim" => "true",
	"browserstack.simOptions" : { 
 			"region" : "US"
    }
}

Retrieve SIM properties of the allocated device

Use the following executor command in your test scripts to retrieve SIM properties of the allocated device such as the phone number and region during session run time:

driver.execute_script("browserstack_executor:{\"action\": \"deviceInfo\", \"arguments\" : \"deviceProperties\" : ["simOptions"]})
await driver.execute("browserstack_executor: {\"action\": \"deviceInfo\", \"arguments\" : \"deviceProperties\" : ["simOptions"]})
((IJavaScriptExecutor)driver).ExecuteScript("browserstack_executor: {\"action\": \"deviceInfo\", \"arguments\" : \"deviceProperties\" : ["simOptions"]});
driver.execute_script("browserstack_executor: {\"action\": \"deviceInfo\", \"arguments\" : \"deviceProperties\" : ["simOptions"]})
driver.execute_script("browserstack_executor: {\"action\": \"deviceInfo\", \"arguments\" : \"deviceProperties\" : ["simOptions"]})

Sample response:

{
    “simOptions“ : { “region“:”US”, “phoneNumber“: “XXXXX”}
}

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked






Thank you for your valuable feedback

Is this page helping you?

Yes
No

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked






Thank you for your valuable feedback!

Talk to an Expert
Talk to an Expert