Monday, June 10, 2024

How to Easily Read Chrome Driver Files from the src/main/resources Folder

 package com.system.pattern;


import org.openqa.selenium.WebDriver;

import org.openqa.selenium.chrome.ChromeDriver;

import org.testng.annotations.Test;


public class NewTest {


WebDriver driver;


@Test(description = "chrome webdriver found under src/main/resources")

public void chrome() {


String chromeDriverPath = System.getProperty

("user.dir") + "/src/main/resources/chrome/chromedriver";

System.setProperty("webdriver.chrome.driver", chromeDriverPath);

driver = new ChromeDriver();

driver.get("https://suriyaparithy.blogspot.com/");


}

}

No comments:

Post a Comment