Page tree
Skip to end of metadata
Go to start of metadata

In order to start testing on a browser you need to specify the type of browser you want to test on.

NamePossible Values
browserName
For iOS: Safari
For Android: Browser / Chromium / Chrome

Following are the code samples in difference languages to use the capability.

Set Experitest Url

Please make sure you replace <EXPERITEST_URL> with appropriate URL in the sample code below.

Java
DesiredCapabilities dc = new DesiredCapabilities();
dc.setBrowserName(MobileBrowserType.CHROME);
driver = new AndroidDriver('<EXPERITEST_URL>', dc);
driver.get("seetest.io");

Additional way to set the browser (Java)

dc.setCapability(MobileCapabilityType.BROWSER_NAME, MobileBrowserType.CHROME);
Python
dc = {}
self.dc['browserName'] = 'safari'
self.driver = webdriver.Remote('<EXPERITEST_URL>', self.dc)
self.driver.get('seetest.io')
C Sharp
DesiredCapabilities dc = new DesiredCapabilities();
dc.SetCapability(MobileCapabilityType.BrowserName, MobileBrowserType.Chrome);
driver = new AndroidDriver('<EXPERITEST_URL>', dc);
driver.Navigate().GoToUrl("seetest.io");
Ruby
desired_caps = {
        caps: {
            browserName: 'safari',
        },
        appium_lib: {
            server_url: '<EXPERITEST_URL>',
        }
    }
    @driver = Appium::Driver.new(desired_caps, true).start_driver

@driver.get('seetest.io')


  • No labels