7
votes

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

6

6 Answers

4
votes

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.

1
votes

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

1
votes

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.

0
votes

There are alternate solution for this:

First maximize the window:

driver.manage().window().maximize();

Second, You can use the Action class to moveToElementmethod and access it

WebElement element = driver.findElement(By("element"));
Actions action = new Actions(driver);
action.moveToElement(element).click().perform();
0
votes

try to click using javascript its works for me.

 WebElement element = driver.findElement(By.id("gbqfd"));
JavascriptExecutor executor = (JavascriptExecutor)driver;
executor.executeScript("arguments[0].click();", element);
0
votes

I have the same problem (movetoelement does nothing in mode movilemulation with chromedriver2.32 and Chrome61+) and the only solution for me was back to Chrome60. You can obtains older versions of chrome in https://www.slimjet.com/chrome/google-chrome-old-version.php

When chromedriver2.33 arrives then i will test again against Chrome61+