Selenium Junit maven – 可能存在的依赖错误?

huangapple go评论85阅读模式
英文:

Selenium Junit maven - vulnerable dependency error?

问题

Normally I use a windows computer and these settings are working for me well without problem. But I am currently using MacBook pro (intel i9) and getting this error. I can't able to work junit. Can anyone help me please?

When I try to run a basic test getting errors Webdriver doesn't work.

英文:

Normally I use a windows computer and these settings are working for me well without problem. But I am currently using MacBook pro (intel i9) and getting this error. I can't able to work junit. Can anyone help me please?

Selenium Junit maven – 可能存在的依赖错误?

When I try to run a basic test getting errors Webdriver doesn't work.
Selenium Junit maven – 可能存在的依赖错误?

答案1

得分: 1

如果您在控制台中看到以下错误:

  1. 警告:无效的状态码=403 文本=禁止
  2. java.io.IOException: 无效的状态码=403 文本=禁止

那么只需将您的 POM 文件中的 Selenium 版本从 v4.8.1 更改为 v4.8.3

  1. <dependency>
  2. <groupId>org.seleniumhq.selenium</groupId>
  3. <artifactId>selenium-java</artifactId>
  4. <version>4.8.3</version>
  5. </dependency>
英文:

If below is the error you see in your console:

  1. WARNING: Invalid Status code=403 text=Forbidden
  2. java.io.IOException: Invalid Status code=403 text=Forbidden

Then just change the selenium version from v4.8.1 to v4.8.3 in your POM.

  1. &lt;dependency&gt;
  2. &lt;groupId&gt;org.seleniumhq.selenium&lt;/groupId&gt;
  3. &lt;artifactId&gt;selenium-java&lt;/artifactId&gt;
  4. &lt;version&gt;4.8.3&lt;/version&gt;
  5. &lt;/dependency&gt;

huangapple
  • 本文由 发表于 2023年4月13日 18:02:38
  • 转载请务必保留本文链接:https://go.coder-hub.com/76004158.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定