Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void main(String[] args) {
- System.setProperty("webdriver.chrome.driver", "chromedriver");
- WebDriver driver = new ChromeDriver();
- driver.get("https://trello.com/login");
- driver.findElement(By.id("user")).sendKeys("dowec51166@xhyemail.com");
- driver.findElement(By.id("password")).sendKeys("Impera12");
- driver.findElement(By.id("login")).submit();
- WebDriverWait wait = new WebDriverWait(driver, 15);
- wait.until(ExpectedConditions.urlContains("boards"));
- String token = driver.manage().getCookieNamed("token").getValue();
- System.out.println(token);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement