-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
simulate mouseover/mouseout events? #59
Comments
here is a minimal reproducible example library(RSelenium)
startServer()
remDr <- remoteDriver(browserName="firefox")
remDr$open()
bug.html <- file.path(tempdir(), "RSelenium-bug.html")
cat('<!DOCTYPE html>
<html>
<body>
<h1 id="head"
onmouseover="',
"this.style.color = 'red'",
'" onmouseout="',
"this.style.color = 'black'",
'">My First Heading</h1>
<p>My first paragraph.</p>
</body>
</html>', file=bug.html)
remDr$navigate(paste0("file://", bug.html))
e <- remDr$findElement("id", "head")
remDr$mouseMoveToLocation(webElement=e) output is
|
Hi Toby, Are you running this on a MAC? This is likely an issue with native events and Selenium. Depending on the version of firefox/Selenium native events may not function. You can check what versions of selenium server have support for native events for versions of firefox by referencing the changelog. For example https://github.com/SeleniumHQ/selenium/blob/master/java/CHANGELOG |
running this on Ubuntu with
so I guess upgrading is the solution. but also we would like to test such "native events" in phantomjs too. Is that possible? Doesn't work with the version I have. |
Any ideas how I could write a test for functionality that I have implemented in a JavaScript function that is called on mouseover/mouseout events?
I found the
mouseMoveToLocation
function but it does not seem to generate a call to my handler function.I also tried using
executeScript
but that generated an errorThe text was updated successfully, but these errors were encountered: