-
Notifications
You must be signed in to change notification settings - Fork 37
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
Error running tests_init() #66
Comments
First, lets make sure minimal examples with RSelenium work:
Sys.which("phantomjs") # if this return an empty string you need to set your PATH to find phantomjs
library(RSelenium)
pJS <- phantom()
Sys.sleep(3)
remDr <- remoteDriver(browserName = "phantomjs")
remDr$open()
pJS$stop()
library(RSelenium)
checkForServer()
startServer()
remDr <- remoteDriver(browserName = "firefox")
remDr$open() |
|
Hmm, sometimes the server needs a few seconds to startup, so try this: library(RSelenium)
checkForServer()
startServer()
Sys.sleep(5)
remDr <- remoteDriver(browserName = "firefox")
remDr$open() If you still get an error, that is probably something that should be reported here (make sure to include your As for phantomjs, could you try |
I've tried both of these with the version of
|
The ropensci people pointed out that I need to have java installed. That helped with the firefox issue. A new firefox window opens, and it tries to connect to The good news is that I now get to the same R error as when I try to use phantomjs
|
Hmm, could you try changing http://superuser.com/questions/713491/why-does-localhost-not-work-in-windows-8-1-but-127-0-0-1-does |
If that works, we should probably make the same changes to the shiny tests. |
Still getting the same issue unfortunately.
The traceback output
I get the same error when I try to use firefox as well. |
Before the > tests_init()
serving the directory /Users/cpsievert/Desktop/github/local/animint/tests/testthat at http://127.0.0.1:4848 Try running this (and show me the output): path <- animint:::find_test_path()
path # make sure this is the full path to the testthat/ folder
animint:::run_servr(port = 4848, path) # this _should_ display a message
browseURL("http://localhost:4848/") # if everything worked, you'll see files under testthat/ listed in your browser |
I don't see the Is this a Windows issue? It looks like the forward and backslashes in the path are messed up.
This just opened a blank web page so it did not work. |
Ah, OK, this exposed some poor programming on my part. This line should probably be Would you mind making that fix and creating a pull request? The topic could be something along the lines of "get testing working on Windows". |
@cpsievert I ran
|
When I run
I got the following error and PhantomJS doesn't successfully start up since the default port 4444 of PhantomJS is possessed by other process,
Hence, instead of killing processes recorded in pid.txt, |
Hey @caijun, please try the following: system("lsof -i :4444")
library(RSelenium)
startServer()
Sys.sleep(5)
remDr <- remoteDriver(browserName = "firefox")
remDr$open()
system("lsof -i :4444")
remDr$closeServer()
# if java is still running at this point, we should report an issue to RSelenium
system("lsof -i :4444") |
Hi @cpsievert , I run the codes and java is still running at on my Mac OS 10.10.3 Yosemite.
|
OK, thanks. I would report that to https://github.com/ropensci/rselenium |
I'm trying to familiarize myself with the testing workflow for animint. @cpsievert has pointed me to the testing wiki to get started, but I have been unable to run
tests_init()
without an error.It also spits out some warning messages which Carson said not to worry about. If I try using Firefox, I get a different error:
Here's my session info, let me know what else I can do to help!
The text was updated successfully, but these errors were encountered: