package by.stqa.pft.addressbook.appmanager;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;

/**
 * Created by artemr on 11/25/2016.
 */
public class NavigationHelper extends HelperBase{

  public NavigationHelper(WebDriver wd) {
    super(wd);
  }
  public void gotoGroupPage() {
    click(By.linkText("groups"));
  }
  public void returnToHomePage() {
    click(By.linkText("home"));
  }
}

@@ -260,24 +260,25 @@
 er(wd);%0A  %7D%0A
+%0A
   public voi
@@ -289,32 +289,219 @@
 toGroupPage() %7B%0A
+    if(isElementPresent(By.tagName(%22h1%22))%0A            && wd.findElement(By.tagName(%22h1%22)).getText().equals(%22Groups%22)%0A            && isElementPresent(By.name(%22new%22)))%7B%0A      return;%0A    %7D%0A
     click(By.lin
@@ -553,24 +553,90 @@
 omePage() %7B%0A
+    if(isElementPresent(By.id(%22maintable%22)))%7B%0A      return;%0A    %7D%0A
     click(By

optimize page switch