Example usage for org.openqa.selenium By xpath

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

Introduction

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

Prototype

public static By xpath(String xpathExpression) 

Source Link

Usage

From source file:cls.ui.model.selenium.carDealerManage.BasicInfoPage.java

public void enterDetailAddress(String detailAddress) throws Throwable {
    WebElement detailAddressInput = driver.findElement(By.xpath(
            "/html/body/div/div[1]/div[1]/div[2]/div[1]/div/div/div/form/fieldset/div[1]/div[2]/div[5]/div/div/input"));
    detailAddressInput.clear();/*from  w ww  . j  a  va2  s . c  om*/
    detailAddressInput.sendKeys(detailAddress);
}

From source file:cls.ui.model.selenium.carDealerManage.BasicInfoPage.java

public void enterCardNo(String cardNo) throws Throwable {
    WebElement cardNoInput = driver.findElement(By.xpath(
            "/html/body/div/div[1]/div[1]/div[2]/div[1]/div/div/div/form/fieldset/div[1]/div[2]/div[8]/div[3]/div/input"));
    cardNoInput.clear();//  w w  w .j a v  a2  s. c  o m
    cardNoInput.sendKeys(cardNo);
}

From source file:cls.ui.model.selenium.carDealerManage.BasicInfoPage.java

public void enterEmployeeNum(String employeeNum) throws Throwable {
    WebElement employeeNumInput = driver.findElement(By.xpath(
            "/html/body/div/div[1]/div[1]/div[2]/div[1]/div/div/div/form/fieldset/div[1]/div[2]/div[9]/div[1]/div/input"));
    employeeNumInput.clear();//from w ww . j  a  va2  s .  c  o  m
    employeeNumInput.sendKeys(employeeNum);
}

From source file:cls.ui.model.selenium.carDealerManage.BasicInfoPage.java

public void enterPlaceProportion(String placeProportion) throws Throwable {
    WebElement placeProportionInput = driver.findElement(By.xpath(
            "/html/body/div/div[1]/div[1]/div[2]/div[1]/div/div/div/form/fieldset/div[1]/div[2]/div[9]/div[2]/div/input"));
    placeProportionInput.clear();/*from w  ww .  j a  v  a 2  s. co m*/
    placeProportionInput.sendKeys(placeProportion);
}

From source file:cls.ui.model.selenium.carDealerManage.BasicInfoPage.java

public void enterSalesVolume(String salesVolume) throws Throwable {
    WebElement salesVolumeInput = driver.findElement(By.xpath(
            "/html/body/div/div[1]/div[1]/div[2]/div[1]/div/div/div/form/fieldset/div[1]/div[2]/div[9]/div[3]/div/input"));
    salesVolumeInput.clear();/*from w  ww  .j  a  v  a  2  s .c o  m*/
    salesVolumeInput.sendKeys(salesVolume);
}

From source file:cls.ui.model.selenium.carDealerManage.BasicInfoPage.java

public void uploadBusinessLicense() throws Throwable {
    WebElement businessLicenseBtn = driver.findElement(By.xpath(
            "/html/body/div/div[1]/div[1]/div[2]/div[1]/div/div/div/form/fieldset/div[1]/div[2]/div[11]/div/div/button[1]"));
    businessLicenseBtn.click();/*from   w  w  w . ja v  a2  s .  c o  m*/
    Thread.sleep(1000);
    uploadFileAfterClick();
}

From source file:cls.ui.model.selenium.carDealerManage.BasicInfoPage.java

public void uploadBusinessPlace() throws Throwable {
    WebElement businessPlaceBtn = driver.findElement(By.xpath(
            "/html/body/div/div[1]/div[1]/div[2]/div[1]/div/div/div/form/fieldset/div[1]/div[2]/div[12]/div/div/button[1]"));
    businessPlaceBtn.click();//w  ww  .j  a  v  a2 s .  c  o m
    uploadFileAfterClick();
}

From source file:cls.ui.model.selenium.carDealerManage.BasicInfoPage.java

public void uploadConfirmation() throws Throwable {
    WebElement confirmationBtn = driver.findElement(By.xpath(
            "/html/body/div/div[1]/div[1]/div[2]/div[1]/div/div/div/form/fieldset/div[1]/div[2]/div[13]/div/div/button[1]"));
    confirmationBtn.click();//from  w  ww  .ja  v  a2  s  .com
    uploadFileAfterClick();
}

From source file:cls.ui.model.selenium.carDealerManage.BasicInfoPage.java

public void uploadAgreement() throws Throwable {
    WebElement agreementBtn = driver.findElement(By.xpath(
            "/html/body/div/div[1]/div[1]/div[2]/div[1]/div/div/div/form/fieldset/div[1]/div[2]/div[14]/div/div/button[1]"));
    agreementBtn.click();/*from w  ww. j av  a 2 s. co  m*/
    uploadFileAfterClick();
}

From source file:cls.ui.model.selenium.carDealerManage.BasicInfoPage.java

public void clickSaveButton() throws Throwable {
    WebElement saveBtn = driver.findElement(
            By.xpath("/html/body/div/div[1]/div[1]/div[2]/div[1]/div/div/div/form/fieldset/div[2]/div/button"));
    saveBtn.click();//from ww  w .  java  2s.c om
}