rselenium

RSelenium with Tor with NEW RSelenium version on Windows

你说的曾经没有我的故事 提交于 2019-12-21 11:45:10
问题 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)! 回答1: You can start the selenium server yourself instead of using rsDriver browserP <- "C:

Rselenium - Popup

浪子不回头ぞ 提交于 2019-12-21 05:29:08
问题 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 want to download the file or "open with..." something else. Unfortunately I cannot write an example due to privacy constraints. My question is: how can I switch to the popup window / alert and click "OK" when needed? I tried the following methods with

Scraping data from TripAdvisor using R

不羁岁月 提交于 2019-12-20 12:40:40
问题 I want to create a crawler that will scrape some data from Trip Advisor. Ideally, it will (a) identify the links to all locations to crawl, (b) collect links to all attractions in each location and (c) will collect the destination names, dates and ratings for all reviews. I'd like to focus on part (a) for now. Here is the website I'm starting off with: http://www.tripadvisor.co.nz/Tourism-g255104-New_Zealand-Vacations.html There is problem here: the link gives top 10 destinations to begin

Scraping data from TripAdvisor using R

末鹿安然 提交于 2019-12-20 12:40:04
问题 I want to create a crawler that will scrape some data from Trip Advisor. Ideally, it will (a) identify the links to all locations to crawl, (b) collect links to all attractions in each location and (c) will collect the destination names, dates and ratings for all reviews. I'd like to focus on part (a) for now. Here is the website I'm starting off with: http://www.tripadvisor.co.nz/Tourism-g255104-New_Zealand-Vacations.html There is problem here: the link gives top 10 destinations to begin

RSelenium: hangs in navigate to direct pdf download

爷,独闯天下 提交于 2019-12-20 05:33:08
问题 Using RSelenium via Docker Toolbox for Windows with selenium/standalone-firefox-debug container - all working fine: docker run -d -v //c/test/://home/seluser/Downloads -p 4445:4444 -p 5901:5900 selenium/standalone-firefox-debug Have setup firefox profile to download pdf directly: fprof <- makeFirefoxProfile(list(browser.startup.homepage = "about:blank" , startup.homepage_override_url = "about:blank" , startup.homepage_welcome_url = "about:blank" , startup.homepage_welcome_url.additional =

How can I scrape data from a website within a frame using R?

早过忘川 提交于 2019-12-20 04:18:09
问题 The following link contains the results of the marathon of Paris: http://www.schneiderelectricparismarathon.com/us/the-race/results/results-marathon. I want to scrape these results, but the information lies within a frame. I know the basics of scraping with Rvest and Rselenium, but I am clueless on how to retrieve the data within such a frame. To get an idea, one of the things I tried was: url = "http://www.schneiderelectricparismarathon.com/us/the-race/results/results-marathon" site = read

Scrolling page in RSelenium

跟風遠走 提交于 2019-12-17 23:08:06
问题 How can I manually scroll to the bottom (or top) of a page with the RSelenium WebDriver? I have an element that only becomes available when it is visible on the page. 回答1: Assuming you got library(RSelenium) startServer() remDr <- remoteDriver() remDr$open() remDr$setWindowSize(width = 800, height = 300) remDr$navigate("https://www.r-project.org/about.html") You could scroll to the buttom like this: webElem <- remDr$findElement("css", "body") webElem$sendKeysToElement(list(key = "end")) And

RSelenium UnknownError - java.lang.IllegalStateException with Google Chrome

孤街醉人 提交于 2019-12-17 19:04:25
问题 I am running the following script based on the RSelenium Basics CRAN page: library(RSelenium) startServer(args = c("-port 4455"), log = FALSE, invisible = FALSE) remDr <- remoteDriver(browserName = "chrome") remDr$open() This produces the following error: Exception in thread "main" java.net.BindException: Selenium is already running on port 4444. Or some other service is. at org.openqa.selenium.server.SeleniumServer.start(SeleniumServer.java:492) at org.openqa.selenium.server.SeleniumServer

scraping table with R using RSelenium

限于喜欢 提交于 2019-12-13 21:38:56
问题 I want to scrape a table like this (click on search then you will get a table of partners). I'd want to scrape the partner names. The problem is I don't know what kind of a table that is nor how to scrape it. I am using RSelenium package. If it can be done using rvest then it would be much helpful. So what kind of a table is this, is it possible to scrape it with RSelenium or rvest and if so, how? ul="http://partnerlocator.symantec.com" remDr$navigate(ul) webElem<-remDr$findElement(using =

Page Scrolling Using RSelenium

旧巷老猫 提交于 2019-12-13 18:43:39
问题 I understand how to sendKeysToElement() if you need RSelenium to scroll to the Top or Bottom of a web page based on this post. However, does anyone know how to scroll down a page in order to expose elements which are neither located at the top or bottom but somewhere in the middle of the page? 来源: https://stackoverflow.com/questions/34251014/page-scrolling-using-rselenium