https://github.com/MilesMcBain/chradle
A bare bones #rstats test harness for Chrome/Chromium
https://github.com/MilesMcBain/chradle
Last synced: 5 months ago
JSON representation
A bare bones #rstats test harness for Chrome/Chromium
- Host: GitHub
- URL: https://github.com/MilesMcBain/chradle
- Owner: MilesMcBain
- License: other
- Created: 2018-09-05T04:31:24.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-09-26T04:29:11.000Z (about 7 years ago)
- Last Synced: 2025-07-07T02:06:48.002Z (5 months ago)
- Language: R
- Size: 15.6 KB
- Stars: 8
- Watchers: 4
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - MilesMcBain/chradle - A bare bones #rstats test harness for Chrome/Chromium (R)
README
---
output: github_document
---
```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
[](https://www.tidyverse.org/lifecycle/#experimental)
# chradle
A simple test harness for Chromium/Chrome, drive-able from R using a websocket connection.
It started out as an R6 class but all the asyc/promise craziness got to be too
hard in that context, so now it's just a library of functions.
## Installation
``` r
devtools::install_github("milesmcbain/chradle")
```
## Example
```{r example, eval = FALSE}
library(chradle)
library(magrittr)
test_session <-
chr_init(url = "http://localhost:8080",
debug_port = 9222,
bin = "chromium-browser",
block_on_message_pattern = "r2vr-message-router",
incomming_debug = TRUE)
session_state <-
chr_call(test_session, get_attributes(id = "block",
attribute = "material"))
session_state
chr_kill(test_session)
chr_clean()
```