shadow-class {shadowr}R Documentation

CLASS shadow

Description

Selenium plugin to manage multiple levels of shadow elements on web page. Returning a RSelenium::WebElement which you can access like you used to.

Usage

find_element(shadowObject, css_selector, element)

## S4 method for signature 'shadow,character,missing'
find_element(shadowObject, css_selector, element)

## S4 method for signature 'shadow,character,webElement'
find_element(shadowObject, css_selector, element)

find_elements(shadowObject, css_selector, element)

## S4 method for signature 'shadow,character,missing'
find_elements(shadowObject, css_selector, element)

## S4 method for signature 'shadow,character,webElement'
find_elements(shadowObject, css_selector, element)

get_shadow_element(shadowObject, css_selector, element)

## S4 method for signature 'shadow,character,webElement'
get_shadow_element(shadowObject, css_selector, element)

get_all_shadow_element(shadowObject, css_selector, element)

## S4 method for signature 'shadow,character,webElement'
get_all_shadow_element(shadowObject, css_selector, element)

get_parent_element(shadowObject, element)

## S4 method for signature 'shadow,webElement'
get_parent_element(shadowObject, element)

get_sibling_element(shadowObject, element, css_selector)

## S4 method for signature 'shadow,webElement,character'
get_sibling_element(shadowObject, element, css_selector)

get_previous_sibling_element(shadowObject, element)

## S4 method for signature 'shadow,webElement'
get_previous_sibling_element(shadowObject, element)

get_next_sibling_element(shadowObject, element)

## S4 method for signature 'shadow,webElement'
get_next_sibling_element(shadowObject, element)

scroll_to(shadowObject, element)

## S4 method for signature 'shadow,webElement'
scroll_to(shadowObject, element)

is_checked(shadowObject, element)

## S4 method for signature 'shadow,webElement'
is_checked(shadowObject, element)

is_disabled(shadowObject, element)

## S4 method for signature 'shadow,webElement'
is_disabled(shadowObject, element)

is_visible(shadowObject, element)

## S4 method for signature 'shadow,webElement'
is_visible(shadowObject, element)

Arguments

shadowObject

the shadow class

css_selector

selector string to find a web element

element

a web element

Value

Depends on the method, either a RSelenium::WebElement or a boolean.

Functions

Slots

driver

The shadow class takes a Remote Driver

javascript_library

the selenium plugin

See Also

https://github.com/ricilandolt/shadowr for examples

Examples

## Not run: 
library(shadowr)
library(RSelenium)
remDr <- RSelenium::remoteDriver(
remoteServerAddr = "host.docker.internal",
port = 4445 , browser = "chrome")
remDr$open(silent = TRUE)
remDr$navigate(url)
shadow_rd <- shadow(remDr)
element <- find_element(shadow_rd, 'paper-tab[title="Settings"]')
elements <- find_elements(shadow_rd, 'paper-tab[title="Settings"]')
element$getElementText()
library(shadowr)
library(RSelenium)
remDr <- RSelenium::remoteDriver(
remoteServerAddr = "host.docker.internal",
port = 4445 , browser = "chrome")
remDr$open(silent = TRUE)
remDr$navigate(url)
shadow_rd <- shadow(remDr)
element <- find_element(shadow_rd, 'input[title="The name of the employee"]')
elements <- find_elements(shadow_rd, 'input[title="The name of the employee"]')
element$getElementText()
library(shadowr)
library(RSelenium)
remDr <- RSelenium::remoteDriver(
 remoteServerAddr = "host.docker.internal",
port = 4445 , browser = "chrome")
remDr$open(silent = TRUE)
remDr$navigate(url)
shadow_rd <- shadow(remDr)
element <- find_element(shadow_rd, "properties-page#settingsPage>textarea#textarea")
element$getElementText()
## End(Not run)

[Package shadowr version 0.0.2 Index]