New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support local safaridriver from Safari 10.0 #345
Comments
@OndraM Can you please let me know how I can run acceptance suite in safari browser in Windows 8.1. Below is my acceptance.yml file configuration. I tried --env safari and --env firefox by mentioning the env in acceptance suite. yml also but no luck. it's giving me error **_[Codeception\Exception\ConnectionException] Please make sure that Selenium Server or PhantomJS is running._** But I do have selenium jar or phantom running aside already with below command Acceprance.suite.yml
but it is not working. If I replace the browser name with Chrome (and run executable) or firefox then I was able to run my suite. Please advise. (By the way, I do have safari installed manually in my machine - V5.1.7) |
Hi @OndraM, I write out my code in a php file and run it with php myfilename.php and BrowserStack shows me my results. However, safari is killing me. I have the following line (from browser stack): Later in the code I have: $web_driver->findElement(WebDriverBy::id("book-now-btn"))->click(); Safari is the only browser giving me this error: Facebook\WebDriver\Exception\ElementNotVisibleException: An element command could not be completed because the element is not visible on the page. Any help or ideas would be amazing. The test connects and shows a successful load of the page I'm testing, but that first find element just kills it (and I double checked on a mac, that is the right id). Thanks in advance! |
@ComradeAnton Hi, could you please provide URL of the page? Also try waiting for the element, as it may not yet be rendered in the moment you try to access it, see https://github.com/facebook/php-webdriver/wiki/HowTo-Wait . |
Hi @OndraM, I know you do volunteer support here so ty for getting back so quickly. I am trying to automate the selection of the "Check rates" dates picker on the top right of the 1hotels.com page. I am trying to make the code click on July 15th, then on July 19th. This works in all browsers except for Safari (I have only tried El Capitan and Sierra). Here is my test code:
What I don't understand is that while I was typing this up, it started working. I'm honestly not sure what was causing the issue. Could it somehow be based on how quickly the click command gets sent to the server vs how long it takes the date picker to open? Thanks! UPDATE: I just tested Sierra and El Capitan again and it seems that Sierra is the cause of issues. El Capitan recognizes all the commands I send it, while Sierra doesn't recognize UPDATE 2: Sierra Safari 10.1 is now giving a "A request to use a window could not be satisfied because the window could not be found" error on the |
UPDATE 3: After a lot of googling and talking to BrowserStack support it seems that Safari 10.1 simply doesn't support certain actions at the moment. BroweserStack support told me the following: 'technologyPreview' => true }
Hopefully this helps anyone else looking for a similar fix. I haven't made the above fix work yet, but when I do, I will update with my findings. |
Update 4:
As for the issue with Safari being difficult, @OndraM was correct in setting a wait on the elements that are causing problems. However, Browserstack seems to randomly have issues with finding elements Im working with. I've had all my tests succeed for one build, and then fail in various spots via timeout in another. Anyway, hope this helps! |
@ComradeAnton Nice findings, thanks, it sure may help others! |
Safari could be started through Selenium Server as remote WebDriver.
Since Safari 10.0 (see blogpost), however, it could also be started also locally, using binary "safaridriver" (as chrome, opera and geckodriver - see also #344, #342). This is already supported by other selenium language bindings, so we could support it as well.
It would require creating new classes SafariDriver, SafariDriverService and SafariOptions - see java bindings as an example.
The text was updated successfully, but these errors were encountered: