Advertisement
meusx

TestBaseClass

Jul 12th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.14 KB | None | 0 0
  1. package pages;
  2.  
  3. import org.openqa.selenium.WebDriver;
  4. import org.openqa.selenium.WebElement;
  5. import org.openqa.selenium.interactions.Actions;
  6. import org.openqa.selenium.support.FindBy;
  7. import org.openqa.selenium.support.PageFactory;
  8. import org.openqa.selenium.support.ui.ExpectedConditions;
  9. import org.openqa.selenium.support.ui.WebDriverWait;
  10.  
  11. public class _TestBase {
  12.    
  13.    
  14.     @FindBy (css="#primary-header > div:nth-of-type(3)") WebElement myAccount;
  15.     @FindBy (linkText="Moje zamówienia") WebElement myOrders;
  16.     @FindBy (linkText="Moje konto") WebElement accountIndex;
  17.     @FindBy (linkText="Adresy dostaw") WebElement addresses;
  18.     @FindBy (linkText="Wyloguj się") WebElement logOut;
  19.     @FindBy (css="#blocker") WebElement blocker;
  20.     //@FindBy (tagName="title") WebElement title;
  21.    
  22.    
  23.     public void clickMyAccount() throws InterruptedException {
  24.         Thread.sleep(1000);
  25.         myAccount.click();
  26.     }
  27.     public void clickMyOrders(){       
  28.         myOrders.click();
  29.     }
  30.     public void clickAccountIndex(){       
  31.         accountIndex.click();
  32.     }
  33.     public void clickAddresses(){      
  34.         addresses.click();
  35.     }
  36.     public void clickLogOut(){     
  37.         logOut.click();
  38.     }
  39.  
  40.    
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement