-
-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
Selenium WebDriver with MacOS Sierra 10.12 doesn’t work methods with waiting for condition, like waitForElement… and waitForElementNot... #2824
Comments
Have reproduced the issue. |
I'm unable to reproduce this issue using python. It may be an issue in the PHP bindings you are using.
Please provide a complete reproducible script (Ideally in one of the language's the Selenium project supports - Java, .NET, ruby, python, javascript). To help identify where the issue may lie. We can reopen this issue when that is provided |
Reproduced the issue: The method that brings the problem is taken from http://www.obeythetestinggoat.com/
The waitFor is a simple while loop with sleep for 0.2 seconds. The same code worked flawlessly under OSX El Capitan. |
The problem fix by change etc/hosts file, like: 127.0.0.1 localhost Sakharov-MacBook-Pro.local |
sakharovmaksim could you provide some more info? Did not catch that. |
@sakharovmaksim's solution fixed the problem for me. To be honest I have no idea why the fix works but adding your hostname to end of local 1. execute
|
Perhaps, Mac OS 10.12 has a problem with DNS... |
@everyone. Thank you so much for this. My selenium tests were running really slow. Once I followed what @sakharovmaksim did it is running fast like expected. Thank you so much again. |
Hi @sakharovmaksim , I did the changes you mentioned but still I get error: and can't run my tests locally. I am using Selenium with Ruby. Do you have any idea? |
Hi @payman-salimi , b. Change the default encoding. In your .bashrc add: c. Disable install encoding on startup, if you use MacOS Terminal, like in my screenshot screenshot d. Restart Terminal I don’t know what is wrong in Chrome 54 and ChromeDriver, but it resolve this bug... |
Thanks @sakharovmaksim, you are awesome. it actually solved my problem. it was really big help. Many thanks |
Same problem occurred after update to Sierra 10.12.1, but @sakharovmaksim resolution helped me, thank you. |
I tried the solution provided by @sakharovmaksim but still scripts are failing for me due to WebDriverWait. Moreover, Mouse hovering is not working for macOS Sierra 10.12.6 and Safaro 11.0.3. Can any help me here please...? |
updates to a closed issue without any environment details or reproduction steps? really? |
Meta -
OS:
MacOS Sierra 10.12
Selenium Version:
2.53.1, 3.0.0-beta3
Facebook php-adapter
Browser:
Chrome
When i upgrade to macOS Sierra, i faced a problem that all WebDrivers methods with waiting until a condition, like $_webDriver->wait($timeout)->until(WebDriverExpectedCondition::presenceOfElementLocated($selector) doesn’t work correctly.
The problem is, if target selector is not visible or present now, WebDriver not trying to repeat check this selector again and again. WebDriver trying once and after timeout, just throws an Exception (NoSuchElementException).
The El Capitan (10.11) didn't have a problem.
Log:
12:58:13.038 INFO - Executing: [find element: By.cssSelector: .l-badge_new_wrapper #uBadgeBlock #uName])
12:58:24.008 WARN - Exception thrown
org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"css selector","selector":" .l-badge_new_wrapper #uBadgeBlock #uName"}
(Session info: chrome=53.0.2785.116)
(Driver info: chromedriver=2.24.417412 (ac882d3ce7c0d99292439bf3405780058fcca0a6),platform=Mac OS X 10.12.0 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 8 milliseconds
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.0.0-beta3', revision: 'c7b525d', time: '2016-09-01 14:57:03 -0700'
System info: host: 'Sakharov-MacBook-Pro.local', ip: '10.10.64.11', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.12', java.version: '1.8.0_74'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEnabled=true, networkConnectionEnabled=false, chrome={chromedriverVersion=2.24.417412 (ac882d3ce7c0d99292439bf3405780058fcca0a6), userDataDir=/var/folders/lj/4bqf7t556k964jh071mxq8040000gn/T/.org.chromium.Chromium.Qfcl87}, takesHeapSnapshot=true, pageLoadStrategy=normal, databaseEnabled=false, handlesAlerts=true, hasTouchScreen=true, version=53.0.2785.116, platform=MAC, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}]
Session ID: 4fb3f72ae02f3a6b4833cc3a261b21fe
*** Element info: {Using=css selector, value= .l-badge_new_wrapper #uBadgeBlock #uName}
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:631)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:369)
at org.openqa.selenium.remote.RemoteWebDriver.findElementByCssSelector(RemoteWebDriver.java:466)
at org.openqa.selenium.By$ByCssSelector.findElement(By.java:430)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:361)
at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.openqa.selenium.support.events.EventFiringWebDriver$2.invoke(EventFiringWebDriver.java:103)
at com.sun.proxy.$Proxy3.findElement(Unknown Source)
at org.openqa.selenium.support.events.EventFiringWebDriver.findElement(EventFiringWebDriver.java:187)
at org.openqa.selenium.remote.server.handler.FindElement.call(FindElement.java:48)
at org.openqa.selenium.remote.server.handler.FindElement.call(FindElement.java:33)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:176)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
-->
Browser Version:
53.0.2785.116
Expected Behavior -
WebDriver not trying to repeat check selector’s condition again and again.
Actual Behavior -
WebDriver trying once and after timeout, just throws an Exception (NoSuchElementException).
Steps to reproduce -
Please, fix this problem! I couldn't use WebDriver with MacOS Sierra.
The text was updated successfully, but these errors were encountered: