selenium icon indicating copy to clipboard operation
selenium copied to clipboard

Problem with Safari driver - timeouts

Open alexr1978 opened this issue 10 years ago • 6 comments

We always get timeouts when we try to login this site: automation.playbuzz.com here are the details: http://screencast.com/t/BxTwYjWH2xuD

Thanks!

alexr1978 avatar Dec 29 '15 21:12 alexr1978

what version of Safari? what version of Selenium? in addition, what happens if you would use selenium to find and click your button instead of using JS?

5hawnknight avatar Jan 18 '16 20:01 5hawnknight

5hawnknight , Thank you for your answer.

  1. Safari - it happened for versions 6.0, 7.0, 8.0 and 9.0
  2. Selenium - version 2.48
  3. When I click instead of using Javascript, the behavior is inconsistent. Sometimes I get the same timeout and sometimes I get the error message that Safari cannot open the page because Safari can't establish a secure connection.

safari

alexr1978 avatar Jan 19 '16 15:01 alexr1978

By the way, I'm not trying to go to "localhost"

alexr1978 avatar Jan 19 '16 15:01 alexr1978

in addition, could you share your code example?

5hawnknight avatar Jan 19 '16 16:01 5hawnknight

Sure, WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(60)); driver.Url = "http://alpha.playbuzz.com/userlogin"; wait.Until(ExpectedConditions.ElementIsVisible(By.Id("elogin_email_field"))); driver.FindElementById("elogin_email_field").SendKeys("[email protected]"); driver.FindElementById("elogin_pass_field").SendKeys("playbuzz1"); Thread.Sleep(3000); string command = "document.getElementsByClassName('elogin_submit_button')[0].click()"; driver.ExecuteScript(command); Thread.Sleep(3000); wait.Until(ExpectedConditions.InvisibilityOfElementLocated(By.Id("login_popup_cover"))); wait.Until(ExpectedConditions.ElementIsVisible(By.ClassName("create_button_wrapper")));

driver is instance of RemoteWebDriver

alexr1978 avatar Jan 19 '16 16:01 alexr1978

With the release of Safari 10, Apple now offers official support WebDriver. Because of this, the Selenium project no supports the legacy implementation from 2.x.

Users are advised to switch to Apple's driver and file bugs at https://bugreport.apple.com/

We are no longer tracking issues for Selenium's SafariDriver and thus closing this issue.

lukeis avatar Sep 23 '16 20:09 lukeis