last day (16 days later) » 

7:35 PM
2
A: Can browser called from RSelenium run in the backround

alex23lemmYes, that is possible. The default browser for RSelenium is Firefox. However, RSelenium even supports headless browsing using PhantomJS which is described in the respective vignette in detail. In general, for leveraging PhanomJS under Windows 7 you just need to download PhantomJS and add the ...

 
Thanks for this. It seems i am getting stuck at the very beginning. i get the following error: > remDrv$open() [1] "Connecting to remote server" Error: Summary: UnknownError Detail: An unknown server-side error occurred while processing the command. class: java.lang.NoClassDefFoundError when i run checkForServer(); startServer(); pJS <- phantom("C:\\Users\\phantomjs.exe", extras = c('--ssl-protocol=tlsv1')); remDrv <- remoteDriver(browserName = 'phantomjs'); remDrv$open()
 
When using phantom you do not need to run checkForServer() or startServer(). What happens if you update your PATH variable like described in my updated post and run the respective code in the 'Headless browsing' section? This should not give you any error.
 
I still get the same error. This is what i run: pJS <- phantom("C:\\Users\\phantomjs.exe", extras = c('--ssl-protocol=tlsv1')); remDrv <- remoteDriver(browserName = 'phantomjs'); remDrv$open()
 
As I mentioned in my last comment, you should update your user or system PATH variable like described above and only run the code in the 'Headless browsing' section. Please either use pJS <- phantom() or pJS <- phantom(extras = c('--ssl-protocol=tlsv1')). Then everything should work fine
 
I think this is what i am not getting (sorry for busting ..) place the folder in which the phantomjs.exe resides in the user or system PATH variable (e.g., C:\Program Files\phantomjs-1.9.7-windows) i am placing it in the path i get from the getwd() in r
 
7:35 PM
When you download and unzip phantom from the official web page, you end up with a folder phantomjs-[version number]-windows in which the phantomjs.exe resides. On my machine I put this folder under C:\Program Files. After that I added the folder path to the phantomjs.exe namely C:\Program Files\phantom-1.9.7-windows as an additional entry to my Windows user PATH variable in the Environment Variables menu. This step has nothing to do with R. Does this help you? Do you know how to update a Windows environment variable?
 
done this, i get Error in phantom() : PhantomJS binary not located. only when i unzip phantom in the getwd() path or when i run phantom("pathWherephEXEis\\phantomjs.exe") i do not get the above error. In those cases though i go back to error described in my first comment.
 
I moved our discussion to the chat area. Let us see if we can solve your issue :-). Can you please tell me the exact path you put into the variable value field of the user PATH variable? What version of phantomjs did you download? What is your RSelenium package version?
 
8:24 PM
The error message Error in phantom() : PhantomJS binary not located clearly shows that your setup of the PATH variable is not OK. Normally, I use phantom 1.9.7 together with RSelenium. I just tested everything with phantom 2.0 which also worked fine. However, as of version 2 the phantomjs.exe is located underneath C:\[whateverOnYourMachine]\phantom-2.0.0-windows\bin. Did specify the value of the PATH variable accordingly?
 

  last day (16 days later) »