Search in sources :

Example 1 with MobileAdsBaseObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.mobile.MobileAdsBaseObject in project selenium-tests by Wikia.

the class TestAdTypeMobile method adsAdTypeAsyncForcedSuccess.

@Test(groups = "AdTypeMercury", dataProviderClass = AdTypeDataProvider.class, dataProvider = "forcedSuccessNoAd")
public void adsAdTypeAsyncForcedSuccess(String wikiName, String article, String adUnit, String slotName) {
    String testedPage = urlBuilder.getUrlForPath(wikiName, article);
    MobileAdsBaseObject ads = new MobileAdsBaseObject(driver, testedPage);
    ads.waitForSlot(slotName);
    ads.verifyGptIframe(adUnit, slotName, SRC);
    ads.verifySlotExpanded(slotName);
}
Also used : MobileAdsBaseObject(com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.mobile.MobileAdsBaseObject) Test(org.testng.annotations.Test)

Example 2 with MobileAdsBaseObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.mobile.MobileAdsBaseObject in project selenium-tests by Wikia.

the class TestAdTypeMobile method adsAdTypeAsyncHopWithoutAd.

@Test(groups = "AdTypeMercury", dataProviderClass = AdTypeDataProvider.class, dataProvider = "asyncHopNoAd")
public void adsAdTypeAsyncHopWithoutAd(String wikiName, String article, String adUnit, String slotName) {
    String testedPage = urlBuilder.getUrlForPath(wikiName, article);
    MobileAdsBaseObject ads = new MobileAdsBaseObject(driver, testedPage);
    ads.wait.forElementPresent(By.id(slotName));
    ads.verifyGptIframe(adUnit, slotName, SRC);
    ads.verifyNoAdInSlot(slotName);
}
Also used : MobileAdsBaseObject(com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.mobile.MobileAdsBaseObject) Test(org.testng.annotations.Test)

Example 3 with MobileAdsBaseObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.mobile.MobileAdsBaseObject in project selenium-tests by Wikia.

the class TestAdTypeMobile method adsAdTypeAsyncSuccessNoAd.

@Test(groups = "AdTypeMercury", dataProviderClass = AdTypeDataProvider.class, dataProvider = "asyncSuccessNoAd")
public void adsAdTypeAsyncSuccessNoAd(String wikiName, String article, String adUnit, String slotName) {
    String testedPage = urlBuilder.getUrlForPath(wikiName, article);
    MobileAdsBaseObject ads = new MobileAdsBaseObject(driver, testedPage);
    ads.wait.forElementPresent(By.id(slotName));
    ads.verifyGptIframe(adUnit, slotName, SRC);
    ads.verifySlotExpanded(slotName);
}
Also used : MobileAdsBaseObject(com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.mobile.MobileAdsBaseObject) Test(org.testng.annotations.Test)

Example 4 with MobileAdsBaseObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.mobile.MobileAdsBaseObject in project selenium-tests by Wikia.

the class TestAdsSlotsMercury method adsLeaderboardAndPrefooterOnConsecutivePageViews.

@Test(groups = "AdsSlotsMercury", dataProviderClass = MobileAdsDataProvider.class, dataProvider = "mercuryConsecutivePageViews")
public void adsLeaderboardAndPrefooterOnConsecutivePageViews(String wikiName, String firstArticle, String secondArticle, String thirdArticle, String adUnit) {
    String testedPage = urlBuilder.getUrlForPath(wikiName, firstArticle);
    MobileAdsBaseObject ads = new MobileAdsBaseObject(driver, testedPage);
    ads.verifyGptIframe(adUnit, MOBILE_TOP_LEADERBOARD, SRC);
    ads.verifyGptIframe(adUnit, MOBILE_PREFOOTER, SRC);
    ads.scrollToPosition(ARTICLE_BODY);
    ads.mercuryNavigateToAnArticle(secondArticle);
    ads.waitTitleChangesTo(secondArticle);
    ads.verifyGptIframe(adUnit, MOBILE_TOP_LEADERBOARD, SRC);
    ads.scrollToPosition(ARTICLE_BODY);
    ads.mercuryNavigateToAnArticle(thirdArticle);
    ads.waitTitleChangesTo(thirdArticle);
    ads.verifyGptIframe(adUnit, MOBILE_TOP_LEADERBOARD, SRC);
    ads.verifyGptIframe(adUnit, MOBILE_PREFOOTER, SRC);
}
Also used : MobileAdsBaseObject(com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.mobile.MobileAdsBaseObject) Test(org.testng.annotations.Test)

Example 5 with MobileAdsBaseObject

use of com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.mobile.MobileAdsBaseObject in project selenium-tests by Wikia.

the class TestAdsSlotsMercury method adsAllSlotsOnPage.

@Test(groups = "AdsSlotsMercury", dataProviderClass = MobileAdsDataProvider.class, dataProvider = "allSlots")
public void adsAllSlotsOnPage(String wikiName, String article, String adUnit) {
    String testedPage = urlBuilder.getUrlForPath(wikiName, article);
    MobileAdsBaseObject ads = new MobileAdsBaseObject(driver, testedPage);
    ads.verifyGptIframe(adUnit, MOBILE_TOP_LEADERBOARD, SRC);
    ads.verifyGptIframe(adUnit, MOBILE_IN_CONTENT, SRC);
    ads.scrollToPosition(ARTICLE_FOOTER);
    ads.verifyGptIframe(adUnit, MOBILE_PREFOOTER, SRC);
    ads.verifyImgAdLoadedInSlot(MOBILE_TOP_LEADERBOARD, CREATIVE_IMAGE_URL);
    ads.verifyImgAdLoadedInSlot(MOBILE_IN_CONTENT, CREATIVE_IMAGE_URL);
    ads.verifyImgAdLoadedInSlot(MOBILE_PREFOOTER, CREATIVE_IMAGE_URL);
    Assertion.assertFalse(ads.checkSlotOnPageLoaded(AdsContent.MOBILE_BOTTOM_LB));
}
Also used : MobileAdsBaseObject(com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.mobile.MobileAdsBaseObject) Test(org.testng.annotations.Test)

Aggregations

MobileAdsBaseObject (com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.mobile.MobileAdsBaseObject)13 Test (org.testng.annotations.Test)13 InBrowser (com.wikia.webdriver.common.core.annotations.InBrowser)2 PortableInfobox (com.wikia.webdriver.pageobjectsfactory.pageobject.PortableInfobox)1