ericmckean / chromedriver

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

Attempting to move mouse to corner of page in Chrome 41 throws WebDriverException: unknown error: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element' #1049

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Issue Description:
As of Chrome 41, attempting to move the mouse to the corner of the page by 
using the following code fails with a WebDriverException:

Actions mouseMoveAction = new Actions(driver);
WebElement page = driver.findElement(By.tagName("html"));

int yOffset = page.getSize().getHeight();

mouseMoveAction.moveToElement(page,0,yOffset-10).perform(); //This line fails

The exception thrown is:
org.openqa.selenium.WebDriverException: unknown error: Failed to execute 
'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'.
  (Session info: chrome=41.0.2272.76)
  (Driver info: chromedriver=2.12.301325 (962dea43ddd90e7e4224a03fa3c36a421281abb7),platform=Windows NT 6.1 SP1 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 26 milliseconds
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: host: 'SEL-Win7x64-4', ip: 'REMOVED-FOR-SECURITY', os.name: 
'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.7.0_45'
Session ID: 43603567ce30bac894556402e3f2242f
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities [{platform=XP, acceptSslCerts=true, javascriptEnabled=true, 
browserName=chrome, 
chrome={userDataDir=REMOVED-FOR-SECURITY\scoped_dir2752_27763}, 
rotatable=false, locationContextEnabled=true, mobileEmulationEnabled=false, 
version=41.0.2272.76, takesHeapSnapshot=true, cssSelectorsEnabled=true, 
databaseEnabled=false, handlesAlerts=true, browserConnectionEnabled=false, 
webStorageEnabled=true, nativeEvents=true, applicationCacheEnabled=false, 
takesScreenshot=true}]
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: host: 'REMOVED-FOR-SECURITY', ip: 'REMOVED-FOR-SECURITY', os.name: 
'Linux', os.arch: 'amd64', os.version: '2.6.32-504.el6.x86_64', java.version: 
'1.7.0_71'
Driver info: driver.version: RemoteWebDriver

Steps to reproduce (if relevant, you MUST provide a simplified html page or
link to public site):

1. Run the code snipped about using Chrome 40 and notice that the mouse is 
moved to the corner of the page.
2. Run the same code snippet using Chrome 41 and notice that an exception is 
thrown.

*Note: This was tested using selenium-java 2.45.0 and ChromeDriver 2.12 and 
2.14 and the exception is still thrown. It appears to have something to do with 
the Chrome 41 release.

Original issue reported on code.google.com by AdamJaso...@gmail.com on 4 Mar 2015 at 4:34

GoogleCodeExporter commented 9 years ago

Original comment by gmanikp...@chromium.org on 11 Mar 2015 at 7:03

GoogleCodeExporter commented 9 years ago
I've got the same issue on any element that I try to click, if search is 
By.XPath:

System.Exception: Error clicking element By.XPath: //*[contains(.,'Employees')] 
---> System.InvalidOperationException: unknown error: Failed to execute 
'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'.
  (Session info: chrome=41.0.2272.101)
  (Driver info: chromedriver=2.8.241075,platform=Windows NT 6.1 SP1 x86_64)
Result StackTrace:  
bij OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response 
errorResponse)
   bij OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
   bij OpenQA.Selenium.Remote.RemoteWebElement.Click()

Searching by Id and Click() is fine

Original comment by raj....@gmail.com on 27 Mar 2015 at 7:34

GoogleCodeExporter commented 9 years ago

Original comment by samu...@chromium.org on 2 Apr 2015 at 10:00