List of usage examples for org.openqa.selenium By xpath
public static By xpath(String xpathExpression)
From source file:cls.ui.model.selenium.carDealerManage.BasicInfoPage.java
public void clickAddAccountButton() throws Throwable { WebElement addAccountBtn = driver.findElement(By.xpath( "/html/body/div/div[1]/div[1]/div[2]/div[1]/div/div/div/form/fieldset/div[3]/div/div[1]/div[2]/ul/li/a")); addAccountBtn.click();/*from ww w . j av a2 s . co m*/ Thread.sleep(2000); }
From source file:cls.ui.model.selenium.carDealerManage.BasicInfoPage.java
public void enterAccountName(String accountName) throws Throwable { WebElement accountNameText = driver.findElement( By.xpath("/html/body/div[1]/div[1]/div[2]/div/div/form/div[1]/div[1]/div[1]/div/input")); accountNameText.clear();//from w w w . j a v a 2 s .co m accountNameText.sendKeys(accountName); }
From source file:cls.ui.model.selenium.carDealerManage.BasicInfoPage.java
public void selectBankName(String bankName) throws Throwable { WebElement bankNameSelect = driver.findElement( By.xpath("/html/body/div[1]/div[1]/div[2]/div/div/form/div[1]/div[1]/div[2]/div/select")); Select mySelect = new Select(bankNameSelect); mySelect.selectByVisibleText(bankName); }
From source file:cls.ui.model.selenium.carDealerManage.BasicInfoPage.java
public void enterSubBankName(String subBankName) throws Throwable { WebElement subBankNameText = driver.findElement( By.xpath("/html/body/div[1]/div[1]/div[2]/div/div/form/div[1]/div[2]/div[1]/div/input")); subBankNameText.clear();// w ww.ja v a 2s .com subBankNameText.sendKeys(subBankName); }
From source file:cls.ui.model.selenium.carDealerManage.BasicInfoPage.java
public void enterBankCardNum(String bankCardNum) throws Throwable { WebElement cardNumText = driver.findElement( By.xpath("/html/body/div[1]/div[1]/div[2]/div/div/form/div[1]/div[2]/div[2]/div/input")); cardNumText.clear();/*from w w w . ja v a2s . co m*/ cardNumText.sendKeys(bankCardNum); }
From source file:cls.ui.model.selenium.carDealerManage.BasicInfoPage.java
public void selectAccountType(String accountType) throws Throwable { WebElement accountTypeSelect = driver .findElement(By.xpath("/html/body/div[1]/div[1]/div[2]/div/div/form/div[1]/div[3]/div/div/select")); Select mySelect = new Select(accountTypeSelect); mySelect.selectByVisibleText(accountType); }
From source file:cls.ui.model.selenium.carDealerManage.BasicInfoPage.java
public void enterRemark(String remark) throws Throwable { WebElement remarkText = driver.findElement( By.xpath("/html/body/div[1]/div[1]/div[2]/div/div/form/div[1]/div[4]/div/div/textarea")); remarkText.clear();// ww w.jav a 2 s . c om remarkText.sendKeys(remark); }
From source file:cls.ui.model.selenium.carDealerManage.BasicInfoPage.java
public void clickAddDialogSaveButton() throws Throwable { WebElement saveBtn = driver/*from w w w . j a v a 2 s. c om*/ .findElement(By.xpath("/html/body/div[1]/div[1]/div[2]/div/div/form/div[2]/button[1]")); saveBtn.click(); }
From source file:cls.ui.model.selenium.carDealerManage.BasicInfoPage.java
public void clickAddDialogCancelButton() throws Throwable { WebElement cancelBtn = driver//from www.j a v a2 s.co m .findElement(By.xpath("/html/body/div[1]/div[1]/div[2]/div/div/form/div[2]/button[1]")); cancelBtn.click(); }
From source file:cls.ui.model.selenium.carDealerManage.BasicInfoPage.java
public void clickSubmitButton() throws Throwable { WebElement submitBtn = driver/*from ww w .j a v a 2s .co m*/ .findElement(By.xpath("/html/body/div/div[1]/div[1]/div[3]/div/div/div/div/span/button[1]")); submitBtn.click(); }