Open rohitsh1691 opened 1 year ago
This looks like a Selenium issue, not a Serenity issue.
Grid is working with the selenium sample code for safari on local.
In that case your best option would be to compare the code that is working for Safari on your local grid, and compare with the Serenity code, and propose a PR with the appropriate fixes.
@wakaleo with the serenity versions 3.0.0 and above, in order to run the test for safari node, we have to explicitly add the capabilities in serenity.conf. otherwise test is going to queue and eventually timed out.
https://github.com/SeleniumHQ/selenium/issues/11390 as mentioned in this, tried with below config and test worked.
serenity {
take.screenshots = FOR_FAILURES
}
webdriver {
driver = remote
remote {
url=http://localhost:4444/
driver=safari
}
capabilities {
browserName = "safari"
}
}
why it is not working with the run configuration like -Denvironment=envt -Dwebdriver.driver=remote -Dwebdriver.remote.driver=safari
Attaching log from node . 02062023-execution_new.txt
Tried with 3.6.7 as well
Try to get it working with plain Selenium, then look at the source code of the SafariDriverProvider class, to see if there is anything obvious. I never use Safari myself so this probably isn't something that will get much attention in the immediate future unless it is part of a support request or a community contribution.
@wakaleo sure.will test with selenium version. would you please provide the path to safaridriver provider class as well.
@wakaleo I was successfully able to run with selenium 4 for safari browser. selenium-java 4.6.0 version. Looks like now we have to see why Serenity is having trouble reaching Safari node.
Hi,
The remote driver is not working for the safari browser as working fine with the chrome browser. During a session with the grid, hub shows empty capabilities like {} and chrome shows all capabilities.
Selenium grid 4.7.2 is started locally in standalone mode. Serenity-BDD version 3.5.1 Selenium Grid version - 4.7.2 Safari version - 16.2
The selenium starter sample code is also working for the safari with Selenium grid 4.7.2 and shows all capabilities of the safari.
Serenity properties file: webdriver.driver=remote webdriver.remote.driver=safari/chrome webdriver.remote.os=MAC webdriver.remote.url=http://localhost:4444/wd/hub
There is a related open issue for selenium grid - https://github.com/SeleniumHQ/selenium/issues/11390