New issue
Advanced search Search tips
Starred by 84 users

Issue metadata

Status: Verified
Owner:
Closed: Sep 13
Cc:

Blocking:
issue 2571



Sign in to add a comment

Test testClickElement from MobileEmulationCapabilityTest class fails on Chromium for all platforms

Project Member Reported by khachatryan@chromium.org, Nov 20 2017

Issue description

Test testClickElement from MobileEmulationCapabilityTest class fails on Chromium for all platforms,
Test fails with the following error message:

======================================================================
ERROR: testClickElement (__main__.MobileEmulationCapabilityTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "E:\b\build\slave\chromedriver_win7\build\src\chrome\test\chromedriver\test\run_py_tests.py", line 2139, in testClickElement
    div.Click()
  File "E:\b\build\slave\chromedriver_win7\build\src\chrome\test\chromedriver\test\..\client\webelement.py", line 38, in Click
    self._Execute(Command.CLICK_ELEMENT)
  File "E:\b\build\slave\chromedriver_win7\build\src\chrome\test\chromedriver\test\..\client\webelement.py", line 18, in _Execute
    return self._chromedriver.ExecuteCommand(command, params)
  File "E:\b\build\slave\chromedriver_win7\build\src\chrome\test\chromedriver\test\..\client\chromedriver.py", line 291, in ExecuteCommand
    response = self._ExecuteCommand(command, params)
  File "E:\b\build\slave\chromedriver_win7\build\src\chrome\test\chromedriver\test\..\client\chromedriver.py", line 281, in _ExecuteCommand
    response = self._executor.Execute(command, params)
  File "E:\b\build\slave\chromedriver_win7\build\src\chrome\test\chromedriver\test\..\client\command_executor.py", line 193, in Execute
    response = self._http_client.getresponse()
  File "E:\b\depot_tools\win_tools-2_7_6_bin\python\bin\lib\httplib.py", line 1045, in getresponse
    response.begin()
  File "E:\b\depot_tools\win_tools-2_7_6_bin\python\bin\lib\httplib.py", line 409, in begin
    version, status, reason = self._read_status()
  File "E:\b\depot_tools\win_tools-2_7_6_bin\python\bin\lib\httplib.py", line 365, in _read_status
    line = self.fp.readline(_MAXLINE + 1)
  File "E:\b\depot_tools\win_tools-2_7_6_bin\python\bin\lib\socket.py", line 476, in readline
    data = self._sock.recv(self._rbufsize)
timeout: timed out
----------------------------------------------------------------------

 
Description: Show this description
Project Member

Comment 2 by johnchen@chromium.org, Nov 20 2017

Owner: einbinder@chromium.org
Status: Assigned (was: Available)
Hi Joel,

A ChromeDriver test case has been broken by your change https://crrev.com/493596. After this change, when mobile emulation and touch emulation are turned on, ChromeDriver isn't receiving response to some of its Input.dispatchMouseEvent command. Please see the attached log files. 493595.log used Chrome without your change, and the test worked correctly. 493596.log used Chrome with your change, and the test was hang. The logs showed that after an Input.dispatchMouseEvent command of type mousePressed, the older Chrome sends a response quickly, while the newer Chrome never sends a response back.

Could you please take a look? To repro this issue, please first build with "ninja -C out/Default chrome chromedriver", and then run the following test:

chrome/test/chromedriver/test/run_py_tests.py --chromedriver=out/Default/chromedriver --filter=__main__.MobileEmulationCapabilityTest.testClickElement

Thanks,
John
493595.log
25.1 KB View Download
493596.log
25.3 KB View Download
Project Member

Comment 3 by bugdroid1@chromium.org, Nov 21 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/283a2848221d80b4ef41e400459c739169d34b9d

commit 283a2848221d80b4ef41e400459c739169d34b9d
Author: Artur Khachatryan <khachatryan@chromium.org>
Date: Tue Nov 21 02:02:56 2017

[ChromeDriver] test MobileEmulationCapabilityTest.testClickElement is disabled

Test testClickElement from MobileEmulationCapabilityTest class fails on Chromium for all platforms.


Bug:  chromedriver:2144 
Change-Id: Ia2da75d51208693c43e528b3650af2523afe6bf3
Reviewed-on: https://chromium-review.googlesource.com/780364
Reviewed-by: John Chen <johnchen@chromium.org>
Commit-Queue: Artur Khachatryan <khachatryan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#518056}
[modify] https://crrev.com/283a2848221d80b4ef41e400459c739169d34b9d/chrome/test/chromedriver/test/run_py_tests.py

Status: Started (was: Assigned)
There is sort of a fundamental issue with how we have been handling touch event acks. Touch events can cause mouse events to be generated, but we haven't been waiting for those events to be fired into the page. Due to a combination of race conditions that have been fixed, this test started failing. I am working on a fix, but it doesn't look like it is going to be easy.
Project Member

Comment 6 by johnchen@chromium.org, Dec 6 2017

Thanks for looking into this. If there are any changes we can make in ChromeDriver to make the fix easier, please let us know.

Comment 8 by erez...@gmail.com, Dec 18 2017

Hi,
I ran into this Issue while looking for some info about similar problem - I think it relates: 
We are working with chrome emulator for automation for sometime now.
Once Chrome got automatically updated to v62 (and above), simple click stopped working - we use selenium so we got a timeout.
we tried different versions of chromedriver as 2.33 and 2.34 but nothing helps but downgrade chrome to v61.

This workaround won't hold for long time of course.
Hope it relates and this issue will be solved soon.

Thanks! 


Project Member

Comment 9 by johnchen@chromium.org, Dec 19 2017

 Issue 2187  has been merged into this issue.
.udid
73 bytes Download
 Issue 2145  has been merged into this issue.
Project Member

Comment 12 by johnchen@chromium.org, Jan 9 2018

einbinder@: Do you have any update on this bug? Thanks.
Project Member

Comment 13 by bugdroid1@chromium.org, Jan 9 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c606e09fbd39ab08befe00b5f14f0ba0fe2bf878

commit c606e09fbd39ab08befe00b5f14f0ba0fe2bf878
Author: John Chen <johnchen@chromium.org>
Date: Tue Jan 09 19:38:27 2018

[ChromeDriver] Temporarily disable touch emulation

Bug  https://crbug.com/chromedriver/2144  is causing ChromeDriver and
Chrome to stop responding under some scenarios. Temporarily disabling
touch emulation feature until this bug can be resolve.

Bug:  chromedriver:2144 
Change-Id: I216235aa909aafa5cb44e7519c89056e2caee29d
Reviewed-on: https://chromium-review.googlesource.com/857882
Reviewed-by: Caleb Rouleau <crouleau@chromium.org>
Commit-Queue: John Chen <johnchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#528070}
[modify] https://crrev.com/c606e09fbd39ab08befe00b5f14f0ba0fe2bf878/chrome/test/chromedriver/chrome/mobile_emulation_override_manager.cc
[modify] https://crrev.com/c606e09fbd39ab08befe00b5f14f0ba0fe2bf878/chrome/test/chromedriver/chrome/mobile_emulation_override_manager_unittest.cc

 Issue 2219  has been merged into this issue.
Hi, Can we please get a faster resolution/update regarding this as this is blocking entire automation

Comment 16 by s...@zoosk.com, Jan 11 2018

Waiting on the fix as well. Would love to see this get resolved soon. Thanks. 

Comment 17 by dimu...@gmail.com, Jan 23 2018

Any updates here ?

Comment 18 by dimu...@gmail.com, Mar 9 2018

Reported by khachatryan@chromium.org, Nov 20
almost 4 months passed w/o resolution and disabled test is still disabled and touch still doesnt work :(
dimundo.., could you please try with Chrome 65 and Chromedriver 2.36?

Comment 20 Deleted

Comment 21 by dimu...@gmail.com, Mar 9 2018

Still same - not fixed
win 10 + chromedriver 2.36.540470 + chrome 65.0.3325.146

last working combo - 2.33.506120 + 61.0.3163.79

As for  issue 2306 , everything worked until we used ChromeDriver 2.33.506120 and Chrome 61.0.3163.79. Since then, it goes down the hill.
Any progress? 

Currently we cannot upgrade chrome above 61 and chromedriver above 2.33.

Actually it is not possible to combine the runs/work between emulator and actual devices because of this bug with emulator (we prefer the emulator due to speed).
Preciso de emprego
Em 22/03/2018 4:57 AM, "climbing… via monorail" <
monorail+v2.3537435706@chromium.org> escreveu:
einbinder@: Do you have an update ?

Comment 26 by yohe...@gmail.com, Mar 31 2018

IMG_20180329_212747710.jpg
1.4 MB View Download
Capacidade de plataforma

Em 31/03/2018 1:24 AM, "yohe… via monorail" <
monorail+v2.1394059925@chromium.org> escreveu:

Comment 28 Deleted

 Issue 2365  has been merged into this issue.
new chrome 65.0.3325.181 and new ChromeDriver 2.38.551601 are released -touch still not working (obviously, as this issue is not fixed)
Any plans on this ?

and same fail for 2.38.551601 + 66.0.3359.117 :(
any updates? quite annoying issue
Labels: Needs-Feedback
einbinder@chromium.org, do you have an update on this issue?
Any updates on this issue? We also need this fix very much
Guys, the whole page is obsolete due to the issue: http://chromedriver.chromium.org/mobile-emulation

Touches don't work.
Is there some progress?
 Issue 2322  has been merged into this issue.
2.39.562718 + 67.0.3396.62 still bad
Any hope on fixing this?
Project Member

Comment 38 by crouleau@chromium.org, Jun 12

Cc: khachatryan@chromium.org crouleau@chromium.org
 Issue 2459  has been merged into this issue.
For context, I started working on this at https://chromium-review.googlesource.com/c/chromium/src/+/1071094

I am trying to find a way to fix it that won't be horribly flaky.
Thank you Joel for working on it. It is much appreciated.

 Issue 2450  has been merged into this issue.
 Issue 2467  has been merged into this issue.
 Issue 2478  has been merged into this issue.
Any updates on the click issue? Thanks!
plus 1 to Adrian question. Thank you!
This basically killed our mobile automation. We don't want to implement workarounds if the fix will be available soon, is anyone working on fix?

Thanks

Comment 47 Deleted

Comment 48 Deleted

Might help: in my scenario when mobile emulation is on WRONG element receives click. I.e. seleniums's findElement returns correct element but when I call 'Click' on it other element receives it. Clicks happens but on wrong element.
Hi guys,

This issue is getting me crazy as well, I am only having problems with this while using Windows 10 and Windows Server Virtual Machines, the issue is not present while using Windows 10 physical machine or Windows 7 physical or Virtual Machines.

As comment49 said, I have noticed click is done in different coordinates that the element is currently in, not sure why as Selenium is retrieving the correct element coordinates, I am able to click using Javascript click and also Javascript click on coordinates but Selenium click is not working.

The issue is only present on mobile emulation, responsive with screen size set is working fine while using not emulation.

Resume from my side is I am only having this issue while using Windows 10 kind  Virtual Machine (Windows 10 or Windows Server 2016).

Best regards,
Use JavascriptExecutor to click on the element:

WebElement element = driver.findElement(By.id("test123"));
JavascriptExecutor executor = (JavascriptExecutor)driver;
executor.executeScript("arguments[0].click();", element);
just to remind - this ticked ( opened in november) initially was about broken TOUCH not click. Not sure if it is ok to mix different issues into this one
2144

any ideas how to workaround this , anyone ?
Currently just setting window size through normal browser settings and user agent in the mobile emulation settings, although this doesn't simulate touchevents which is where the issue is and doesn't set the window scale this is probably the best option for testing responsive design in the meantime.
Any updates on the click issue?  I still having this problem on mobile emulation. Thanks!
We are also not sure what to do. Our pipeline is stuck on an old version of Chromium from last October!

The the issue then was marked fixed: https://bugs.chromium.org/p/chromedriver/issues/detail?id=2103
And the follow up issue for chrome was also marked fixed:
https://bugs.chromium.org/p/chromium/issues/detail?id=784284

But the issue is still the same. We can't (or don't know how to) emulate touch events via selenium.
Hi guys,

This issue is very frustrating, I am only having this problems with the MAC OS.
with chrome version 67 and 68 only. Same thing is working fine on windows and ubuntu.

Comment 59 Deleted

Project Member

Comment 60 by bugdroid1@chromium.org, Aug 21

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e4e4440f89bd318d228713278a9486a184680972

commit e4e4440f89bd318d228713278a9486a184680972
Author: Joel Einbinder <einbinder@chromium.org>
Date: Tue Aug 21 22:05:44 2018

ChromeDriver: Convert mouse events into touch events

This patch uses Input.dispatchTouchEvent instead of
Emulation.setEmitTouchEventsForMouse. This gives more predictable
behavior and allows for each touch event to be awaited.

Bug:  chromedriver:2144 
Change-Id: Ic243c216e2f832844a64f8f2af894eb6cc4234d1
Reviewed-on: https://chromium-review.googlesource.com/1182506
Commit-Queue: Joel Einbinder <einbinder@chromium.org>
Reviewed-by: John Chen <johnchen@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#584904}
[modify] https://crrev.com/e4e4440f89bd318d228713278a9486a184680972/chrome/test/chromedriver/chrome/mobile_emulation_override_manager.cc
[modify] https://crrev.com/e4e4440f89bd318d228713278a9486a184680972/chrome/test/chromedriver/chrome/web_view_impl.cc
[modify] https://crrev.com/e4e4440f89bd318d228713278a9486a184680972/chrome/test/chromedriver/chrome/web_view_impl.h
[modify] https://crrev.com/e4e4440f89bd318d228713278a9486a184680972/chrome/test/chromedriver/test/run_py_tests.py

Comment 61 Deleted

Comment 62 Deleted

Blocking: 2571
Project Member

Comment 64 by johnchen@chromium.org, Sep 13

Labels: -Needs-Feedback ToBeReleased ChromeDriver-2.42
Status: Fixed (was: Started)
Project Member

Comment 65 by johnchen@chromium.org, Sep 14

Labels: -ToBeReleased
It still doesn't work with Chromedriver 2.42 and Chrome Version 69.0.3497.92 (Official Build) (64-bit) - Mac OSX
Project Member

Comment 67 by crouleau@chromium.org, Sep 21

Artur, can you please check to see whether or not this is truly fixed?
confirming - win + ubuntu fixed, but macOs still fails

chromedriver versions
win 2.42.591088 (7b2b2dca23cca0862f674758c9a3933e685c27d5)
mac 2.42.591059 (a3d9684d10d61aa0c45f6723b327283be1ebaad8)
linux 2.42.591071 (0b695ff80972cc1a65a5cd643186d2ae582cd4ac) 

browser versions
win 69.0.3497.92 XP
mac 69.0.3497.92 MAC
linux 69.0.3497.92 LINUX

win - windows 10
mac - high sierra 10.13.6
linux - ubuntu 16.04.5 LTS
Yes Caleb, this test is passing on all platforms.
You can see on WaterFall builds.


..
ChromeDriver 2.42.593063
...
testClickElement (__main__.MobileEmulationCapabilityTest) ... ok
..

phuongnd08... could you please share your repro code so we could run on our side.
Please also attach ChromeDriver verbose log file.


I can confirm this issue is still happening for me, 2.42 + Windows Virtual Machine.
hellpine.., please share your repro code and attach ChromeDriver verbose log file.

I'm not using chromedriver directly, but through capybara + chromedriver-helper which are ruby gems. Would a repro code in ruby be accepted here?
Sure we can use Ruby code as well. Please share your code.

Status: Verified (was: Fixed)
The fix is verified in Chromedriver 2.42

Comment 75 Deleted

Comment 76 Deleted

I can confirm it is failing in Mac with the same data as Comment 68
I have just downloaded de chromedriver (via ./node_modules/protractor/bin/webdriver-manager update) and I got version 2.42.5910 instead of 2.42.5930 as stated at Comment 69
Reproduced for me as well. Chromedriver 2.42, Mac OS 10.13.6.
Hi guys, we experienced that this issue is not happening always, it has something related with driver creation, so we implemented a conditional that kills the driver and starts it again at the beginning of our suite in BeforeSuite annotation.
Some notes: We use the same driver across all the suite so once click issue is not happening, driver is valid for the whole suite. If you create a driver in each test case probably this conditional should be placed in beforeClass annotation.
I hope this will be useful for you.
I am facing this issue every time. Below are the details-
OS- Windows server 2016
chrome-68.0.3440.75   Tried with chrome 69 also.
chromedriver-2.42.591088
Project Member

Comment 81 by johnchen@chromium.org, Sep 28

For anyone still experiencing similar issue, could you please post code to repro the issue? The particular test mentioned in the title of this issue is now working very reliably in our internal testing. We are aware that some similar problems still exist, e.g., issue #2599. We can investigate any issues you are encountering only if repro code is provided.
From https://bugs.chromium.org/p/chromedriver/issues/detail?id=2322

In my case I think there is a problem with the readonly tag for the "Fly Out" and "Fly Back" fields

I'm attaching two features. 
The first one opens RyanAir home page and fills the trip airports and then enters a 20 second sleep. You can try to click on both input fields at the browser and you will see no reaction. 
The second feature, instead of the sleep command, sends the click command to the Fly Out field

You can have several logs at bugs  2322 ,  2323  and  2324 
chromedriver-2322-2323-2324.zip
24.3 KB Download
tongilcoto... like it was stated in comment #81, let's all the issues related to click/tap on mobile emulation track with the issue #2599

I'll update the bugs  2322 -2324.


Sign in to add a comment