diff --git a/R/lazy_list.R b/R/lazy_list.R index 856bc2a4..f1bbc5c6 100644 --- a/R/lazy_list.R +++ b/R/lazy_list.R @@ -527,9 +527,7 @@ element_in_eager <- function(x, l, .f) { } length.lazy_list <- function(x) { - print(x$current_value$get()) result <- length(coro::collect(x$instance$get())) + x$current_value$get() - print(result) x$current_value$set(result) result } diff --git a/R/print.R b/R/print.R index 50e2aa28..ad824a62 100644 --- a/R/print.R +++ b/R/print.R @@ -135,7 +135,7 @@ outer_html <- function(x, session, driver) { execute_js_fn_on( "x => x.outerHTML", x, - session = x$session, + session = session, driver = driver ) } @@ -151,4 +151,3 @@ encode_with_width <- function(x, width) { x[truncate_encoded] <- paste(substr(x[truncate_encoded], 1L, width - 3L), "...") x } - diff --git a/tests/testthat/_snaps/print.md b/tests/testthat/_snaps/print.md index 30564329..abce26f9 100644 --- a/tests/testthat/_snaps/print.md +++ b/tests/testthat/_snaps/print.md @@ -33,28 +33,11 @@ --- Code - print(ss("*"), width = 80) + print(elem_children(s(".actions-test")), width = 80, n = 3) Output - { selenider_elements (107) } - [1]
\n\n ... - [3] - [4] - [5] - [6] - [8]