Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.File;
- import org.openqa.selenium.WebDriver;
- import org.openqa.selenium.chrome.ChromeDriver;
- public class GoogleSearch {
- public static void main(String[] args) throws InterruptedException {
- // FOR PC File file = new File("D:/Programme/JavaSoftware/WEB/chromedriver.exe");
- File file = new File("/opt/web/chromedriver");
- System.setProperty("webdriver.chrome.driver", file.getAbsolutePath());
- WebDriver driver = new ChromeDriver();
- driver.get("https://www.google.com/");
- System.out.println(driver.getTitle());
- driver.close();
- driver.quit();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement