Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chome 61, ChromeDriver 2.32 Click on element for mobile device emulators throws WebDriverException: unknown error: Element is not clickable at point

I have tests that were perfectly working in Chrome 60 and ChromeDriver 2.31, but after Chrome updated to 61 version I had to update ChromeDriver to 2.32. And now I am getting sporadic org.openqa.selenium.WebDriverException: unknown error: Element is not clickable at point (X, Y) - in all tests that are run for mobile device emulators such as "iPhone 6 Plus" browser mode,

for example.

As a workaround I would probably use scroll to element before the click, but it's just a quick fix and it's better to know where this issue comes from. Is it the issue of the current latest Chrome and driver releases? Is it going to be fixed soon?

Issue is reproduced on both local and remote webdriver.

Stacktrace:

org.openqa.selenium.WebDriverException: unknown error: Element is not clickable at point (182, 3724) (Session info: chrome=61.0.3163.91)
(Driver info: chromedriver=2.32.498550 (9dec58e66c31bcc53a9ce3c7226f0c1c5810906a),platform=Windows NT 10.0.15063 x86_64) (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 115 milliseconds Build info: version: '3.4.0', revision: 'unknown', time: 'unknown' System info: host: 'xxx', ip: '10.100.8.33', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_131' Driver info: org.openqa.selenium.chrome.ChromeDriver Capabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEnabled=true, networkConnectionEnabled=false, chrome={chromedriverVersion=2.32.498550 (9dec58e66c31bcc53a9ce3c7226f0c1c5810906a), userDataDir=C:\Users\xxx\AppData\Local\Temp\scoped_dir5912_31757}, takesHeapSnapshot=true, pageLoadStrategy=normal, databaseEnabled=false, handlesAlerts=true, hasTouchScreen=true, version=61.0.3163.91, platform=XP, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true, setWindowRect=true, unexpectedAlertBehaviour=dismiss}] Session ID: 2ead932fef8d0d923286ac41c8fffe50 Command duration or timeout: 257 milliseconds

I guess it relates to https://bugs.chromium.org/p/chromedriver/issues/detail?id=1852

like image 740
megadevices Avatar asked Sep 21 '17 08:09

megadevices


3 Answers

Chrome driver Developers are aware that the fix is not working properly in mobile device emulate mode. A fix for that is coming in ChromeDriver 2.33.

like image 119
megadevices Avatar answered Nov 15 '22 12:11

megadevices


you need to downgrade your chrome version to 59.0 (32 bit), as there is some with issue with the new chrome update. or you need to scroll to element first and then try to click

like image 26
Nitish Kumar Avatar answered Nov 15 '22 12:11

Nitish Kumar


I am not absolutely sure but your issue sounds very much like mine one. My tests appeared to be not able to scroll to the element using the built-in move_to_element() Selenium method after my browser was updated.

Here is my workaround written in python

   def scroll_to_element(element):
       self.driver.execute_script("window.scrollTo(0, %d);" % 
       element.location['y'])

As a temporary solution – try to scroll to the element an then try to click it. Hope this helps you for now.

like image 1
Oleg Lymarchuk Avatar answered Nov 15 '22 13:11

Oleg Lymarchuk