From ca1b06f1681192ed33399c8d7d16bc316a9b003e Mon Sep 17 00:00:00 2001 From: ashbythorpe <61390103+ashbythorpe@users.noreply.github.com> Date: Sat, 25 Nov 2023 18:22:23 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20ashbytho?= =?UTF-8?q?rpe/selenider@2bc85ca27d4f6a5a78907626b9cc3b2a92af96f2=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dev/articles/unit-testing.html | 8 ++++---- dev/pkgdown.yml | 2 +- dev/search.json | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dev/articles/unit-testing.html b/dev/articles/unit-testing.html index 71e401a0..aab6b479 100644 --- a/dev/articles/unit-testing.html +++ b/dev/articles/unit-testing.html @@ -198,16 +198,16 @@
Note the difference in styles: while in selenider you must specify tests explicitly, shinytest2 uses a snapshot-based approach (specifying diff --git a/dev/pkgdown.yml b/dev/pkgdown.yml index bc7a0ca3..5dcd725d 100644 --- a/dev/pkgdown.yml +++ b/dev/pkgdown.yml @@ -6,7 +6,7 @@ articles: selenider: selenider.html unit-testing: unit-testing.html with-rvest: with-rvest.html -last_built: 2023-11-25T18:17Z +last_built: 2023-11-25T18:21Z urls: reference: https://ashbythorpe.github.io/selenider/reference article: https://ashbythorpe.github.io/selenider/articles diff --git a/dev/search.json b/dev/search.json index 5c2753b8..14118be4 100644 --- a/dev/search.json +++ b/dev/search.json @@ -1 +1 @@ -[{"path":"https://ashbythorpe.github.io/selenider/dev/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"MIT License","title":"MIT License","text":"Copyright (c) 2023 selenider authors Permission hereby granted, free charge, person obtaining copy software associated documentation files (“Software”), deal Software without restriction, including without limitation rights use, copy, modify, merge, publish, distribute, sublicense, /sell copies Software, permit persons Software furnished , subject following conditions: copyright notice permission notice shall included copies substantial portions Software. SOFTWARE PROVIDED “”, WITHOUT WARRANTY KIND, EXPRESS IMPLIED, INCLUDING LIMITED WARRANTIES MERCHANTABILITY, FITNESS PARTICULAR PURPOSE NONINFRINGEMENT. EVENT SHALL AUTHORS COPYRIGHT HOLDERS LIABLE CLAIM, DAMAGES LIABILITY, WHETHER ACTION CONTRACT, TORT OTHERWISE, ARISING , CONNECTION SOFTWARE USE DEALINGS SOFTWARE.","code":""},{"path":"https://ashbythorpe.github.io/selenider/dev/articles/selenider.html","id":"starting-the-session","dir":"Articles","previous_headings":"","what":"Starting the session","title":"Getting started with selenider","text":"use selenider, must first start session selenider_session(). don’t , done automatically , may want change options defaults (backend, example). , use chromote backend (default), set timeout 10 seconds (default 4). session, created, set local session inside current environment, meaning case, can accessed anywhere script, closed automatically script finishes running. One thing remember start session inside function, closed automatically function finishes running. want use session outside function, need use .env argument. example, let’s say want wrapper function around selenider_session() always uses selenium: Use open_url() navigate website. selenider also provides back() forward() functions easily navigate search history, reload() function reload current page.","code":"session <- selenider_session( \"chromote\", timeout = 10 ) # Bad (unless you only need to use the session inside the function) my_selenider_session <- function(...) { selenider_session(\"selenium\", ...) # The session will be closed here } # Good - the session will be open in the caller environment/function my_selenider_session <- function(..., .env = rlang::caller_env()) { selenider_session(\"selenium\", ..., .env = .env) } open_url(\"https://www.r-project.org/\") open_url(\"https://www.tidyverse.org/\") back() forward() reload()"},{"path":"https://ashbythorpe.github.io/selenider/dev/articles/selenider.html","id":"selecting-elements","dir":"Articles","previous_headings":"","what":"Selecting elements","title":"Getting started with selenider","text":"Use s() select element. default, CSS selectors used, options available. example, XPath can used instead. XPaths can useful complex selectors, limited selecting ancestors current element. However, can difficult read. Use ss() select multiple elements. Use find_element() find_elements() find child elements existing element. can chained pipe operator (|>) specify paths elements. Just like s() ss(), variety selector types available, CSS selectors used default. Use elem_children() friends find elements using relative position another. can use elem_filter() elem_find() filter collections elements using custom function. elem_find() returns first matching element, elem_filter() returns matching elements. functions use interface elem_expect(): see “Expectations” section .","code":"header <- s(\"#rStudioHeader\") header #> { selenider_element } #>