"deselecting preselected values only works on chrome >= 16"
"return arguments[0] == 'fish' ? 'fish' : 'not fish';"
"arguments[0]['flibble'] = arguments[0].getAttribute('id');
  return arguments[0]['flibble'];"

key <- sprintf("key_%d", as.integer(runif(1) * 10000000))
remDr$executeScript("document.cookie = arguments[0] + '=set';", list(key))
cookie[vapply(cookie, "[[", character(1), "name") == key][[1]][["value"]],
key1 <- sprintf("key_%d", as.integer(runif(1) * 10000000))
key2 <- sprintf("key_%d", as.integer(runif(1) * 10000000))
remDr$addCookie(name = key1, value = "value")
remDr$addCookie(name = key2, value = "value")
remDr$addCookie(name = cookieOneName, value = "cod")
remDr$addCookie(name = paste0(cookieOneName, "x"), value = "earth")

"document.cookie = arguments[0] + '=set';"

result <- remDr$executeScript("return ['zero', 'one', 'two']")
expectedResult <- list("zero", "one", "two")
result <- remDr$executeScript("return ['zero', [true, false]]")
expectedResult <- list("zero", list(TRUE, FALSE))
remDr$executeScript("return squiggle()", retry = FALSE)
"return arguments[0] == 'fish' ? 'fish' : 'not fish'",
"return arguments[0] == 1 ? true : false",
jS <- "arguments[0]['flibble'] = arguments[0].getAttribute('id');
array <- list("zerohero", 1, TRUE, 3.14159)
value <- remDr$executeScript("return ' '")
res <- remDr$executeScript("return arguments[0] === null", list(NA))

"return arguments[0] == 'fish' ? 'fish' : 'not fish'"
"return arguments[0] == 1 ? true : false"
"arguments[0]['flibble'] = arguments[0].getAttribute('id');
  return arguments[0]['flibble']"
"var1 = document.getElementById('id1');
                  return [var1, [var1, [var1, var1]]]"

prefs <- list("profile.managed_default_content_settings.images" = 2L)
cprof <- list(chromeOptions = list(prefs = prefs))
init2 <- initFun(silent = FALSE, extraCapabilities = cprof)

expect_identical(options[["selected"]], c(TRUE, FALSE, FALSE, FALSE))
exT <- c("One", "Two", "Four", "Still learning how to count, apparently")

"Still learning how to count, apparently"