List of usage examples for org.openqa.selenium By name
public static By name(String name)
From source file:com.hotwire.selenium.tools.c3.purchase.C3InterstitialPage.java
License:Open Source License
public void continueAsNewUser(String email, String firstName, String lastName) { findOne(By.name("firstName")).sendKeys(firstName); findOne(By.name("lastName")).sendKeys(lastName); findOne(By.name("email")).sendKeys(email); findOne(By.name("confirmEmail")).sendKeys(email); selectCountry();/*from w ww . j a v a 2s . c o m*/ findOne(By.name("postalCode")).sendKeys("94001"); findOne(By.xpath("//button[text()='Register']")).click(); }
From source file:com.hotwire.selenium.tools.c3.purchase.car.C3CarAddonPage.java
License:Open Source License
public void addRentalCar() { if (isRentalCarOptionLinkAvailable()) { findOne(".startSearch>span", DEFAULT_WAIT).click(); new WebDriverWait(getWebDriver(), getTimeout()) .until(ExpectedConditions.elementToBeClickable(By.name("selectedCarAddOnSolutionId"))).click(); } else {/*w w w . j a v a 2s .c om*/ throw new RuntimeException("Can't rent a car as add-on for flight.. The link didn't appear"); } }
From source file:com.hotwire.selenium.tools.c3.purchase.car.C3OldBillingPage.java
License:Open Source License
public WebElement getBookTripButton() { return findOne(By.name("btnPurchase"), DEFAULT_WAIT); }
From source file:com.hotwire.selenium.tools.c3.purchase.hotel.C3HotelResultsPage.java
License:Open Source License
public String getLocation() { return findOne(By.name(location)).getAttribute("value"); }
From source file:com.hotwire.selenium.tools.c3.purchase.hotel.C3HotelResultsPage.java
License:Open Source License
public String getRooms() { return new Select(findOne(By.name(rooms))).getFirstSelectedOption().getText(); }
From source file:com.hotwire.selenium.tools.c3.purchase.hotel.C3HotelResultsPage.java
License:Open Source License
public String getAdults() { return new Select(findOne(By.name(adults))).getFirstSelectedOption().getText(); }
From source file:com.hotwire.selenium.tools.c3.purchase.hotel.C3HotelResultsPage.java
License:Open Source License
public String getChildren() { return new Select(findOne(By.name(children))).getFirstSelectedOption().getText(); }
From source file:com.hotwire.selenium.tools.c3.refund.C3AirRefundPage.java
License:Open Source License
@Override public void proceedPartialRefund() { clickRefund();/*from ww w .j a va 2s . c om*/ try { getWebDriver().switchTo().alert().accept(); } catch (Exception e) { logger.info("There are no alert window"); } try { new WebDriverWait(getWebDriver(), 5) .until(ExpectedConditions.presenceOfElementLocated(By.name("newResNum"))).sendKeys("#wwwwww"); new WebDriverWait(getWebDriver(), 5) .until(ExpectedConditions.presenceOfElementLocated(By.name("continue"))).click(); } catch (Exception e) { logger.info("just waiting expected error message"); } }
From source file:com.hotwire.selenium.tools.c3.refund.C3RefundPage.java
License:Open Source License
public C3RefundPage(WebDriver webDriver) { super(webDriver, By.name("issueRefund")); }
From source file:com.hotwire.selenium.tools.c3.riskManagement.C3AirTransactionsForReviewPage.java
License:Open Source License
public void selectNextTransactionsForReview(Integer count) { if (count != 0) { count += 3;//from ww w . jav a 2 s . c o m } for (int i = 3; i <= count; i++) { checkBox(By.xpath("//tr[" + i + "]//input[@name [contains(., 'passOnReview')]]")); } findOne(By.name("updateButton"), DEFAULT_WAIT).click(); }