Skip to content

Latest commit

 

History

History
45 lines (29 loc) · 1.45 KB

README.md

File metadata and controls

45 lines (29 loc) · 1.45 KB

Selenium-Java

1. Download ChromeDriver:

A. Check your Google Chrome version:

alt text

alt text

B. Download the ChromeDriver matching your Google Chrome from:

https://sites.google.com/chromium.org/driver/downloads


2. Add Selenium Webdriver Java libraries:

B. Press on the latest stable release

C. Copy maven dependency

D. Paste it inside your POM.xml in between


3. Add WebDriver code:

A. Create a new Java class name it: WebTest

B. Copy the below code into tour class:

    import org.openqa.selenium.chrome.ChromeDriver;

    public class WebTest {
        private static ChromeDriver driver;

        public static void main(String[] args) {
            System.setProperty("webdriver.chrome.driver", "<PATH_TO_CHROMEDRIVER.EXE>\\chromedriver.exe");
            driver = new ChromeDriver();
            driver.get("https://translate.google.com");
        }
    }

C. Change the <PATH_TO_CHROMEDRIVER.EXE> to the real path your chromedriver.exe file is in (without deleting chromedriver.exe).