3

I made a script to automate front-end testing with selenium and everything worked great with the Chrome WebDriver. However now I try to test my suites cases on other browsers and particularly in the safari webdriver and it timeouts while trying to find and element.

Here is my testing config :

"browser" => "Safari",
"browser_version" => "10.0",
"os" => "OS X",
"os_version" => "Sierra",
"resolution" => "1024x768",

The command which timeouts is :

$this->driver->wait(15, 300)>until(
WebDriverExpectedCondition::visibilityOfElementLocated(
WebDriverBy::id("newDivOnThePageNewPage")
));

It gives me the following error message:

An element could not be located on the page using the given search parameters. (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 4.97 seconds

Also, sometimes url asked in the get command is just not loaded and the browser is just popping with an empty page and nothing in the url bar.

Can you guys help me with this ?

Thanks in advance !

Djagu
  • 163
  • 1
  • 12
  • First check manually if the selector is found, after make sure the page is loaded, after wait for element and after that check if is visible.Check if anything different between safari and chrome profiles if you have separate profiles.Try this local also, check if you need any authentication like oauth in url. – lauda Oct 26 '16 at 10:18
  • I submit a form than I am waiting for the visibility of a specific element on the new page, so the page is loadind, juste the safari webdriver does not found the element. – Djagu Oct 26 '16 at 12:27
  • are you taking a screenshot of the error on failure? this might help determine as it may the element is not visible in the viewport. – John Joseph Nov 08 '16 at 11:26
  • I am doing test with BrowserStack so I have the full video. The element is visible, just it is not clicking on it and saying the element can't be found. – Djagu Nov 09 '16 at 10:41

0 Answers0