Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.gamebuster19901.GameBuSK.test;
- import org.openqa.selenium.WebElement;
- import com.gamebuster19901.GameBuSK.effects.GWebDriver;
- import com.gamebuster19901.GameBuSK.exceptions.AlreadyExistsException;
- import com.gamebuster19901.GameBuSK.types.BrowserType;
- import com.gamebuster19901.GameBuSK.types.SearchType;
- public class Test2 {
- public static void main(String[] args) throws AlreadyExistsException, InterruptedException {
- System.setProperty("webdriver.chrome.driver",
- "C:/Users/Administrator/Desktop/Server/RPG/plugins/GameBuSK/dependencies/chromedriver/chromedriver.exe");
- GWebDriver.create(BrowserType.CHROME, "Test");
- GWebDriver driver = GWebDriver.getWindow("Test");
- System.out.println(GWebDriver.GWebDrivers);
- driver.goTo("https://www.google.com/");
- System.out.println(driver);
- Thread.sleep(2000);
- WebElement element = driver.GetElement(SearchType.NAME, "q");
- System.out.println(element);
- element.click();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement