diff --git a/pom.xml b/pom.xml index 58dab18..aecc6ec 100644 --- a/pom.xml +++ b/pom.xml @@ -98,7 +98,12 @@ org.seleniumhq.selenium selenium-remote-driver - 4.7.1 + 4.8.1 + + + org.seleniumhq.selenium + selenium-http-jdk-client + 4.8.1 diff --git a/src/main/java/com/yutou/qqbot/utlis/WebClient.java b/src/main/java/com/yutou/qqbot/utlis/WebClient.java index efb68fc..9fa27ff 100644 --- a/src/main/java/com/yutou/qqbot/utlis/WebClient.java +++ b/src/main/java/com/yutou/qqbot/utlis/WebClient.java @@ -37,6 +37,7 @@ public class WebClient { } private WebClient() { + //System.setProperty("webdriver.http.factory", "jdk-http-client"); System.setProperty("webdriver.chrome.driver", ConfigTools.load(ConfigTools.CONFIG, "chrome", String.class)); // System.setProperty("webdriver.chrome.whitelistedIps", ""); @@ -84,6 +85,7 @@ public class WebClient { public ChromeOptions getOptions() { ChromeOptions options = new ChromeOptions(); + options.addArguments("--remote-allow-origins=*"); // options.addArguments("--disable-gpu"); // options.addArguments("blink-settings=imagesEnabled=false"); String headless = RedisTools.get("chromedrive_headless");