rselenium

rsDriver() in Rselenium doesn't work

末鹿安然 提交于 2019-12-12 20:01:50
问题 I have updated my r to latest version and I installed Rselenium again. I try to use rsDriver but it has a problem with port 4567. Same like this Error trace back: rd <-rsDriver(verbose =TRUE, browser = 'phantomjs', version = "3.4.0") checking Selenium Server versions: BEGIN: PREDOWNLOAD BEGIN: DOWNLOAD BEGIN: POSTDOWNLOAD checking chromedriver versions: BEGIN: PREDOWNLOAD BEGIN: DOWNLOAD BEGIN: POSTDOWNLOAD checking geckodriver versions: BEGIN: PREDOWNLOAD BEGIN: DOWNLOAD BEGIN: POSTDOWNLOAD

executeScript from RSelenium gives error with args

隐身守侯 提交于 2019-12-12 18:49:37
问题 I try to reproduce an example code from here Here is the code: library("RSelenium") #start RSelenium server rD <- rsDriver(verbose = FALSE) remDr <- rD$client remDr$open() remDr$navigate("http://www.google.com/ncr") script <- "return document.getElementById('hplogo').hidden;" remDr$executeScript(script, args = list()) and for the last line I receive this error: Selenium message:unknown error: 'args' must be a list (Session info: chrome=60.0.3112.113) (Driver info: chromedriver=2.32.498550

Latest version of RSelenium and Firefox

我与影子孤独终老i 提交于 2019-12-12 17:06:25
问题 When I try to open the RSelenium I receive this error [1] "Connecting to remote server" Error: Summary: UnknownError Detail: An unknown server-side error occurred while processing the command. class: org.openqa.selenium.firefox.NotConnectedException The version of Firefox I have is Firefox version: 480b10 According to this I tried to update the server version library("RSelenium") startServer() unlink(system.file("bin", package = "RSelenium"), recursive = T) checkForServer(update = TRUE) remDr

Using Rselenium on mac sierra

ぐ巨炮叔叔 提交于 2019-12-12 10:19:48
问题 It seems that every time I update my OS, R, or any browsers Rselenium stops working. I can no longer use it with any browser -Firefox, Chrome, or PhantomJS. I've posted my code below. Session Info: sessionInfo() R version 3.3.2 (2016-10-31) Platform: x86_64-apple-darwin13.4.0 (64-bit) Running under: macOS Sierra 10.12.2 locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached

Setting proxy in RSelenium with PhantomJS

北战南征 提交于 2019-12-12 09:48:20
问题 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

RSelenium: Setting makeFirefoxProfile for Mac OS X to download files without asking

醉酒当歌 提交于 2019-12-12 09:17:24
问题 How should I set RSelenium Firefox profile under Mac OS X? I tried to replicate this code (for Windows) but Firefox keeps showing me the download popup. require(RSelenium) my_firefox_profile <- makeFirefoxProfile( list(browser.download.dir = "~/Downloads/tmp", browser.download.folderList = "2", browser.download.manager.showWhenStarting = "false", browser.helperApps.neverAsk.saveToDisk = "text/csv/xls")) RSelenium::startServer() remDr <- remoteDriver(extraCapabilities = my_firefox_profile)

session not created: This version of ChromeDriver only supports Chrome version 74 error with ChromeDriver Chrome using Selenium

随声附和 提交于 2019-12-11 16:54:26
问题 I'm trying to run RSelenium using the rsDriver function, but when I run rD <- rsDriver() I get a message telling me I need a newer version of Chrome: > rD <- rsDriver() checking Selenium Server versions: BEGIN: PREDOWNLOAD BEGIN: DOWNLOAD BEGIN: POSTDOWNLOAD checking chromedriver versions: BEGIN: PREDOWNLOAD BEGIN: DOWNLOAD BEGIN: POSTDOWNLOAD checking geckodriver versions: BEGIN: PREDOWNLOAD BEGIN: DOWNLOAD BEGIN: POSTDOWNLOAD checking phantomjs versions: BEGIN: PREDOWNLOAD BEGIN: DOWNLOAD

Getting RSelenium Error: “Failed to decode response from marionette”

此生再无相见时 提交于 2019-12-11 16:07:42
问题 I'm relatively new to R (and brand spanking new to scraping with R), so apologies in advance if I'm overlooking something obvious here! I've been trying to learn how to scrape with RSelenium by following this tutorial: https://rawgit.com/petrkeil/Blog/master/2017_08_15_Web_scraping/web_scraping.html#advanced-scraping-with-rselenium After running the following in Terminal (docker run -d -p 4445:4444 selenium/standalone-firefox), I tried to run the R code below, pulled with only slight

Speed up web scraping using multiplie Rselenium browsers

核能气质少年 提交于 2019-12-11 15:46:54
问题 I am using Rselenium to scrap following website: http://plovila.pomorstvo.hr/ Every time I have to enter 'NIB' field, execute and scrap all data. I am using Sys.time() function several time so my code is slow (cca 12 seconds for one NIB). I need to scrap around 200.000 NIB numbers which gives 30 days of scraping. I am interested if I can open multiple browsers locally or somehow in the cloud and make my scraping script faster. Is it possible to use parallel computing to overcome this issue?

How to release a keypress in Rselenium

戏子无情 提交于 2019-12-11 12:23:05
问题 I tried to press control key successfully with: rD <- rsDriver (browser = 'chrome',chromever = "latest",port = 4445L) chrome_client <-rD$client chrome_client$sendKeysToActiveElement(list(key = "control")) But the problem is that I can't release this key, so it creates a new tab if I click another link. I searched on google and stackoverflow, but found no solutions for Rselenium yet. 回答1: It's not in documentation, but I tried to press control again, and another press released the keypress.