I'm trying to do something very easy with BrowserStack using selenium and python 3. Let's say this is my capability:
caps =
[
{
'os_version': '10',
'os': 'Windows',
'browser': 'chrome',
'browser_version': '96.0',
'name': 'Parallel Test1', # test name
'build': 'browserstack-build-1' # Your tests will be organized within this build
}
]
Now, say all I want to do is to visit google. Here is the code:
driver = webdriver.Remote(command_executor='https://myBrowserStackCode',desired_capabilities=caps[1])
driver.get("https://www.google.com")
driver.quit()
It does work, but desired_capabilities
has been deprecated, and I get asked to 'pass in an Options object with options kwarg'. I don't know what that means. Should I go with something
like this?
options=webdriver.ChromeOptions()
How am I supposed to pass caps
then? What if I had more than one cap in the caps
, each with different browsers?