SIM Enabled devices
- Access to SIM enabled devices is currently in Private Beta. Reach out to our Support team to get enrolled into the Beta program.
- Currently, eSIMs are supported on iPhone 13 and iPhone 14 devices only.
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
- How to obtain a SIM enabled device
- How to retrieve SIM properties of the allocated device
Supported OS and devices
Supported Devices | iOS Version |
---|---|
iPhone XS and above | iOS 14 and above |
Samsung Galaxy S21 | Android 12 |
Samsung Galaxy S22 | Android 12 |
Samsung Galaxy S22 Plus | Android 12 |
Samsung Galaxy S22 Ultra | Android 12 |
Google Pixel 6 | Android 12 |
Google Pixel 7 | Android 13 |
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 the below mentioned country name to obtain a SIM device for that country. Android: India , USA iOS: India , USA , Ireland , Germany Set the configuration esim to true to enable esim option for the device. |
Capability | Description |
---|---|
browserstack.enableSim |
Set this capability to "true" to obtain a device with SIM. |
browserstack.simOptions |
Set the configuration “region” to the below mentioned country name to obtain a SIM device for that country. Android: India , USA iOS: India , USA , Ireland , Germany Set the configuration esim to true to enable esim option for the device. |
Example:
DesiredCapabilities capabilities = new DesiredCapabilities();
HashMap<String, Object> browserstackOptions = new HashMap<String, Object>();
browserstackOptions.put("enableSim", "true");
HashMap<String, String> simOptions = new HashMap<String, String>();
simOptions.put("region","USA");
browserstackOptions.put("simOptions", simOptions);
capabilities.setCapability("bstack:options", browserstackOptions);
capabilities.setCapability("platformName", "android");
capabilities.setCapability("platformVersion", "12.0");
capabilities.setCapability("deviceName", "Google Pixel 6");
var capabilities = {
"platformName" : "android",
"appium:platformVersion" : "12.0",
"appium:deviceName" : "Google Pixel 6",
'bstack:options' : {
"enableSim" : "true",
"simOptions" : {
"region" : "USA",
}
}
}
AppiumOptions capabilities = new AppiumOptions();
capabilities.AddAdditionalCapability("osVersion", "12.0");
capabilities.AddAdditionalCapability("deviceName", "Google Pixel 6");
Dictionary<string, object> browserstackOptions = new Dictionary<string, object>();
browserstackOptions.Add("enableSim","true");
Dictionary<string, string> simOptions = new Dictionary<string, string>();
simOptions.Add("region","USA");
browserstackOptions.Add("simOptions",simOptions);
capabilities.AddAdditionalCapability("bstack:options", browserstackOptions);
capabilities.AddAdditionalCapability("platformName", "android");
capabilities.AddAdditionalCapability("platformVersion", "12.0");
capabilities.AddAdditionalCapability("appium:deviceName", "Google Pixel 6");
desired_cap = {
"platformName" : "android",
"platformVersion" : "12.0",
"deviceName" : "Google Pixel 6",
"bstack:options" : {
"enableSim" : "true",
"simOptions" : {
"region" : "USA",
}
}
}
capabilities = {
"platformName"=> "android",
"platformVersion" => "12.0",
"deviceName" => "Google Pixel 6",
"bstack:options" => {
"enableSim" => "true",
"simOptions" => {
"region" => "USA",
}
}
}
DesiredCapabilities desiredcapabilities = new DesiredCapabilities();
desiredCapabilities.setCapability("os_version", "12.0");
desiredCapabilities.setCapability("device", "Google Pixel 6");
desiredCapabilities.setCapability("browserstack.enableSim","true");
HashMap<String, String> simOptions = new HashMap<String, String>();
simOptions.put("region","USA");
desiredCapabilities.setCapability("browserstack.simOptions", simOptions);
var capabilities = {
"os_version" : "12.0",
"device" : "Google Pixel 6",
"browserstack.enableSim" : "true",
"browserstack.simOptions" : {
"region" : "USA"
}
}
AppiumOptions capabilities = new AppiumOptions();
capabilities.AddAdditionalCapability("os_version", "12.0");
capabilities.AddAdditionalCapability("device", "Google Pixel 6");
capabilities.AddAdditionalCapability("browserstack.enableSim", "true");
Dictionary<string, string> simOptions = new Dictionary<string, string>();
simOptions.Add("region", "USA");
capabilities.AddAdditionalCapability("browserstack.simOptions", simOptions);
desired_cap = {
"os_version" : "12.0",
"device" : "Google Pixel 6",
"browserstack.enableSim" : "true"
"browserstack.simOptions" : {
"region" : "USA"
}
}
caps = Selenium::WebDriver::Remote::Capabilities.new
caps["os_version"] = "12.0"
caps["device"] = "Google Pixel 6"
caps["browserstack.enableSim"] = "true"
caps["browserstack.simOptions"] = {"region" => "USA"}
DesiredCapabilities capabilities = new DesiredCapabilities();
HashMap<String, Object> browserstackOptions = new HashMap<String, Object>();
browserstackOptions.put("enableSim", "true");
HashMap<String, String> simOptions = new HashMap<String, String>();
simOptions.put("region","USA");
simOptions.put("esim","true");
browserstackOptions.put("simOptions", simOptions);
capabilities.setCapability("bstack:options", browserstackOptions);
capabilities.setCapability("platformName", "ios");
capabilities.setCapability("platformVersion", "16.0");
capabilities.setCapability("deviceName", "iPhone 14");
var capabilities = {
"platformName" : "ios",
"appium:platformVersion" : "16.0",
"appium:deviceName" : "iPhone 14",
'bstack:options' : {
"enableSim" : "true",
"simOptions" : {
"region" : "USA",
"esim" : "true"
}
}
}
AppiumOptions capabilities = new AppiumOptions();
Dictionary<string, object> browserstackOptions = new Dictionary<string, object>();
browserstackOptions.Add("enableSim","true");
Dictionary<string, string> simOptions = new Dictionary<string, string>();
simOptions.Add("region","USA");
simOptions.Add("esim","true");
browserstackOptions.Add("simOptions",simOptions);
capabilities.AddAdditionalCapability("bstack:options", browserstackOptions);
capabilities.AddAdditionalCapability("platformName", "ios");
capabilities.AddAdditionalCapability("platformVersion", "16.0");
capabilities.AddAdditionalCapability("appium:deviceName", "iPhone 14");
desired_cap = {
"platformName" : "ios",
"platformVersion" : "16.0",
"deviceName" : "iPhone 14",
'bstack:options' : {
"enableSim" : "true",
"simOptions" : {
"region" : "USA",
"esim" : "true"
}
}
}
capabilities = {
"platformName"=> "ios",
"platformVersion"=> "16.0",
"deviceName"=> "iPhone 14",
'bstack:options' => {
"enableSim" => "true",
"simOptions" => {
"region" => "USA",
"esim" => "true"
}
}
}
DesiredCapabilities desiredcapabilities = new DesiredCapabilities();
desiredCapabilities.setCapability("os_version", "16.0");
desiredCapabilities.setCapability("device", "iPhone 14");
desiredCapabilities.setCapability("browserstack.enableSim","true");
HashMap<String, String> simOptions = new HashMap<String, String>();
simOptions.put("region","USA");
simOptions.put("esim","true");
desiredCapabilities.setCapability("browserstack.simOptions", simOptions);
var capabilities = {
"os_version" : "16.0",
"device" : "iPhone 14",
"browserstack.enableSim" : "true",
"browserstack.simOptions" : {
"region" : "USA",
"esim" : "true"
}
}
AppiumOptions capabilities = new AppiumOptions();
capabilities.AddAdditionalCapability("os_version", "16.0");
capabilities.AddAdditionalCapability("device", "iPhone 14");
capabilities.AddAdditionalCapability("browserstack.enableSim", "true");
Dictionary<string, string> simOptions = new Dictionary<string, string>();
simOptions.Add("region", "USA");
simOptions.Add("esim", "true");
capabilities.AddAdditionalCapability("browserstack.simOptions", simOptions);
desired_cap = {
"os_version" : "16.0",
"device" : "iPhone 14",
"browserstack.enableSim" : "true"
"browserstack.simOptions" : {
"region" : "USA",
"esim" : "true"
}
}
caps = Selenium::WebDriver::Remote::Capabilities.new
caps["os_version"] = "16.0"
caps["device"] = "iPhone 14"
caps["browserstack.enableSim"] = "true"
caps["browserstack.simOptions"] = {"region" => "USA", "esim" => "true"}
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:
JavascriptExecutor jse = (JavascriptExecutor)driver;
jse.executeScript("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“ : { “Phone Number“:“XXXXX”, “Region“:”USA”, "esim":true }
}
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
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!