SHARE
TWEET

Untitled

a guest Jun 27th, 2019 73 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class BasicSteps {
  2.  
  3.     protected WebDriver driver;
  4.     protected final BasePage actualPage;
  5.     protected List<WebElement> elements;
  6.     protected List<String> actualList;
  7.  
  8.     public BasicSteps(WebDriver driver) {
  9.         this.driver = driver;
  10.     }
  11.  
  12.     public String getPageName() {
  13.         return actualPage.getPageTitle();
  14.     }
  15.  
  16. ///////////////////////////// Здесь другой класс ////////////////////////
  17.  
  18. public class HomePageSteps extends BasicSteps{
  19.  
  20.     private final HomePage homePage;
  21.    
  22.     public HomePageSteps(WebDriver driver) {
  23.         super(driver);
  24.         homePage = new HomePage(driver);
  25.         actualPage = homePage;
  26.     }
  27.  
  28.     public void itemsAreInProperQuantityWithProperTexts(Location location, List<String> expectedList) {
  29.         switch (location) {
  30.             case HEADER_SECTION:
  31.                 elements = homePage.getHeaderSectionTitles();
  32.                 break;
  33.             case CENTER:
  34.                 elements = homePage.getCenterSectionTitles();
  35.                 break;
  36.             case UNDER_GREEN_PICTURES:
  37.                 elements = homePage.getCaptionsUnderGreenPictures();
  38.                 break;
  39.         }
  40.     }
  41. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top