package com.frameworkium.integration.angularjs.pages.web;

import com.frameworkium.core.ui.annotations.Visible;
import com.frameworkium.core.ui.pages.BasePage;
import com.frameworkium.core.ui.pages.PageFactory;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import ru.yandex.qatools.htmlelements.annotations.Name;
import ru.yandex.qatools.htmlelements.element.Link;
import ru.yandex.qatools.htmlelements.element.TextInput;

public class DeveloperGuidePage extends BasePage<DeveloperGuidePage> {

    @Name("Developer guide search")
    @Visible
    @FindBy(css = "input[name='as_q']")
    private TextInput searchField;

    @Name("Bootstrap search item")
    @FindBy(linkText = "Bootstrap")
    private Link bootstrapSearchItem;

    @Name("Guide article title")
    @FindBy(css = "h1")
    private WebElement guideTitle;

    public static DeveloperGuidePage open() {
        return PageFactory.newInstance(
                DeveloperGuidePage.class, "https://docs.angularjs.org/guide");
    }

    public DeveloperGuidePage searchDeveloperGuide(String inputText) {
        searchField.sendKeys(inputText);
        return this;
    }

    public DeveloperGuidePage clickBootstrapSearchItem() {
        bootstrapSearchItem.click();
        waitForJavascriptFrameworkToFinish();
        return this;
    }

    public String getGuideTitle() {
        return guideTitle.getText();
    }
}

@@ -286,16 +286,131 @@
 FindBy;%0A
+import org.openqa.selenium.support.ui.ExpectedCondition;%0Aimport org.openqa.selenium.support.ui.ExpectedConditions;%0A
 import r
@@ -457,16 +457,16 @@
 s.Name;%0A
-
 import r
@@ -567,16 +567,42 @@
 Input;%0A%0A
+import java.util.Arrays;%0A%0A
 public c
@@ -952,16 +952,27 @@
 (css = %22
+.main-grid 
 h1%22)%0A   
@@ -1004,16 +1004,97 @@
 Title;%0A%0A
+    @Name(%22Loading%22)%0A    @FindBy(id= %22loading%22)%0A    private WebElement loading;%0A%0A
     publ
@@ -1489,24 +1489,24 @@
 em.click();%0A
-
         wait
@@ -1535,24 +1535,114 @@
 ToFinish();%0A
+        wait.until(ExpectedConditions.invisibilityOfAllElements(Arrays.asList(loading)));%0A
         retu

Fix DocumentationTest