rselenium

RSelenium not working with Firefox

孤街浪徒 提交于 2019-12-06 13:34:18
I know my question is similar to this one , but he's trying to use Chrome while I'm trying to use Firefox (47.0.1). So basically, I'm trying to use RSelenium. Here is my code : > library(RSelenium) > checkForServer() > startServer() > mybrowser <- remoteDriver() > mybrowser$open() And with that last line, I get the following error. [1] "Connecting to remote server" Error: Summary: UnknownError Detail: An unknown server-side error occurred while processing the command. class: org.openqa.selenium.WebDriverException I tried removing-reinstalling the RSelenium package. I also tried what this

RSelenium issue with startServer() on windows

浪子不回头ぞ 提交于 2019-12-06 09:38:34
问题 I just installed RSelenium from github (I have the same issue when I install it via cran) and I get the following error in windows machine: Error in if (file.exists(file) == FALSE) if (!missing(asText) && asText == : argument is of length zero In addition: Warning message: running command '"wmic" path win32_process get Caption,Processid,Commandline /format:htable' had status 44210 From the function startServer() this is the part that is producing the error: system2("wmic", args = c("path

RSelenium and Docker on EC2

瘦欲@ 提交于 2019-12-06 08:38:58
My final goal is to be able to use rselenium through rstudio my EC2 instance (AWS). For that, I read that it is recommeneded to use and install a docker on a virtual machine. So I followed all the steps given by John D Harrison here: https://rpubs.com/johndharrison/RSelenium-Docker And everything went fine except at the end when I enter in RStudio on my EC2 instance. Because when I try to connect to the remote server I get the below error: library(RSelenium) remDr <- remoteDriver(remoteServerAddr = "192.168.99.100", port = 4445L) remDr$open() 1 "Connecting to remote server" Error in checkError

RSelenium through docker

懵懂的女人 提交于 2019-12-06 02:39:20
My OS is windows 8.1 and I have the version 3.3.3 of R. I have installed the RSelenium packages and I try to run it using this: library("RSelenium") #start RSelenium server startServer() checkForServer() and I receive this error: Error: checkForServer is now defunct. Users in future can find the function in file.path(find.package("RSelenium"), "examples/serverUtils"). The recommended way to run a selenium server is via Docker. Alternatively see the RSelenium::rsDriver function. Is there anything changed in the way RSelenium opens? I search for the error and I found only this but it doesn't

Setting proxy in RSelenium with PhantomJS

让人想犯罪 __ 提交于 2019-12-05 21:18:52
I'm using the RSelenium library with the argument browserName = "phantomjs" in the remoteDriver command, however I was looking to run a test where I specify the type of the proxy server. I've seen that proxy authentication is possible in, e.g. Java , with the code used shown here: ArrayList<String> cliArgsCap = new ArrayList<String>(); cliArgsCap.add("--proxy=address:port"); cliArgsCap.add("--proxy-auth=username:password"); cliArgsCap.add("--proxy-type=http"); DesiredCapabilities capabilities = DesiredCapabilities.phantomjs(); capabilities.setCapability( PhantomJSDriverService.PHANTOMJS_CLI

Run yaml file for parallel selenium test from R or python

爱⌒轻易说出口 提交于 2019-12-05 11:27:19
I have a simple yaml file: seleniumhub: image: selenium/hub ports: - 4444:4444 firefoxnode: image: selenium/node-firefox-debug ports: - 4577 links: - seleniumhub:hub chromenode: image: selenium/node-chrome-debug ports: - 4578 links: - seleniumhub:hub that I have executed in docker: docker-compose up -d I have one hub and two nodes running. Now I would like to run two very simple selenium commands in parallel (written in RSelenium): remDr$open() remDr$navigate("http://www.r-project.org") remDr$screenshot(display = TRUE) I would like to know how can I run above selenium commands in Python or R,

RSelenium error: NotConnectedException

亡梦爱人 提交于 2019-12-05 08:55:09
There are some questions similar to this one already asked in SO (Question 1) , (Question 2) , but none of those has received an answer (the last one has a relevant comment by @jdharrison directing the OP to file an issue). This is my problem: I used to have a very simple script to get some information from a website into R: startServer() rd<-remoteDriver(remoteServerAddr="localhost",port=4444,browserName="firefox") rd$open() rd$navigate(url) #with a defined url When I now try and run the script, after the rd$open() it does open a firefox window (which keeps blank for about 30 seconds), and

Parse HTML and Read HTML Table with Selenium Python

廉价感情. 提交于 2019-12-04 19:38:41
I am converting some of my web-scraping code from R to Python (I can't get geckodriver to work with R, but it's working with Python). Anyways, I am trying to understand how to parse and read HTML tables with Python. Quick background, here is my code for R: doc <- htmlParse(remDr$getPageSource()[[1]],ignoreBlanks=TRUE, replaceEntities = FALSE, trim=TRUE, encoding="UTF-8") WebElem <- readHTMLTable(doc, stringsAsFactors = FALSE)[[7]] I would parse the HTML page to the doc object. Then I would start with doc[[1]] , and move through higher numbers until I saw the data I wanted. In this case I got

RSelenium issue with startServer() on windows

只愿长相守 提交于 2019-12-04 17:00:32
I just installed RSelenium from github (I have the same issue when I install it via cran) and I get the following error in windows machine: Error in if (file.exists(file) == FALSE) if (!missing(asText) && asText == : argument is of length zero In addition: Warning message: running command '"wmic" path win32_process get Caption,Processid,Commandline /format:htable' had status 44210 From the function startServer() this is the part that is producing the error: system2("wmic", args = c("path win32_process get Caption,Processid,Commandline", "/format:htable"), stdout = TRUE, stderr = NULL) When I

RSelenium with Tor with NEW RSelenium version on Windows

和自甴很熟 提交于 2019-12-04 06:00:26
I found this fantastic answer by @jdharrison on how to launch Tor using RSelenium on windows: https://stackoverflow.com/a/39048970/7837376 In the new version of RSelenium , however, startServer() is defunct and its replacement rsDriver() does not take a java argument as startServer() did before. What is the way to launch Tor as above in firefox in the new RSelenium syntax? Thanks very much (in advance)! You can start the selenium server yourself instead of using rsDriver browserP <- "C:/Users/john/Desktop/Tor Browser/Browser/firefox.exe" jArg <- paste0("-Dwebdriver.firefox.bin=\"", browserP, "