Advertisement
Guest User

Untitled

a guest
Jul 9th, 2016
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. @FindBy(xpath= FinalLocators.userName)
  2. WebElement uname;
  3.  
  4. @FindBy(xpath= FinalLocators.userpass)
  5. WebElement userpwd;
  6.  
  7. sendkeys.uname("johndoe");
  8. sendkeys.userpwd("kitty");
  9.  
  10. public static final String userName=//input[text()='username']
  11. public static final String userpass=//input[text()='password']
  12.  
  13. public void sendData(String xpathKey){
  14. try{
  15. driver.findElement(By.xpath(OR.getProperty(xpathKey))).sendKeys("abc");
  16. logger.info("Found "+xpathKey);
  17. }catch(Exception e){
  18. logger.info("wait started for "+xpathKey);
  19.  
  20. }
  21.  
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement