Search in sources :

Example 6 with MobileAdsBaseObject

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

the class TestAdsSlotsMercury method adsLeaderboardAndPrefooterOnPage.

@Test(groups = "AdsSlotsMercury", dataProviderClass = MobileAdsDataProvider.class, dataProvider = "leaderboardAndPrefooterSlots")
public void adsLeaderboardAndPrefooterOnPage(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_PREFOOTER, SRC);
    ads.verifyImgAdLoadedInSlot(MOBILE_TOP_LEADERBOARD, CREATIVE_IMAGE_URL);
    ads.verifyImgAdLoadedInSlot(MOBILE_PREFOOTER, CREATIVE_IMAGE_URL);
    ads.verifyNoSlotPresent(MOBILE_IN_CONTENT);
}
Also used : MobileAdsBaseObject(com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.mobile.MobileAdsBaseObject) Test(org.testng.annotations.Test)

Example 7 with MobileAdsBaseObject

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

the class TestAdsSlotsMercury method adsLeaderboardAndInContentOnPage.

@Test(groups = "AdsSlotsMercury", dataProviderClass = MobileAdsDataProvider.class, dataProvider = "leaderboardAndInContentSlots")
public void adsLeaderboardAndInContentOnPage(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.verifyImgAdLoadedInSlot(MOBILE_TOP_LEADERBOARD, CREATIVE_IMAGE_URL);
    ads.verifyImgAdLoadedInSlot(MOBILE_IN_CONTENT, CREATIVE_IMAGE_URL);
    ads.verifyNoSlotPresent(MOBILE_PREFOOTER);
}
Also used : MobileAdsBaseObject(com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.mobile.MobileAdsBaseObject) Test(org.testng.annotations.Test)

Example 8 with MobileAdsBaseObject

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

the class TestAdTypeMobile method adsAdTypeAsyncSuccessAndHop.

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

Example 9 with MobileAdsBaseObject

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

the class TestAdTypeMobile method adsAdTypeInspectIframe.

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

Example 10 with MobileAdsBaseObject

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

the class TestAdTypeMobile method adsAdTypeAsyncHopWithAd.

@Test(groups = "AdTypeMercury", dataProviderClass = AdTypeDataProvider.class, dataProvider = "asyncHopWithAd")
public void adsAdTypeAsyncHopWithAd(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)

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