Description Usage Arguments Details Detail Value Examples
Defunct. Please use rsDriver
or phantomjs
1 |
pjs_cmd |
The name, full or partial path of a phantomjs executable. This is optional only state if the executable is not in your path. |
port |
An integer giving the port on which phantomjs will listen. Defaults to 4444. format [[<IP>:]<PORT>] |
extras |
An optional character vector: see 'Details'. |
... |
Arguments to pass to |
phantom
A utility function to control a phantomjs binary in webdriver mode.
phantom() is used to start a phantomjs binary in webdriver mode. This can be used to drive a phantomjs binary on a machine without selenium server. Argument extras can be used to specify optional extra command line arguments see http://phantomjs.org/api/command-line.html
phantom() returns a list with two functions:
returns the process id of the phantomjs binary running in webdriver mode.
terminates the phantomjs binary running in webdriver mode
using pskill
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ## Not run:
pJS <- phantom()
# note we are running here without a selenium server phantomjs is
# listening on port 4444
# in webdriver mode
remDr <- remoteDriver(browserName = "phantomjs")
remDr$open()
remDr$navigate("http://www.google.com/ncr")
remDr$screenshot(display = TRUE)
webElem <- remDr$findElement("name", "q")
webElem$sendKeysToElement(list("HELLO WORLD"))
remDr$screenshot(display = TRUE)
remDr$close()
# note remDr$closeServer() is not called here. We stop the phantomjs
# binary using
pJS$stop()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.