In this video will see how to overcome the problem of version mismatch between browser driver(e.g chromedriver,firefoxdriver etc) and browsers(e.g chrome,firefox etc.). This we will solve it by using WebDriverManager Class in our maven project. If you are not using maven project you can add the jar file of WebDriverManager class to your project. Details steps has been shown in below video:
Below is the video to fix when added maven dependency does not reflect:
I hope you like this video. For any questions, suggestions or appreciation please contact us at: https://programmerworld.co/contact/ or email at: programmerworld1990@gmail.com
Code:
public class WebDriverManagerDemo {
public static void main(String[] args) {
WebDriverManager.firefoxdriver().setup();
WebDriver driver = new FirefoxDriver();
driver.get("https://programmerworld.co/");
}
}
Excerpt:
In the provided video content, viewers are taught how to address the issue of version mismatches between web browser drivers (like chromedriver and firefoxdriver) and the browsers themselves (such as Chrome and Firefox). The solution presented involves using the WebDriverManager Class in a Maven project. For those not utilizing Maven, the video demonstrates how to manually add the WebDriverManager Class jar file to their project. The video also offers a guide for fixing problems when Maven dependencies do not update as expected. The code snippet features a practical example where the WebDriverManager is used to set up the FirefoxDriver, and then navigate to the programmerworld.co website. Viewers are encouraged to reach out with questions, suggestions, or feedback through the provided contact information.