RSelenium
RSelenium copied to clipboard
selectInput test doesn't work for me
Hi, I'm trying to set up tests for my Shiny app with your package, but not all examples work for me. For instance now I can't use selectInput text. Even example you have doesn't work.
test_dir(paste0(find.package("RSelenium"), "/apps/shinytestapp/tests/"), reporter = "Tap", filter = "selectinput")
1..3
# Context controls
not ok 1 selectInput dataSet correct
Summary: NoSuchElement
Detail: An element could not be located on the page using the given search parameters.
class: org.openqa.selenium.NoSuchElementException
1: withCallingHandlers(eval(code, new_test_environment), error = capture_calls)
2: eval(code, new_test_environment)
3: eval(expr, envir, enclos)
4: remDr$findElement("css selector", "#ctrlSelect1") at test-selectinput.r:20
5: queryRD(paste0(serverURL, "/session/", sessionInfo$id, "/element"), "POST", qdata = toJSON(list(using = using, value = value)), json = TRUE)
6: checkStatus()
7: stop(errMessage, call. = FALSE)
not ok 2 selectInput label correct
Summary: NoSuchElement
Detail: An element could not be located on the page using the given search parameters.
class: org.openqa.selenium.NoSuchElementException
1: withCallingHandlers(eval(code, new_test_environment), error = capture_calls)
2: eval(code, new_test_environment)
3: eval(expr, envir, enclos)
4: remDr$findElement("css selector", "#reqcontrols label[for = 'dataset']") at test-selectinput.r:39
5: queryRD(paste0(serverURL, "/session/", sessionInfo$id, "/element"), "POST", qdata = toJSON(list(using = using, value = value)), json = TRUE)
6: checkStatus()
7: stop(errMessage, call. = FALSE)
not ok 3 selectInput selection invokes change
Summary: NoSuchElement
Detail: An element could not be located on the page using the given search parameters.
class: org.openqa.selenium.NoSuchElementException
1: withCallingHandlers(eval(code, new_test_environment), error = capture_calls)
2: eval(code, new_test_environment)
3: eval(expr, envir, enclos)
4: remDr$findElement("css selector", "#reqcontrols #dataset") at test-selectinput.r:45
5: queryRD(paste0(serverURL, "/session/", sessionInfo$id, "/element"), "POST", qdata = toJSON(list(using = using, value = value)), json = TRUE)
6: checkStatus()
7: stop(errMessage, call. = FALSE)
Session info ----------------------------------------------------------------------------------
setting value
version R version 3.1.3 (2015-03-09)
system x86_64, linux-gnu
ui RStudio (0.99.435)
language en_GB:en
collate en_GB.UTF-8
tz <NA>
Packages -------------------------------------------------------------------------------------
package * version date source
akima * 0.5-11 2013-09-16 CRAN (R 3.1.2)
assertthat 0.1 2013-12-06 CRAN (R 3.1.2)
bitops * 1.0-6 2013-08-17 CRAN (R 3.1.2)
caTools 1.17.1 2014-09-10 CRAN (R 3.1.2)
DBI * 0.3.1 2014-09-24 CRAN (R 3.1.2)
devtools * 1.8.0 2015-05-09 CRAN (R 3.1.3)
digest 0.6.8 2014-12-31 CRAN (R 3.1.2)
dplyr 0.4.1 2015-01-14 CRAN (R 3.1.2)
evaluate 0.5.5 2014-04-29 CRAN (R 3.1.2)
formatR 1.0 2014-08-25 CRAN (R 3.1.2)
git2r 0.10.1 2015-05-07 CRAN (R 3.1.3)
httr 0.6.1 2015-01-01 CRAN (R 3.1.2)
knitr 1.9 2015-01-20 CRAN (R 3.1.2)
logging * 0.7-103 2013-04-12 CRAN (R 3.1.2)
lubridate * 1.3.3 2013-12-31 CRAN (R 3.1.2)
magrittr 1.5 2014-11-22 CRAN (R 3.1.2)
memoise 0.2.1 2014-04-22 CRAN (R 3.1.2)
plyr 1.8.2 2015-04-21 CRAN (R 3.1.3)
Rcpp 0.11.6 2015-05-01 CRAN (R 3.1.3)
RCurl * 1.95-4.6 2015-04-24 CRAN (R 3.1.3)
RJSONIO * 1.3-0 2014-07-28 CRAN (R 3.1.2)
RPostgreSQL * 0.4 2013-03-27 CRAN (R 3.1.2)
RSelenium * 1.3.6 2015-05-14 Github (ropensci/RSelenium@9238704)
rstudioapi 0.2 2014-12-31 CRAN (R 3.1.2)
rversions 1.0.0 2015-04-22 CRAN (R 3.1.3)
stringi 0.4-1 2014-12-14 CRAN (R 3.1.2)
stringr 1.0.0 2015-04-30 CRAN (R 3.1.3)
testthat * 0.9.1 2014-10-01 CRAN (R 3.1.3)
XML * 3.98-1.1 2013-06-20 CRAN (R 3.1.3)
Is there any obvious reason for this?