Пример #1
0
 @Test
 public void testHoverLivingMenuLoadsMenu() {
   Home home = new Home(setup.getDriver());
   home.getHomePage();
   if (!home.isLoggedIn()) {
     home.login("*****@*****.**", "6314134223");
   }
   setup.getDriver().manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);
   HeaderRegion header = home.header();
   HeaderMenu menu = header.hoverMenu("living");
   assertEquals("living", menu.getMenuName());
   assertEquals(true, menu.isDropdownMenuVisible());
 }
Пример #2
0
  @Test
  public void testClickLivingMenuLoadsPageLiving() {
    Home home = new Home(setup.getDriver());
    home.getHomePage();
    if (!home.isLoggedIn()) {
      home.login("*****@*****.**", "6314134223");
    }
    setup.getDriver().manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
    home.header().clickMenu("living");

    System.out.println(setup.getDriver().getCurrentUrl());
    System.out.println(setup.getDriver().getTitle());
    assertEquals("https://www.sneakpeeq.com/v/LIVING", setup.getDriver().getCurrentUrl());
  }