Skip to main content

SIM Enabled devices

  • This feature is available only under Desktop and Mobile Pro, and Enterprise Pro plans. For more details, check out our pricing page.
  • Currently, eSIMs are supported on iPhone 13 and iPhone 14 devices only.

Introduction

Browserstack 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 OS Version
Samsung Galaxy S23 Ultra Android 13
Samsung Galaxy S23 Android 13
Samsung Galaxy S22 Plus Android 12
Samsung Galaxy S22 Ultra Android 12
Samsung Galaxy S22 Android 12
Samsung Galaxy S21 Android 12
Google Pixel 7 Android 13
Google Pixel 6 Pro Android 13
Google Pixel 6 Android 12
Supported Devices OS Version
iPhone 14 Pro iOS 16
iPhone 14 iOS 16
iPhone 13 Pro Max iOS 15
iPhone 13 Pro iOS 15
iPhone 13 iOS 17
iPhone 13 iOS 16
iPhone 13 iOS 15
iPhone 13 Mini iOS 15
iPhone 12 Pro Max iOS 14
iPhone 12 Pro iOS 14
iPhone 12 iOS 14
iPhone 12 Mini iOS 14
iPhone 11 Pro iOS 15
iPhone 11 Pro iOS 14
iPhone 11 Pro iOS 13
iPhone 11 iOS 15
iPhone 11 iOS 14
iPhone 11 iOS 13
iPhone XS iOS 15

Obtain a SIM enabled device

Use the following capability in your test scripts to obtain a device with SIM.

To enable sim options for Android devices use the following code examples:

If you are using BrowserStack SDK, you can set the following capability within the browserstack.yml file:

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
Set the configuration esim to true to enable esim option for the device.

Example:

browserstack.yml
Copy icon Copy snippet

BrowserStack SDK is a plug-n-play solution that takes care of all the integration steps for you. Using the BrowserStack SDK is the recommended integration method for your project. To know more, visit the SDK core concepts page.

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
Set the configuration esim to true to enable esim option for the device.
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 = {
	'bstack:options' : {
        "platformName" : "android",
		"platformVersion" : "12.0",
		"deviceName" : "Google Pixel 6",
		'enableSim' : true,
        'simOptions' : { 
            "region" : "India",
        }
	}
}
capabilities = {
	'bstack:options' => {
		"osVersion" => "12.0",
		"deviceName" => "Google Pixel 6",
		'enableSim' : true,
        'simOptions' : { 
            "region" : "India",
        }
	}
}
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
Set the configuration esim to true to enable esim option for the device.
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"}

To enable sim options for iOS devices use the following code examples:

If you are using BrowserStack SDK, you can set the following capability within the browserstack.yml file:

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
Set the configuration esim to true to enable esim option for the device.

Example:

browserstack.yml
Copy icon Copy snippet

BrowserStack SDK is a plug-n-play solution that takes care of all the integration steps for you. Using the BrowserStack SDK is the recommended integration method for your project. To know more, visit the SDK core concepts page.

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
Set the configuration esim to true to enable esim option for the device.
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", "14.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", "14.0");
capabilities.AddAdditionalCapability("appium:deviceName", "iPhone 14");

desired_cap = {
	'bstack:options': {
		"platformName" : "ios",
		"platformVersion" : "16.0",
		"deviceName" : "iPhone 14",
		"enableSim" : "true",
		"simOptions" : { 
			"region" : "USA",
			"esim" : "true"
		}
	}
}
capabilities = {
	'bstack:options' : {
		"platformName": "ios",
		"platformVersion": "16.0",
		"deviceName": "iPhone 14",
		"enableSim" : "true",
		"simOptions" : { 
			"region" : "USA",
			"esim"  : "true"
		}
	}
}
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
Set the configuration esim to true to enable esim option for the device.
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:

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“ : { “Phone Number“:“XXXXX”, “Region“:”USA”, "esim":true }
}

Check this page for a list of various JavaScript Executors that BrowserStack offers.

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
Download Copy