You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用Selenium Driver无法登录Chrome浏览器的问题求助

Selenium Driver无法登录Chrome浏览器的问题求助

大家好,我最近试着用Selenium在Chrome浏览器上实现谷歌账号登录操作,结果碰上个棘手的问题——账号一直登不进去,页面弹出了这样的错误提示:

Couldn’t sign you in
This browser or app may not be secure. Learn more
Try using a different browser. If you’re already using a supported browser, you can try again to sign in.

我使用的Java代码如下:

System.setProperty("web.driver.chrome.driver", "C:\\Program Files\\BraveSoftware\\Brave-Browser\\Application\\brave.exe");   

WebDriver driver = new ChromeDriver();
driver.get("https://accounts.google.com");

driver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);

driver.findElement(By.id("identifierId")).sendKeys(email);

driver.findElement(By.xpath("//*[@id='identifierNext']/div/button/span")).click();

driver.findElement(By.name("Passwd")).sendKeys(password);

driver.findElement(By.xpath("//*[@id='passwordNext']/div/button/span")).click();

有没有大佬能帮我看看问题出在哪,该怎么解决呀?

备注:内容来源于stack exchange,提问作者Marius Carchilan

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.15 09:24:35