Example usage for org.openqa.selenium By name

List of usage examples for org.openqa.selenium By name

Introduction

In this page you can find the example usage for org.openqa.selenium By name.

Prototype

public static By name(String name) 

Source Link

Usage

From source file:com.hotwire.selenium.tools.c3.customer.itineraryDetails.C3HotelItineraryPage.java

License:Open Source License

public void createManualCredit(String amountDollars) {
    findOne(By.name("selectedCreditReason"), DEFAULT_WAIT).sendKeys("Other");
    findOne(By.name("creditAmountString")).sendKeys(amountDollars);
    findOne(By.name("creditButton")).click();
    new WebDriverWait(getWebDriver(), DEFAULT_WAIT).until(ExpectedConditions.alertIsPresent()).accept();
}

From source file:com.hotwire.selenium.tools.c3.customer.itineraryDetails.C3HotelItineraryPage.java

License:Open Source License

public void createManualBilling(String amountDollars) {
    findOne(By.name("selectedDebitReason"), DEFAULT_WAIT).sendKeys("Other");
    findOne(By.name("debitAmountString")).sendKeys(amountDollars);
    findOne(By.name("debitButton")).click();
    new WebDriverWait(getWebDriver(), DEFAULT_WAIT).until(ExpectedConditions.alertIsPresent()).accept();
}

From source file:com.hotwire.selenium.tools.c3.hotel.C3HotelFinanceSearchPage.java

License:Open Source License

public void searchByDates(Date from, Date to) {
    selectDate("#minDateHotelSearch-field", from);
    selectDate(By.name("toDate"), to);
    findMany(".formButton").get(1).click(); //second button
}

From source file:com.hotwire.selenium.tools.c3.hotel.C3HotelFinanceSearchPage.java

License:Open Source License

public void searchByConfNum(String itineraryNumber) {
    findOne(By.name("hwItineraryNumber"), DEFAULT_WAIT).sendKeys(itineraryNumber);
    findMany(".formButton").get(0).click(); //first button
}

From source file:com.hotwire.selenium.tools.c3.hotel.C3HotelReportsDeliveryPage.java

License:Open Source License

public C3HotelReportsDeliveryPage(WebDriver webdriver) {
    super(webdriver, By.name("alwaysFax"));
}

From source file:com.hotwire.selenium.tools.c3.hotel.C3HotelReportsDeliveryPage.java

License:Open Source License

public void sendFax(String number) {
    findOne(By.name("alwaysFax"), DEFAULT_WAIT).click();
    findOne(".fax").clear();
    findOne(".fax").sendKeys(number);
    findOne(By.xpath("//input[@value='Save Changes']")).click();
}

From source file:com.hotwire.selenium.tools.c3.hotel.C3HotelReportsDeliveryPage.java

License:Open Source License

public void sendEmail(String email) {
    findOne(By.name("email"), DEFAULT_WAIT).click();
    findOne(".email").clear();
    findOne(".email").sendKeys(email);
    findOne(By.xpath("//input[@value='Save Changes']")).click();
}

From source file:com.hotwire.selenium.tools.c3.hotel.C3HotelRetrieveGuestReservationsPage.java

License:Open Source License

public void searchByDates(Date from, Date to) {
    selectDate("#minDateHotelSearch-field", from);
    selectDate(By.name("toDate"), to);
    findOne(".formButton").click();
}

From source file:com.hotwire.selenium.tools.c3.hotel.C3HotelWorkflowPage.java

License:Open Source License

public C3HotelWorkflowPage(WebDriver webdriver) {
    super(webdriver, By.name("selectedFootprintTopic"));
}

From source file:com.hotwire.selenium.tools.c3.hotel.C3HotelWorkflowPage.java

License:Open Source License

public void createWorkflow(String route, String type, String severity, String title, String name,
        String phone) {//w  ww  . j  av  a2  s . c o m
    selectValue(".formField.workflowRoute>select", route);
    findOne("#workflowType", DEFAULT_WAIT);
    selectValue("#workflowType>select", type);
    findOne(By.name("selectedInquiry.selectedCategoryQnAs[0].answer"), DEFAULT_WAIT).sendKeys(severity);
    findOne(By.name("selectedInquiry.selectedCategoryQnAs[2].answer"), DEFAULT_WAIT).sendKeys(title);
    findOne(By.name("selectedInquiry.selectedCategoryQnAs[3].answer"), DEFAULT_WAIT).sendKeys(name);
    findOne(By.name("selectedInquiry.selectedCategoryQnAs[4].answer"), DEFAULT_WAIT).sendKeys(phone);
    findOne(By.name("selectedInquiry.note")).sendKeys("this is the test");
    findOne(".formButton").click();
}