FuckTheWorld / chromedriver

Automatically exported from code.google.com/p/chromedriver
0 stars 0 forks source link

Clicking on buttons with Chrome 45 and mobileEmulation fails #1127

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Issue Description:

Clicking on a button when using Chrome 45 (canary) and mobileEmulation is 
causing the click to register on the wrong element. A complete example is here: 
https://github.com/juliemr/webdriver-bugs/blob/master/mobileclick.js

The test attempts to click on 
driver.findElement(webdriver.By.id('thebutton'));, but the click is actually 
intercepted by a number input on the page.

This only occurs when using Chrome 45, and when using mobileEmulation in the 
chromeOptions (as shown in the link above):

  'deviceMetrics': {
    'width': 600,
    'height': 960,
    'pixelRatio': 2
  }

I am using selenium standalone 2.46.0, ChromeDriver 2.16, and 
selenium-webdriver node.js module 246.0.

The output from selenium is:

17:29:09.409 INFO - Executing: [new session: Capabilities 
[{loggingPrefs=org.openqa.selenium.logging.LoggingPreferences@4462d6f, 
browserName=chrome, chromeOptions={args=[--js-flags=--expose-gc], 
mobileEmulation={deviceMetrics={pixelRatio=2, width=600, height=960}}, 
perfLoggingPrefs={traceCategories=v8,blink.console,disabled-by-default-devtools.
timeline}, binary=/Applications/Google Chrome Canary.app/Contents/MacOS/Google 
Chrome Canary}}]])
17:29:09.410 INFO - Creating a new session for Capabilities 
[{loggingPrefs=org.openqa.selenium.logging.LoggingPreferences@4462d6f, 
browserName=chrome, chromeOptions={args=[--js-flags=--expose-gc], 
mobileEmulation={deviceMetrics={pixelRatio=2, width=600, height=960}}, 
perfLoggingPrefs={traceCategories=v8,blink.console,disabled-by-default-devtools.
timeline}, binary=/Applications/Google Chrome Canary.app/Contents/MacOS/Google 
Chrome Canary}}]
Starting ChromeDriver 2.16.333243 (0bfa1d3575fc1044244f21ddb82bf870944ef961) on 
port 9938
Only local connections are allowed.
17:29:12.418 INFO - Done: [new session: Capabilities 
[{loggingPrefs=org.openqa.selenium.logging.LoggingPreferences@4462d6f, 
browserName=chrome, chromeOptions={args=[--js-flags=--expose-gc], 
mobileEmulation={deviceMetrics={pixelRatio=2, width=600, height=960}}, 
perfLoggingPrefs={traceCategories=v8,blink.console,disabled-by-default-devtools.
timeline}, binary=/Applications/Google Chrome Canary.app/Contents/MacOS/Google 
Chrome Canary}}]]
17:29:12.431 INFO - Executing: [get: http://juliemr.github.io/webdriver-bugs/])
17:29:13.457 INFO - Done: [get: http://juliemr.github.io/webdriver-bugs/]
17:29:14.471 INFO - Executing: [find element: By.id: thebutton])
17:29:14.509 INFO - Done: [find element: By.id: thebutton]
17:29:14.526 INFO - Executing: [click: 0 [[ChromeDriver: chrome on MAC 
(0767c717fbb0c09ba6b58cfb582a8e03)] -> id: thebutton]])
17:29:14.584 INFO - Done: [click: 0 [[ChromeDriver: chrome on MAC 
(0767c717fbb0c09ba6b58cfb582a8e03)] -> id: thebutton]]
17:29:16.596 INFO - Executing: [find element: By.id: messages])
17:29:16.612 INFO - Done: [find element: By.id: messages]
17:29:16.620 INFO - Executing: [get text: 1 [[ChromeDriver: chrome on MAC 
(0767c717fbb0c09ba6b58cfb582a8e03)] -> id: messages]])
17:29:16.645 INFO - Done: [get text: 1 [[ChromeDriver: chrome on MAC 
(0767c717fbb0c09ba6b58cfb582a8e03)] -> id: messages]]
17:29:16.649 INFO - Executing: [delete session: 
15fab700-26e5-471e-9cf3-17081de0e4b6])
17:29:17.253 INFO - Done: [delete session: 15fab700-26e5-471e-9cf3-17081de0e4b6]

Original issue reported on code.google.com by ral...@google.com on 13 Jun 2015 at 12:35

GoogleCodeExporter commented 9 years ago
Issue is reproducible:- this issue is reproducible with ChromeDriver 2.16 but 
NOT reproducible with ChromeDriver2.15.

Also:-

Reproducible when running chrome as node using Grid:- WebDriver driver = new 
RemoteWebDriver(new URL("http://localhost:4444/wd/hub"), capabilities);

It works fine when using normal instance :-  
ChromeDriver driver = new ChromeDriver(capabilities);

untriaging the issue for now.

Original comment by agau...@chromium.org on 16 Jun 2015 at 11:19

GoogleCodeExporter commented 9 years ago
Issue is also reproducible on Mac platform, with chromedriver 2.16 and chrome 
canary 45

And there is a strange behavior on Linux, it works fine with 2.16 but fails for 
older version 2.15 on Chrome 45.0.2427.7 (Official Build) dev (64-bit)

Original comment by gmanikp...@chromium.org on 17 Jun 2015 at 6:55

GoogleCodeExporter commented 9 years ago

Original comment by gmanikp...@chromium.org on 24 Jun 2015 at 10:17