0

I creating automation project using selenium and java.I want to use VS code for coding.I facing problem to add driver in this project directory. Please give steps to add drivers in my project.

I tried with webdriver manager dependency but got errors , so i want to use drivers locally.

Somanath
  • 3
  • 2
  • I have no idea why you would want to use VS Code for Java development; I would honestly say just use IntelliJ IDEA Community Edition, it has powerful functionality and debugging out of the box. – BernardV Jul 19 '23 at 07:01
  • Thanks for suggestion. I was using Eclipse IDE but my team is already using VSC so i need to go with team.I will explore and use IntelliJ IDEA. – Somanath Jul 19 '23 at 07:06

1 Answers1

0

If you are using Selenium v4.6.0 or above, you don't need to worry about adding browser drivers locally. Selenium can download it for you and can handle the drivers. No need of System.setProperty nor WebDriverManager.

Your code can be as simple as:

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

Refer this : https://stackoverflow.com/a/76463081/7598774

Shawn
  • 4,064
  • 2
  • 11
  • 23