Reputation: 3280
I am new to RSelenium
, and am having trouble with the following example from the "Introduction Vignette":
remDr$navigate("http://www.r-project.org") # Works
webElem <- remDr$findElement("partial link text", "download R") # Works
webElem$getElementText() # Works
remDr$mouseMoveToLocation(webElement = webElem) # DOES NOT Work!
I get the following error:
Error: Summary: InvalidElementState
Detail: An element command could not be completed because the element is in an invalid state (e.g. attempting to click a disabled element).
class: org.openqa.selenium.InvalidElementStateException
Any ideas? I am running Firefox on Mac OS X with R version 3.1.1 (2014-07-10). EDIT: Also does not work on R version 3.1.3 (2015-03-09).
Upvotes: 3
Views: 1683
Reputation: 30425
library(RSelenium)
startServer()
# remDr <- remoteDriver(browserName = "chrome")
remDr <- remoteDriver()
remDr$open()
remDr$navigate("http://www.r-project.org") # Works
webElem <- remDr$findElement("partial link text", "download R") # Works
webElem$getElementText() # Works
checking versions:
> remDr$getStatus()$build
$version
[1] "2.45.0"
$revision
[1] "5017cb8"
$time
[1] "2015-02-26 23:59:50"
> remDr$sessionInfo$version
[1] "36.0.1"
running:
remDr$mouseMoveToLocation(webElement = webElem) # DOES NOT Work!
replicates the error
Checking error messages:
remDr$value$localizedMessage
[1] "Cannot perform native interaction: Could not load native events component.\nBuild info: version: '2.45.0', revision: '5017cb8', time: '2015-02-26 23:59:50'\nSystem info: host: 'JACK2', ip: '192.168.59.3', os.name: 'Windows 8.1', os.arch: 'amd64', os.version: '6.3', java.version: '1.8.0_25'\nDriver info: driver.version: unknown"
we see that the moveToLocation
method requires nativeEvents. Checking the CHANGELOG for selenium server version 2.45.0 we see:
v2.45.0
Important changes in this release:
- Native events in Firefox relied on an API that Mozilla no longer provides. As such, fall back to synthesized events on recent Firefox versions.
Methods requiring native events are currently not functional for the most recent version of firefox (36) and selenium server (2.45.0)
Upvotes: 2