Error in `checkError(res)`: Undefined error in httr call. httr output: Could not connect to server [localhost]:
Failed to connect to localhost port 4444 after 0 ms: Could not connect to server

script <- "window.alert = function(msg) {
if (identical(rdBrowser, "chrome")) skip("Not chrome")
if (identical("chrome", rdBrowser)) skip("Not chrome")
expect_equal("This is a default value", alertTxt)

"window.alert = function(msg) {
  document.getElementById('text').innerHTML = msg;}"

findElementText <- remDr$findElement(using = "xpath", "//h1")$
findElementText <- remDr$findElement(using = "xpath", "//h4")$
elems <- remDr$findElements(using = "xpath", "//option")
elem <- remDr$findElement(using = "name", "windowOne")
elem <- remDr$findElement(using = "name", "form2")
childElem <- elem$findChildElement(using = "name", "selectomatic")
elem <- remDr$findElement(using = "name", "div1")
childElem <- elem$findChildElement(using = "link text", "hello world")
childElem <- elem$findChildElement(using = "id", "2")
childElem <- elem$findChildElement(using = "xpath", "select")
childElem <- elem$findChildElement(using = "xpath", "div")
elems <- remDr$findElements(using = "tag name", "div")
num_by_xpath <- length(remDr$findElements(using = "xpath", "//div"))
elems <- remDr$findElements(using = "tag name", "iframe")
elems <- remDr$findElement(using = "id", "multiline")$
findChildElements(using = "tag name", "p")
elem <- remDr$findElement(using = "link text", "Open new window")
#         wait.until(lambda dr: dr.switch_to_window("result") is None)
# close window and switch back to first one
elem <- remDr$findElement(using = "xpath", "//input[@id='working']")
elem <- remDr$findElement(using = "xpath", "//input[@id='notWorking']")
return("deselecting preselected values only works on chrome >= 16")
elem <- remDr$findElement(using = "id", "multi")
option_elems <- elem$findChildElements(using = "xpath", "option")
expect_equal("We Leave From Here", remDr$getTitle()[[1]])
attr <- remDr$findElement(using = "id", "id1")$
jS <- "return arguments[0] == 'fish' ? 'fish' : 'not fish';"
button <- remDr$findElement(using = "id", "plainButton")
appScript <- "arguments[0]['flibble'] = arguments[0].getAttribute('id');
elem <- remDr$findElement(using = "partial link text", "new window")
visible <- remDr$findElement(using = "id", "displayed")$
not_visible <- remDr$findElement(using = "id", "hidden")$
if (rdBrowser == "android" || rdBrowser == "safari") {
# note can't test 0,0 since some OS's dont allow that location
# On headless docker container the below doesnt make sense
#   size <- remDr$navigate(loadPage("blank")) %>%
#   new_size <- remDr %>% maximizeWindow %>%