How can I pass chromeOptions with Selenium 4 ltOptions on LambdaTest?
Hi Jacqueline,
You can passing chromeOptions with Selenium 4 ltOptions like below:
capabilities = {
'LT:Options' : {
"user" : username,
"accessKey" : accessToken,
"build" : "your build name",
"name" : "your test name",
"platformName" : "Windows 11",
"goog:chromeOptions":{
"args":["--use-fake-device-for-media-stream",
"--use-fake-ui-for-media-stream"
]
}
},
"browserName" : "Chrome",
"browserVersion" : "103.0",
}
url = "https://" + username + ":" + accessToken + "@hub.lambdatest.com/wd/hub"
driver = webdriver.Remote(command_executor = url, desired_capabilities = capabilities)