-
-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How htmlunit supports ES6 ? #767
Comments
<dependency>
<groupId>net.sourceforge.htmlunit</groupId>
<artifactId>htmlunit</artifactId>
<version>2.60.0</version>
<scope>test</scope>
</dependency> package cloud.xuxiaowei.passport.oauth;
import com.gargoylesoftware.htmlunit.WebClient;
import com.gargoylesoftware.htmlunit.html.DomNode;
import com.gargoylesoftware.htmlunit.html.HtmlPage;
import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.Test;
import java.io.IOException;
import static org.junit.jupiter.api.Assertions.assertNotNull;
@Slf4j
class AuthorizationCodeTests {
@Test
void start() throws IOException {
try (WebClient webClient = new WebClient();) {
webClient.getOptions().setJavaScriptEnabled(true);
webClient.getOptions().setUseInsecureSSL(true);
HtmlPage page = webClient.getPage("https://xxw.ac.cn");
DomNode input = page.querySelector("input");
assertNotNull(input);
}
}
} |
<dependency>
<groupId>org.htmlunit</groupId>
<artifactId>htmlunit</artifactId>
<version>4.0.0</version>
<scope>test</scope>
</dependency> package cloud.xuxiaowei.passport.oauth;
import lombok.extern.slf4j.Slf4j;
import org.htmlunit.WebClient;
import org.htmlunit.html.DomNode;
import org.htmlunit.html.HtmlPage;
import org.junit.jupiter.api.Test;
import java.io.IOException;
import static org.junit.jupiter.api.Assertions.assertNotNull;
@Slf4j
class AuthorizationCodeTests {
@Test
void start() throws IOException {
try (WebClient webClient = new WebClient();) {
webClient.getOptions().setJavaScriptEnabled(true);
webClient.getOptions().setUseInsecureSSL(true);
HtmlPage page = webClient.getPage("https://xxw.ac.cn");
DomNode input = page.querySelector("input");
assertNotNull(input);
}
}
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The project I created using Vue/vite/TS cannot load external JS.
The text was updated successfully, but these errors were encountered: