Advertisement
Gamebuster

Untitled

Dec 30th, 2015
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. package com.gamebuster19901.GameBuSK.test;
  2.  
  3. import org.openqa.selenium.WebElement;
  4.  
  5. import com.gamebuster19901.GameBuSK.effects.GWebDriver;
  6. import com.gamebuster19901.GameBuSK.exceptions.AlreadyExistsException;
  7. import com.gamebuster19901.GameBuSK.types.BrowserType;
  8. import com.gamebuster19901.GameBuSK.types.SearchType;
  9.  
  10. public class Test2 {
  11. public static void main(String[] args) throws AlreadyExistsException, InterruptedException {
  12. System.setProperty("webdriver.chrome.driver",
  13. "C:/Users/Administrator/Desktop/Server/RPG/plugins/GameBuSK/dependencies/chromedriver/chromedriver.exe");
  14. GWebDriver.create(BrowserType.CHROME, "Test");
  15. GWebDriver driver = GWebDriver.getWindow("Test");
  16. System.out.println(GWebDriver.GWebDrivers);
  17. driver.goTo("https://www.google.com/");
  18. System.out.println(driver);
  19. Thread.sleep(2000);
  20. WebElement element = driver.GetElement(SearchType.NAME, "q");
  21. System.out.println(element);
  22. element.click();
  23. }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement