Description Usage Arguments Details Value Examples
Phantomjs is a headless browser, it provide automated control of a web page in an environment similar to web browsers, but via a command-line. It's able to render and understand HTML the same way a regular browser would, including styling elements such as page layout, colors, font selection and execution of JavaScript and AJAX which are usually not available when using GET request methods.
1 | run_browser(debugLevel = "DEBUG", timeout = 5000)
|
debugLevel |
debug level, possible values: 'INFO', 'ERROR', 'WARN', 'DEBUG' |
timeout |
How long to wait (in milliseconds) for the webdriver connection to be established to the phantomjs process. |
This function will throw an error if webdriver(phantomjs) cannot be found, or cannot be started. It works with a timeout of five seconds.
If you got the forllwing error, this means that your operating system or antivirus is bloking the webdriver (phantom.js) process, try to disable your antivirus temporarily or adjust your system configuration to allow phantomjs and processx executable (browser_path to know where phantomjs is located). Error in supervisor_start() : processx supervisor was not ready after 5 seconds.
A list of callr::process
object, and
port
, the local port where phantom is running.
1 2 3 4 5 6 7 8 9 | ## Not run:
#If driver is not installed yet then
install_browser()
br<-run_browser()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.