Skip to content

Commit

Permalink
Merge branch 'main' into selenium
Browse files Browse the repository at this point in the history
  • Loading branch information
ashbythorpe committed Nov 3, 2023
2 parents a30aed2 + 7ebfd14 commit c01dd4d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
8 changes: 4 additions & 4 deletions R/global_actions.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ open_url <- function(url, session = NULL) {
driver <- session$driver

if (session$session == "chromote") {
promise <- driver$Page$loadEventFired(wait_ = FALSE)
promise <- driver$Page$loadEventFired(wait_ = FALSE, timeout_ = 60)
driver$Page$navigate(url, wait_ = FALSE)
driver$wait_for(promise)
} else {
Expand Down Expand Up @@ -96,7 +96,7 @@ back <- function(session = NULL) {
if (index > 1) {
new_id <- history[[index - 1]]$id

promise <- driver$Page$loadEventFired(wait_ = FALSE)
promise <- driver$Page$loadEventFired(wait_ = FALSE, timeout_ = 60)
driver$Page$navigateToHistoryEntry(new_id, wait_ = FALSE)
driver$wait_for(promise)
} else {
Expand Down Expand Up @@ -130,7 +130,7 @@ forward <- function(session = NULL) {
if (index < length(history)) {
new_id <- history[[index + 1]]$id

promise <- driver$Page$loadEventFired(wait_ = FALSE)
promise <- driver$Page$loadEventFired(wait_ = FALSE, timeout_ = 60)
driver$Page$navigateToHistoryEntry(new_id, wait_ = FALSE)
driver$wait_for(promise)
} else {
Expand Down Expand Up @@ -179,7 +179,7 @@ reload <- function(session = NULL) {
driver <- session$driver

if (session$session == "chromote") {
promise <- driver$Page$loadEventFired(wait_ = FALSE)
promise <- driver$Page$loadEventFired(wait_ = FALSE, timeout_ = 60)
session$driver$Page$reload(wait_ = FALSE)
driver$wait_for(promise)
} else {
Expand Down
3 changes: 1 addition & 2 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,7 @@ selenider_available <- function(session = c("chromote", "selenium"), online = TR
if (session == "chromote") {
is_installed("chromote") && tryCatch(
{
chromote::find_chrome()
TRUE
!is.null(suppressMessages(chromote::find_chrome()))
},
error = function(e) FALSE
)
Expand Down
3 changes: 3 additions & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ url: https://ashbythorpe.github.io/selenider/
template:
bootstrap: 5

development:
mode: auto

reference:
- title: Start a session
- contents:
Expand Down

0 comments on commit c01dd4d

Please sign in to comment.