boB Rudis
4 years ago
31 changed files with 43 additions and 11 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,27 @@ |
|||
library(htmlunitjars) |
|||
|
|||
browsers <- J("com.gargoylesoftware.htmlunit.BrowserVersion") |
|||
|
|||
expect_equal(browsers$class$toString(), "class com.gargoylesoftware.htmlunit.BrowserVersion") |
|||
|
|||
wc <- new(J("com.gargoylesoftware.htmlunit.WebClient"), browsers$CHROME) |
|||
|
|||
expect_true(wc$isJavaScriptEnabled()) |
|||
|
|||
invisible(wc$waitForBackgroundJavaScriptStartingBefore(.jlong(2000L))) |
|||
|
|||
wc_opts <- wc$getOptions() |
|||
|
|||
prox <- wc_opts$getProxyConfig() |
|||
|
|||
expect_equal(prox$getProxyPort(), 0) |
|||
|
|||
wc_opts$setThrowExceptionOnFailingStatusCode(FALSE) |
|||
wc_opts$setThrowExceptionOnScriptError(FALSE) |
|||
|
|||
test_url <- "https://hrbrmstr.github.io/htmlunitjars/index.html" |
|||
|
|||
pg <- wc$getPage(test_url) |
|||
|
|||
expect_equal(pg$getTitleText(), "") |
|||
|
@ -1,2 +0,0 @@ |
|||
library(testthat) |
|||
test_check("htmlunitjars") |
@ -1,4 +0,0 @@ |
|||
context("basic functionality") |
|||
test_that("we can do something", { |
|||
|
|||
}) |
@ -0,0 +1,5 @@ |
|||
|
|||
if ( requireNamespace("tinytest", quietly=TRUE) ){ |
|||
tinytest::test_package("htmlunitjars") |
|||
} |
|||
|
Loading…
Reference in new issue