From 581fbaa970a4e8d7b2319c304883283b7b0c6851 Mon Sep 17 00:00:00 2001 From: Ashby Thorpe Date: Fri, 3 Nov 2023 11:11:25 +0000 Subject: [PATCH] Don't run chromote tests if we aren't testing chromote --- R/utils.R | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/R/utils.R b/R/utils.R index ec2e68f8..e2fd9016 100644 --- a/R/utils.R +++ b/R/utils.R @@ -80,12 +80,14 @@ selenider_available <- function(session = c("chromote", "selenium"), online = TR } if (session == "chromote") { - is_installed("chromote") && tryCatch( - { - !is.null(suppressMessages(chromote::find_chrome())) - }, - error = function(e) FALSE - ) + Sys.getenv("SELENIDER_SESSION") %in% c("", "chromote") && + is_installed("chromote") && + tryCatch( + { + !is.null(suppressMessages(chromote::find_chrome())) + }, + error = function(e) FALSE + ) } else { rlang::is_installed("selenium") && !is.null(find_browser_and_version()$browser)