{"id":2477,"date":"2023-10-30T17:26:55","date_gmt":"2023-10-30T17:26:55","guid":{"rendered":"https:\/\/rahulshettyacademy.com\/blog\/?p=2477"},"modified":"2023-10-30T17:34:32","modified_gmt":"2023-10-30T17:34:32","slug":"how-to-setup-selenium-webdriver-in-eclipse-ide","status":"publish","type":"post","link":"https:\/\/rahulshettyacademy.com\/blog\/index.php\/2023\/10\/30\/how-to-setup-selenium-webdriver-in-eclipse-ide\/","title":{"rendered":"How To setup Selenium Webdriver in Eclipse IDE"},"content":{"rendered":"\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained\">\n<p><b>What you will Learn in this blog:<\/b><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Install Java runtime environment on Windows<\/li>\n\n\n\n<li>Set Java home path in System variables<\/li>\n\n\n\n<li>Go to the command prompt to check if java is set properly<\/li>\n\n\n\n<li>Install Eclipse IDE<\/li>\n\n\n\n<li>Create new Maven project in eclipse<\/li>\n\n\n\n<li>Give knowledge of \u2018Selenium\u2019 maven dependency in pom xml<\/li>\n\n\n\n<li>Give knowledge of \u2018WebdriverManager\u2019 dependency to manage different browser types<\/li>\n\n\n\n<li>Write and execute Selenium test<\/li>\n<\/ul>\n\n\n\n<p><b><u>Install Java runtime environment on Windows <\/u><\/b><\/p>\n\n\n\n<p>First we have to setup Java runtime environment on our local system so that we can run selenium tests on this java base.<\/p>\n\n\n\n<p>So let us google \u2018jdk download\u2019 as seen below<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/rahulshettyacademy.com\/blog\/wp-content\/uploads\/2023\/10\/Picture-1.png\" alt=\"\" title=\"Picture 1\"\/><\/figure>\n\n\n\n<p>Click the first link that you see above<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/rahulshettyacademy.com\/blog\/wp-content\/uploads\/2023\/10\/Picture-2.png\" alt=\"\" title=\"Picture 2\"\/><\/figure>\n\n\n\n<p>We should always download the \u2018latest <b>long-term<\/b> support\u2019 version, here JDK 21. You might see a different \u2018latest <b>long-term<\/b> support\u2019 version when you are about to download the JDK, so you should go ahead and download that version.<\/p>\n\n\n\n<p>So as can be seen below, we have clicked JDK 21. We have further clicked \u2018Windows\u2019 tab<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/rahulshettyacademy.com\/blog\/wp-content\/uploads\/2023\/10\/Picture-3.png\" alt=\"\" title=\"Picture 3\"\/><\/figure>\n\n\n\n<p>Click \u2018<strong><em>x64 MSI Installer<\/em><\/strong>\u2019 link to download the msi installer<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/rahulshettyacademy.com\/blog\/wp-content\/uploads\/2023\/10\/Picture-4.png\" alt=\"\" title=\"Picture 4\"\/><\/figure>\n\n\n\n<p>To install JDK, double click the msi file and follow the instructions<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/rahulshettyacademy.com\/blog\/wp-content\/uploads\/2023\/10\/Picture-5.png\" alt=\"\" title=\"Picture 5\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/rahulshettyacademy.com\/blog\/wp-content\/uploads\/2023\/10\/Picture-6.png\" alt=\"\" title=\"Picture 6\"\/><\/figure>\n\n\n\n<p>Click \u2018Next\u2019 and click \u2018Yes\u2019 on the windows admin popup that you might get.<\/p>\n\n\n\n<p>Notice below that JDK 21 is successfully installed<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/rahulshettyacademy.com\/blog\/wp-content\/uploads\/2023\/10\/Picture-7.png\" alt=\"\" title=\"Picture 7\"\/><\/figure>\n\n\n\n<p>Click Close<\/p>\n\n\n\n<p><strong><u>Set Java home path in System variables<\/u><\/strong><\/p>\n\n\n\n<p>Next, we have to set the java home path inside \u2018System variables\u2019.<\/p>\n\n\n\n<p>To do that, let us go to the path where \u2018Java\u2019 got installed in our local machine<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/rahulshettyacademy.com\/blog\/wp-content\/uploads\/2023\/10\/Picture-8.png\" alt=\"\" title=\"Picture 8\"\/><\/figure>\n\n\n\n<p>Go inside this folder. This is the home path of our \u2018Java\u2019<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/rahulshettyacademy.com\/blog\/wp-content\/uploads\/2023\/10\/Picture-9.png\" alt=\"\" title=\"Picture 9\"\/><\/figure>\n\n\n\n<p>Copy this \u2018Java\u2019 home path.<\/p>\n\n\n\n<p>In the windows search bar, type \u2018<em>edit the<\/em>\u2019, you will see \u2018<em>Edit the system environment variables<\/em>\u2019 option as shown below<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/rahulshettyacademy.com\/blog\/wp-content\/uploads\/2023\/10\/Picture-10.png\" alt=\"\" title=\"Picture 10\"\/><\/figure>\n\n\n\n<p>Click \u2018<em>Edit the system environment variables<\/em>\u2019. The below pop-up comes up<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/rahulshettyacademy.com\/blog\/wp-content\/uploads\/2023\/10\/Picture-11.png\" alt=\"\" title=\"Picture 11\"\/><\/figure>\n\n\n\n<p>Click \u2018Environment Variables\u2019, the below window comes up<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/rahulshettyacademy.com\/blog\/wp-content\/uploads\/2023\/10\/Picture-12.png\" alt=\"\" title=\"Picture 12\"\/><\/figure>\n\n\n\n<p>If JAVA_HOME system variable is already set in your machine, than simply edit this variable by clicking \u2018Edit\u2019. Paste the new java home path<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/rahulshettyacademy.com\/blog\/wp-content\/uploads\/2023\/10\/Picture-13.png\" alt=\"\" title=\"Picture 13\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/rahulshettyacademy.com\/blog\/wp-content\/uploads\/2023\/10\/Picture-14.png\" alt=\"\" title=\"Picture 14\"\/><\/figure>\n\n\n\n<p>Click OK.<\/p>\n\n\n\n<p>You can now see the latest JDK path<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/rahulshettyacademy.com\/blog\/wp-content\/uploads\/2023\/10\/Picture-15.png\" alt=\"\" title=\"Picture 15\"\/><\/figure>\n\n\n\n<p>The below popup comes up.<\/p>\n\n\n\n<p>Enter \u2018variable name\u2019 and \u2018variable value\u2019 as shown below<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/rahulshettyacademy.com\/blog\/wp-content\/uploads\/2023\/10\/Picture-16.png\" alt=\"\" title=\"Picture 16\"\/><\/figure>\n\n\n\n<p>Click OK. The variable gets created<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/rahulshettyacademy.com\/blog\/wp-content\/uploads\/2023\/10\/Picture-17.png\" alt=\"\" title=\"Picture 17\"\/><\/figure>\n\n\n\n<p>Next, you can see \u2018bin\u2019 folder inside jdk-21<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/rahulshettyacademy.com\/blog\/wp-content\/uploads\/2023\/10\/Picture-18.png\" alt=\"\" title=\"Picture 18\"\/><\/figure>\n\n\n\n<p>Go inside the bin directory<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/rahulshettyacademy.com\/blog\/wp-content\/uploads\/2023\/10\/Picture-19.png\" alt=\"\" title=\"Picture 19\"\/><\/figure>\n\n\n\n<p>Copy the above bin directory path.<\/p>\n\n\n\n<p>Next, you can see \u2018Path\u2019 variable as shown below<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/rahulshettyacademy.com\/blog\/wp-content\/uploads\/2023\/10\/Picture-20.png\" alt=\"\" title=\"Picture 20\"\/><\/figure>\n\n\n\n<p>Click \u2018Edit\u2019, the below popup comes up.<\/p>\n\n\n\n<p>Next, if you already have the \u2018bin\u2019 directory path (as shown below), than simply select it<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/rahulshettyacademy.com\/blog\/wp-content\/uploads\/2023\/10\/Picture-21.png\" alt=\"\" title=\"Picture 21\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/rahulshettyacademy.com\/blog\/wp-content\/uploads\/2023\/10\/Picture-22.png\" alt=\"\" title=\"Picture 22\"\/><\/figure>\n\n\n\n<p>Click Edit and paste the \u2018bin\u2019 path as shown below<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/rahulshettyacademy.com\/blog\/wp-content\/uploads\/2023\/10\/Picture-23.png\" alt=\"\" title=\"Picture 23\"\/><\/figure>\n\n\n\n<p>So we can see<\/p>\n\n\n\n<p>If you don\u2019t have the bin path, you can simply click \u2018New\u2019 to create one<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/rahulshettyacademy.com\/blog\/wp-content\/uploads\/2023\/10\/Picture-24.png\" alt=\"\" title=\"Picture 24\"\/><\/figure>\n\n\n\n<p>Click OK to close all the windows.<\/p>\n\n\n\n<p>The reason we have to set the jdk and bin path in environment variables is because, when you start working with eclipse editor, by default, it does not know the place where Java is sitting in your system. However, when we set the variables, the eclipse can than refer the path of Java software from system variables.<\/p>\n\n\n\n<p><strong><u>Go to the command prompt to check if java is set properly<\/u><\/strong><\/p>\n\n\n\n<p>Open the command prompt and execute \u2018<em>where java<\/em>\u2019 command as shown below. This would show you the path of java installation in your machine. Make sure you have java installed at only one location<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/rahulshettyacademy.com\/blog\/wp-content\/uploads\/2023\/10\/Picture-25.png\" alt=\"\" title=\"Picture 25\"\/><\/figure>\n\n\n\n<p>Next, execute \u2018<em>java -version<\/em>\u2019 command. Notice below that we can see version 21 installed in our machine<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/rahulshettyacademy.com\/blog\/wp-content\/uploads\/2023\/10\/Picture-26.png\" alt=\"\" title=\"Picture 26\"\/><\/figure>\n\n\n\n<p>So this is way we setup java software in windows machine.<\/p>\n\n\n\n<p><strong><u>Install Eclipse IDE<\/u><\/strong><\/p>\n\n\n\n<p>Eclipse is the editor where we write our selenium code.<\/p>\n\n\n\n<p>Google search \u2018<em>eclipse download<\/em>\u2019<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/rahulshettyacademy.com\/blog\/wp-content\/uploads\/2023\/10\/Picture-27.png\" alt=\"\" title=\"Picture 27\"\/><\/figure>\n\n\n\n<p>Click the first link <a href=\"https:\/\/www.eclipse.org\/downloads\/\" target=\"_blank\" rel=\"noopener\">https:\/\/www.eclipse.org\/downloads\/<\/a><\/p>\n\n\n\n<p>As can be seen below, we see \u2018<em>Download Packages<\/em>\u2019 link<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/rahulshettyacademy.com\/blog\/wp-content\/uploads\/2023\/10\/Picture-28.png\" alt=\"\" title=\"Picture 28\"\/><\/figure>\n\n\n\n<p>Click \u2018<em>Download Packages<\/em>\u2019 link. Look for \u2018<em>Eclipse IDE for Java Developers\u2019<\/em> as shown below<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/rahulshettyacademy.com\/blog\/wp-content\/uploads\/2023\/10\/Picture-29.png\" alt=\"\" title=\"Picture 29\"\/><\/figure>\n\n\n\n<p>For windows machine, click \u2018<em>Windows x86_64\u2019<\/em> link (shown above) to download the windows version<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/rahulshettyacademy.com\/blog\/wp-content\/uploads\/2023\/10\/Picture-30.png\" alt=\"\" title=\"Picture 30\"\/><\/figure>\n\n\n\n<p>Click \u2018Download\u2019 to download the zip file<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/rahulshettyacademy.com\/blog\/wp-content\/uploads\/2023\/10\/Picture-31.png\" alt=\"\" title=\"Picture 31\"\/><\/figure>\n\n\n\n<p>Unzip the version. One unzipped, go inside the folder, you would see \u2018eclipse\u2019 application launcher<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/rahulshettyacademy.com\/blog\/wp-content\/uploads\/2023\/10\/Picture-32.png\" alt=\"\" title=\"Picture 32\"\/><\/figure>\n\n\n\n<p>Double click \u2018eclipse\u2019 to launch the application<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/rahulshettyacademy.com\/blog\/wp-content\/uploads\/2023\/10\/Picture-33.png\" alt=\"\" title=\"Picture 33\"\/><\/figure>\n\n\n\n<p>We will be asked to select the workspace viz the place we would like to create the selenium-java script folders.<\/p>\n\n\n\n<p>By default, eclipse provides us a path as shown below<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/rahulshettyacademy.com\/blog\/wp-content\/uploads\/2023\/10\/Picture-34.png\" alt=\"\" title=\"Picture 34\"\/><\/figure>\n\n\n\n<p>You can keep the default workspace or change the workspace name as shown below<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/rahulshettyacademy.com\/blog\/wp-content\/uploads\/2023\/10\/Picture-35.png\" alt=\"\" title=\"Picture 35\"\/><\/figure>\n\n\n\n<p>Click Launch<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/rahulshettyacademy.com\/blog\/wp-content\/uploads\/2023\/10\/Picture-36.png\" alt=\"\" title=\"Picture 36\"\/><\/figure>\n\n\n\n<p>The below is the first look of the eclipse editor \u2018Welcome screen\u2019<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/rahulshettyacademy.com\/blog\/wp-content\/uploads\/2023\/10\/Picture-37.png\" alt=\"\" title=\"Picture 37\"\/><\/figure>\n\n\n\n<p>Close the \u2018Welcome\u2019 screen, you will land at below screen<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/rahulshettyacademy.com\/blog\/wp-content\/uploads\/2023\/10\/Picture-38.png\" alt=\"\" title=\"Picture 38\"\/><\/figure>\n\n\n\n<p><strong><u>Create new Maven project in eclipse<\/u><\/strong><\/p>\n\n\n\n<p>Let us now create a new \u2018Maven\u2019 project in eclipse.<\/p>\n\n\n\n<p>Open Eclipse IDE &gt; File &gt; New &gt; \u2018Maven Project\u2019<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/rahulshettyacademy.com\/blog\/wp-content\/uploads\/2023\/10\/Picture-39.png\" alt=\"\" title=\"Picture 39\"\/><\/figure>\n\n\n\n<p>The below window comes up<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/rahulshettyacademy.com\/blog\/wp-content\/uploads\/2023\/10\/Picture-40.png\" alt=\"\" title=\"Picture 40\"\/><\/figure>\n\n\n\n<p>Select \u2018<em>Create a simple project<\/em>\u2019 option shown above<\/p>\n\n\n\n<p>Click Next, the below popup comes up<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/rahulshettyacademy.com\/blog\/wp-content\/uploads\/2023\/10\/Picture-41.png\" alt=\"\" title=\"Picture 41\"\/><\/figure>\n\n\n\n<p>Write any \u2018Group Id\u2019 and \u2018Artifact Id\u2019<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/rahulshettyacademy.com\/blog\/wp-content\/uploads\/2023\/10\/Picture-42.png\" alt=\"\" title=\"Picture 42\"\/><\/figure>\n\n\n\n<p>See below diagram, you can see \u2018<strong>M<\/strong>\u2019 that represents maven project<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/rahulshettyacademy.com\/blog\/wp-content\/uploads\/2023\/10\/Picture-43.png\" alt=\"\" title=\"Picture 43\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/rahulshettyacademy.com\/blog\/wp-content\/uploads\/2023\/10\/Picture-44.png\" alt=\"\" title=\"Picture 44\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/rahulshettyacademy.com\/blog\/wp-content\/uploads\/2023\/10\/Picture-45.png\" alt=\"\" title=\"Picture 45\"\/><\/figure>\n\n\n\n<p><strong>Give knowledge of \u2018Selenium\u2019 maven dependency in pom xml<\/strong><\/p>\n\n\n\n<p>Right now our project does not have any knowledge of Selenium. So let us see how to add selenium knowledge to our maven project so that we can run selenium scripts.<\/p>\n\n\n\n<p>Let us open the pom.xml and add \u2018dependencies\u2019 tag<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/rahulshettyacademy.com\/blog\/wp-content\/uploads\/2023\/10\/Picture-46.png\" alt=\"\" title=\"Picture 46\"\/><\/figure>\n\n\n\n<p>Launch <a href=\"https:\/\/mvnrepository.com\/\" target=\"_blank\" rel=\"noopener\">https:\/\/mvnrepository.com\/<\/a> and search \u2018selenium\u2019<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/rahulshettyacademy.com\/blog\/wp-content\/uploads\/2023\/10\/Picture-47.png\" alt=\"\" title=\"Picture 47\"\/><\/figure>\n\n\n\n<p>Since we are interested in \u2018selenium-java\u2019 library, let us click \u2018Selenium Java\u2019 link.<\/p>\n\n\n\n<p>The latest stable version shown below is 4.13.0<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/rahulshettyacademy.com\/blog\/wp-content\/uploads\/2023\/10\/Picture-48.png\" alt=\"\" title=\"Picture 48\"\/><\/figure>\n\n\n\n<p>Copy the dependency and paste it in pom.xml dependencies<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/rahulshettyacademy.com\/blog\/wp-content\/uploads\/2023\/10\/Picture-49.png\" alt=\"\" title=\"Picture 49\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/rahulshettyacademy.com\/blog\/wp-content\/uploads\/2023\/10\/Picture-50.png\" alt=\"\" title=\"Picture 50\"\/><\/figure>\n\n\n\n<p>Save the xml to automatically download all the selenium dependencies into our project.<\/p>\n\n\n\n<p>Once save operation is completed, \u2018<em>Maven Dependencies<\/em>\u2019 folder gets created automatically<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/rahulshettyacademy.com\/blog\/wp-content\/uploads\/2023\/10\/Picture-51.png\" alt=\"\" title=\"Picture 51\"\/><\/figure>\n\n\n\n<p>This folder contains all the Selenium jars as shown below<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/rahulshettyacademy.com\/blog\/wp-content\/uploads\/2023\/10\/Picture-52.png\" alt=\"\" title=\"Picture 52\"\/><\/figure>\n\n\n\n<p>You might see 2 errors in the xml file (see errors on line#1 and 3)<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/rahulshettyacademy.com\/blog\/wp-content\/uploads\/2023\/10\/Picture-53.png\" alt=\"\" title=\"Picture 53\"\/><\/figure>\n\n\n\n<p>To remove these errors, simply change <strong><em>https<\/em><\/strong> to <strong><em>http<\/em><\/strong> in line#3. The error gets removed automatically. Save the xml once more<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/rahulshettyacademy.com\/blog\/wp-content\/uploads\/2023\/10\/Picture-54.png\" alt=\"\" title=\"Picture 54\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/rahulshettyacademy.com\/blog\/wp-content\/uploads\/2023\/10\/Picture-55.png\" alt=\"\" title=\"Picture 55\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/rahulshettyacademy.com\/blog\/wp-content\/uploads\/2023\/10\/Picture-56.png\" alt=\"\" title=\"Picture 56\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/rahulshettyacademy.com\/blog\/wp-content\/uploads\/2023\/10\/Picture-57.png\" alt=\"\" title=\"Picture 57\"\/><\/figure>\n\n\n\n<p><strong>Give knowledge of \u2018WebdriverManager\u2019 dependency to manage different browser types<\/strong><\/p>\n\n\n\n<p>By adding <em>WebdriverManager<\/em> dependency, we can execute our selenium tests on different browser types (viz chrome, firefox etc\u2026.). Thus the advantage is, we do not have to download the different browsers\u2019 executables manually.<\/p>\n\n\n\n<p>Let us again go to maven repository <a href=\"https:\/\/mvnrepository.com\/search?q=WebdriverManager\" target=\"_blank\" rel=\"noopener\">https:\/\/mvnrepository.com\/search?q=WebdriverManager<\/a><\/p>\n\n\n\n<p>Ensure that you take the below library from io.github<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/rahulshettyacademy.com\/blog\/wp-content\/uploads\/2023\/10\/Picture-58.png\" alt=\"\" title=\"Picture 58\"\/><\/figure>\n\n\n\n<p><strong><u>Write and execute Selenium test <\/u><\/strong><\/p>\n\n\n\n<p>Let us now create and execute a Selenium test to launch a website<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/rahulshettyacademy.com\/blog\/wp-content\/uploads\/2023\/10\/Picture-59.png\" alt=\"\" title=\"Picture 59\"\/><\/figure>\n\n\n\n<p>Notice above that with the help of WebdriverManager, we are able to setup firefox browser very easily.<\/p>\n\n\n\n<p>Run the code to launch the website on a firefox browser<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/rahulshettyacademy.com\/blog\/wp-content\/uploads\/2023\/10\/Picture-60.png\" alt=\"\" title=\"Picture 60\"\/><\/figure>\n\n\n\n<p>So we have successfully setup selenium in our eclipse IDE.<\/p>\n\n\n\n<p>Thank you for reading!<\/p>\n<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>What you will Learn in this blog: Install Java runtime environment on Windows First we have to setup Java runtime environment on our local system so that we can run selenium tests on this java base. So let us google \u2018jdk download\u2019 as seen below Click the first link that you see above We should [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1282,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2477","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","post-wrapper","thrv_wrapper"],"_links":{"self":[{"href":"https:\/\/rahulshettyacademy.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/2477","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rahulshettyacademy.com\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rahulshettyacademy.com\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rahulshettyacademy.com\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rahulshettyacademy.com\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=2477"}],"version-history":[{"count":15,"href":"https:\/\/rahulshettyacademy.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/2477\/revisions"}],"predecessor-version":[{"id":2552,"href":"https:\/\/rahulshettyacademy.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/2477\/revisions\/2552"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/rahulshettyacademy.com\/blog\/index.php\/wp-json\/wp\/v2\/media\/1282"}],"wp:attachment":[{"href":"https:\/\/rahulshettyacademy.com\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=2477"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rahulshettyacademy.com\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=2477"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rahulshettyacademy.com\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=2477"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}