Questions tagged [rselenium]

The goal of RSelenium is to make it easy to connect to a Selenium Server/ Remote Selenium Server from within R. RSelenium provides R bindings for the Selenium Webdriver API. Selenium is a project focused on automating web browsers. RSelenium allows you to carry out unit testing and regression testing on your webapps and webpages across a range of browser/OS combinations.

The goal of RSelenium is to make it easy to connect to a Selenium Server/ Remote Selenium Server from within R. RSelenium provides R bindings for the Selenium Webdriver API.

Selenium is a project focused on automating web browsers. See http://docs.seleniumhq.org/

RSelenium allows you to carry out unit testing and regression testing on your webapps and webpages across a range of browser/OS combinations. This allows us to integrate from within R testing and manipulation of popular projects such as shiny, sauceLabs.

Selenium Server is a standalone java program which allows you to run HTML test suites in a range of different browsers, plus extra options like reporting.

See vignette for more details- http://cran.r-project.org/web/packages/RSelenium/vignettes/RSelenium-basics.html

714 questions
4
votes
2 answers

RSelenium: Select option from dropdown

I use RSelenium to fill in a webform. To select an option from a dropdown I use the following: xpathoption <- paste0("//select[@id = '",samplepatient[p,'name'],"']/option[",samplepatient[p,'value'],"]") optionelem <- remDrv$findElement(using =…
Wietze314
  • 5,675
  • 1
  • 17
  • 35
4
votes
1 answer

Enable Adblocker Extension In Chrome Using RSelenium

I am scraping data in R from this page, http://finviz.com/screener.ashx?v=111&f=earningsdate_nextdays5 which displays popup ads. Those ads interfere with script so I'd like to enable the adblocker extension:…
mks212
  • 773
  • 1
  • 15
  • 35
4
votes
3 answers

Tor Browser with RSelenium in Linux/Windows

Looking to use RSelenium and Tor using my Linux machine to return the Tor IP (w/Firefox as Tor Browser). This is doable with Python, but having trouble with it in R. Can anybody get this to work? Perhaps you can share your solution in either Windows…
Bob Hopez
  • 745
  • 3
  • 9
  • 24
4
votes
2 answers

RSelenium - downloading a file with phantom.js

Using RSelenium I can download a file from a webpage using a connection via a Firefox browser with the following formula: csv = remDr$findElement(using = 'css selector', "a[ng-click*=download]") remDr$executeScript("arguments[0].click();",…
geotheory
  • 19,464
  • 21
  • 95
  • 172
4
votes
1 answer

rselenium | get the text of the webpage

Is there a way to get the plain Text from the remoteDriver in RSelenium? Somethink like: remDr$getPlainText() as equivalent to remDr$getPageSource(). Workarount: I managed to save phantomJS's plainText to a file as follows: require(RSelenium) …
Rentrop
  • 18,602
  • 6
  • 64
  • 93
4
votes
2 answers

Random sleeping time in RSelenium

In R selenium it is possible to set a time sleep like this: Sys.sleep(15) How is it possible to set a random time? In python it is like this: time.sleep(random.uniform(3.5,6.9))
Berbery
  • 287
  • 1
  • 3
  • 11
4
votes
1 answer

Rselenium command for "save link as"

(warning, Newbie, slowly learning R) Hi There, I'm trying to download data automatically from a website using R. The website is using sharepoint and after asking (R download from aspx in https getting website instead of CSV) someone pointed me to…
Pladiona
  • 93
  • 7
4
votes
2 answers

Using Selenium and Firefox version 40, how do i download a file?

The old methods of downloading a file via Selenium no longer seem to work. My code is: fp = webdriver.FirefoxProfile() fp.set_preference("browser.download.dir", os.getcwd()) fp.set_preference("browser.download.folderList", 2) …
Staunch
  • 259
  • 3
  • 12
4
votes
1 answer

Scraping Javascript in R with RSelenium

I'm attempting to scrape the Washington Post's database on police shootings. Since it's not html I can't use rvest, so instead I used RSelenium and phantomjs. library(RSelenium) checkForServer() startServer() eCap <- list(phantomjs.binary.path =…
tomw
  • 2,746
  • 3
  • 25
  • 44
4
votes
1 answer

Read values in dropdown menu element with RSelenium

I am using RSelenium to navigate to sites and interact with the elements. Question: using RSelenium, how can I read the list of options in a dropdown menu so that I can identify the latest month available and use that to set the dropdown to the…
SlowLearner
  • 7,485
  • 9
  • 41
  • 76
4
votes
0 answers

In R phantomJS ran with Rselenium hangs after several iterations

I'm using phantomJS to collect data from different sites. During data scrapping process I experience a lot of crashes when parsing sites or sites elements. Unfortunately nor phantomJS nor RSelenium don't provide any information or bag report in the…
4
votes
1 answer

Rselenium - Popup

I want to download a file from a website using RSelenium, with Firefox browser. I do everything correctly (navigate, select the correct element and write what I want); now I click the "download" button, then a firefox popup opens and ask me if I…
GrilloRob
  • 232
  • 1
  • 2
  • 15
3
votes
1 answer

Capture a captcha image

I am trying to scrape data from the Peruvian Electronic System for Government Procurement and Contracting (SEACE) (using RSelenium) and I have succeeded until I try to capture the URL from the Captcha image. The problem that I encounter is that the…
Enki
  • 31
  • 1
3
votes
2 answers

Running RSelenium with Opera

I am trying to use RSelenium with Opera (Version 72). I already downloaded the current version of the opera drivers from https://github.com/operasoftware/operachromiumdriver/releases. However, I am facing two problems which I did not figure out…
3
votes
1 answer

Rselenium: down_arrow not working in dropdown menus

It would be awesome if you could help me with the following: I am using Rselenium and Firefox to explore the following website: https://hcupnet.ahrq.gov/#setup I am stuck by not being able to scroll down on dropdown menus using the down_arrow, nor…
benjasast
  • 57
  • 4