Exemplo n.º 1
0
 @Test
 public void clickConfirm() {
   Browser browser = CHROME;
   browser.get("http://localhost:63342/seleniumcapsules/html/upload.html");
   browser.button(NEED_CONIRM).click();
   browser.accept();
 }
Exemplo n.º 2
0
 /** This is a clean test using page framework. It has the same function as the test above. :) */
 @Test
 public void changeLocationUsingBrowser() {
   Browser browser = CHROME;
   browser.get("http://www.ticketfly.com");
   browser.untilFound(LinkText.CHANGE_LOCATION).click();
   Element tabMenu = browser.untilFound(Id.LOCATION);
   tabMenu.untilFound(LinkText.CANADA).click();
   tabMenu.untilFound(LinkText.ONTARIO).click();
   assertFalse(tabMenu.optionalElement(LinkText.ONTARIO).isPresent());
   assertEquals("Ontario", browser.untilFound(Xpath.LOCATION).getText());
 }