Search in sources :

Example 6 with SkinHelper

use of com.wikia.webdriver.common.skin.SkinHelper in project selenium-tests by Wikia.

the class ArticlePage method open.

public ArticlePage open() {
    getUrl(urlBuilder.getUrlForWiki(Configuration.getWikiName()) + URLsContent.WIKI_DIR + TestContext.getCurrentMethodName());
    new SkinHelper(driver).isSkin(Skin.MOBILE_WIKI);
    return this;
}
Also used : SkinHelper(com.wikia.webdriver.common.skin.SkinHelper)

Example 7 with SkinHelper

use of com.wikia.webdriver.common.skin.SkinHelper in project selenium-tests by Wikia.

the class CategoryPage method navigateToCategoryMemberPage.

public ArticlePage navigateToCategoryMemberPage() {
    new SkinHelper(driver).isSkin(Skin.MOBILE_WIKI);
    WebElement member = driver.findElement(categoryMembers);
    String memberName = member.getText();
    wait.forElementClickable(member);
    member.click();
    new Loading(driver).handleAsyncPageReload();
    PageObjectLogging.logInfo(String.format("You were redirected to page: \"%s\".", memberName));
    new SkinHelper(driver).isSkin(Skin.MOBILE_WIKI);
    return new ArticlePage();
}
Also used : Loading(com.wikia.webdriver.elements.mercury.components.Loading) SkinHelper(com.wikia.webdriver.common.skin.SkinHelper) WebElement(org.openqa.selenium.WebElement)

Example 8 with SkinHelper

use of com.wikia.webdriver.common.skin.SkinHelper in project selenium-tests by Wikia.

the class CategoryPage method open.

public CategoryPage open(String categoryName) {
    this.navigate.toPage(String.format("%s%s", URLsContent.WIKI_DIR, categoryName));
    new SkinHelper(driver).isSkin(Skin.MOBILE_WIKI);
    PageObjectLogging.logInfo(String.format("%s category page opened", categoryName));
    return this;
}
Also used : SkinHelper(com.wikia.webdriver.common.skin.SkinHelper)

Example 9 with SkinHelper

use of com.wikia.webdriver.common.skin.SkinHelper in project selenium-tests by Wikia.

the class Navigation method clickExploreWikiHeader.

public Navigation clickExploreWikiHeader(Skin fromSkin) {
    PageObjectLogging.logInfo("Click 'Explore Wiki' header");
    wait.forElementClickable(exploreWikiHeader);
    exploreWikiHeader.click();
    // Mobile wiki opens the main page using AJAX, Mercury reloads the page and opens Mobile Wiki
    if (fromSkin == Skin.MOBILE_WIKI) {
        loading.handleAsyncPageReload();
    } else {
        new SkinHelper(driver).isSkin(Skin.MERCURY);
    }
    return this;
}
Also used : SkinHelper(com.wikia.webdriver.common.skin.SkinHelper)

Example 10 with SkinHelper

use of com.wikia.webdriver.common.skin.SkinHelper in project selenium-tests by Wikia.

the class GuidelinesPage method open.

public GuidelinesPage open() {
    driver.get(urlBuilder.getUrlForWiki() + String.format(PATH));
    new SkinHelper(driver).isSkin(Skin.MERCURY);
    return this;
}
Also used : SkinHelper(com.wikia.webdriver.common.skin.SkinHelper)

Aggregations

SkinHelper (com.wikia.webdriver.common.skin.SkinHelper)10 Execute (com.wikia.webdriver.common.core.annotations.Execute)3 Test (org.testng.annotations.Test)3 InBrowser (com.wikia.webdriver.common.core.annotations.InBrowser)2 GuidelinesPage (com.wikia.webdriver.elements.mercury.pages.discussions.GuidelinesPage)2 WebElement (org.openqa.selenium.WebElement)2 RelatedIssue (com.wikia.webdriver.common.core.annotations.RelatedIssue)1 Loading (com.wikia.webdriver.elements.mercury.components.Loading)1 ArticlePageObject (com.wikia.webdriver.elements.mercury.old.ArticlePageObject)1 ArticlePage (com.wikia.webdriver.elements.mercury.pages.ArticlePage)1 ArticlePageObject (com.wikia.webdriver.pageobjectsfactory.pageobject.article.ArticlePageObject)1