From 9fc377f070c1c7478ded711331ad0d60bbb95c58 Mon Sep 17 00:00:00 2001 From: Yutousama <583819556@qq.com> Date: Sat, 18 Mar 2023 13:41:47 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E6=9B=B4=E6=96=B0selenium=E7=89=88?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 7 ++++++- src/main/java/com/yutou/qqbot/utlis/WebClient.java | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) 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");