Installing RSelenium

package-installation

#1

install.packages("Rselenium")
Warning in install.packages :
package ‘Rselenium’ is not available (for R version 3.4.1)

this is the error i get in installing Rselenium. Kindly help


Setting up Rselenium
#2

I believe Rselenium was removed from CRAN earlier this year. Instead, the package can be installed from github using the following:

# install --init only
devtools::install_github("johndharrison/binman")
devtools::install_github("johndharrison/wdman")
devtools::install_github("ropensci/RSelenium")

# load  (use require instead of library)
require(RSelenium)

#3

devtools::install_github("ropensci/RSelenium")
Downloading GitHub repo ropensci/RSelenium@master
from URL https://api.github.com/repos/ropensci/RSelenium/zipball/master
Installing RSelenium
Installing 1 package: caTools
Installation failed: unknown input format
Installing 1 package: XML
source repository is unavailable to check versions
Installation failed: unknown input format
"C:/Users/akaushal/DOCUME~1/R/R-34~1.1/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD
INSTALL "C:/Users/akaushal/AppData/Local/Temp/RtmpAHUsOA/devtools54c05c8a6655/ropensci-RSelenium-088db87"
--library="C:/Users/akaushal/Documents/R/R-3.4.1/library" --install-tests

ERROR: dependencies 'XML', 'caTools' are not available for package 'RSelenium'

  • removing 'C:/Users/akaushal/Documents/R/R-3.4.1/library/RSelenium'
    Installation failed: Command failed (1)

require(RSelenium)
Loading required package: RSelenium
Warning message:
In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called ‘RSelenium’

this is the error i am getting


#4

Looks like you are missing a few dependencies. Try installing the packages XML and caTools manually before installing RSelenium.

install.packages(c("XML","caTools"))

#5

trying . R is downloading Selenium


#6

RSelenium was installed.But require command not working

require(RSelenium)
Loading required package: RSelenium

this is taking too much of time to load required package. is it normal ?


#7

stuck on that only

Loading required package: RSelenium

nothing happening,,tried retarting R


#8

Loading RSelenium does seem to be "longer than expected", but this may depend on your local specs. What's the timing look like? Does it take a a second longer than other packages or is it much longer?

Other option is to run microbenchmark on require(Rselenium) (see example below). Depending on the results, it might be worth making a separate post in order to diagnose the issue.

# pkgs
library(tidyverse)
library(microbenchmark)

# set seed
set.seed(321)

# performance testing: run require(RSelenium) 1000 times (results are in milliseconds)
rselenium.load.times <- microbenchmark::microbenchmark(
    require(RSelenium),
    times = 1000
)
#> Loading required package: RSelenium

# assign trials to new object
rselenium.trials <- data.frame(
    num = seq(1:1000),
    time = rselenium.load.times$time,
    stringsAsFactors = F
)

# autoplot function
autoplot.microbenchmark(rselenium.load.times)
#> Coordinate system already present. Adding new coordinate system, which will replace the existing one.


# plot individual trials
ggplot(data = rselenium.trials, aes(x = num, y = time)) +
    geom_point() +
    theme_minimal()

Created on 2018-07-24 by the reprex
package
(v0.2.0).


#9

the package is not getting loaded..its stuck on

Loading required package: RSelenium

Nothing is happening after this, and as a result, i am not able to use Rselenium features. none of them as the library hasn't been called yet


#10

At what part are you stuck at? Is RSelenium failing to install or are you working on benchmarking? In an earlier reply, you mentioned that:

What there load times? Were you experiencing a short delay or a long delay? (where short delay = "barely noticeable"; long delay = "enough time to start another task or respond to an email").

Apologies if there was any confusion on the microbenchmarking. I was hesitant about writing about this, but I thought it would be useful for assessing load times if you were experiencing anything more than a "slight delay" (and wanting some data to look at). I would ignore this section.

If you experiencing a slow load times, try reinstalling the packages. The ropensci/rselenium issues page might be of use as well.

I hope this helps.


#11

image

refer to the image,nothing happens after the line " Loading required package: Rselenium"

package has been installed but i cant import the library Rselenium


#12

Sorry, I was completely overthinking this issue. RSelenium is installed and loaded into your local environment. At this point, you are ready to start a selenium server and browser. The following pages should help you get started (see the example at the bottom of the page).

https://ropensci.github.io/RSelenium/reference/rsDriver.html

http://rpubs.com/johndharrison/RSelenium-Basics


#13

does it mean that i need not load the library into R ?

because still my command is not working..

require(Rselenium)

this command is still stuck on - Loading required package:Rselenium


#14

What makes you think the command is stuck? In your screenshot, there is a prompt with a cursor below the Loading required package: RSelenium line. That usually means that the package has finished loading. There isn't necessarily any other feedback (it depends on the package). The return value from require() does not print to the console.

By the way, it's generally better to use library() if you're not actually examining the return value from require(). Although in this case, if you want to convince yourself that RSelenium has loaded, you could try this:

if(require("RSelenium")) print("Package `RSelenium` loaded successfully!")

#16

2 posts were merged into an existing topic: Setting up Rselenium