Browser Setup
In order to start testing on a browser you need to specify the type of browser you want to test on.
Name | Possible Values |
---|---|
<br/><br/>browserName<br/><br/> | <br/><br/>For iOS: Safari<br/><br/> <br/><br/>For Android: Browser / Chromium / Chrome<br/><br/> |
Following are the code samples in difference languages to use the capability.
info
Replace <server> with the appropriate URL.
- Public Continuous Testing Cloud - https://cloud.seetest.io/wd/hub/.
- Dedicated Continuous Testing Cloud environment - Your own domain. For example: https://company.experitest.com/wd/hub/
- On-premises Continuous Testing Cloud environment - Your designated URL. For example: https://company.com/wd/hub
Java
DesiredCapabilities dc = new DesiredCapabilities();
dc.setBrowserName(MobileBrowserType.CHROME);
driver = new AndroidDriver('<server>', dc);
driver.get("seetest.io");
info
Additional way to set the browser (Java)
dc.setCapability(MobileCapabilityType.BROWSER_NAME, MobileBrowserType.CHROME);
Python
dc = {}
self.dc['browserName'] = 'safari'
self.driver = webdriver.Remote('<server>', self.dc)
self.driver.get('seetest.io')
C Sharp
DesiredCapabilities dc = new DesiredCapabilities();
dc.SetCapability(MobileCapabilityType.BrowserName, MobileBrowserType.Chrome);
driver = new AndroidDriver('<server>', dc);
driver.Navigate().GoToUrl("seetest.io");
Ruby
desired_caps = {
caps: {
browserName: 'safari',
},
appium_lib: {
server_url: '<server>',
}
}
@driver = Appium::Driver.new(desired_caps, true).start_driver
@driver.get('seetest.io')