Search in sources :

Example 86 with AdsBaseObject

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

the class TestAdsDfpParamsPresentMercury method dfpRubiconParamsPresentSyntheticMercury.

@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
@Test(dataProviderClass = MobileAdsDataProvider.class, dataProvider = "dfpRubiconParamsSynthetic", groups = { "MobileAds", "AdsDfpParamsPresentSyntheticMercury" })
public void dfpRubiconParamsPresentSyntheticMercury(String wikiName, String article, String queryString, String adUnit, String slot, String patternParam43tierPrice, String patternParam44tierPrice) {
    String testedPage = urlBuilder.getUrlForPath(wikiName, article);
    if (StringUtils.isNotEmpty(queryString)) {
        testedPage = urlBuilder.appendQueryStringToURL(testedPage, queryString);
    }
    AdsBaseObject ads = new AdsBaseObject(driver, testedPage);
    String currentGptSlotParams = ads.getGptParams(slot, "data-gpt-slot-params");
    ads.verifyGptIframe(adUnit, slot, SRC_MOBILE);
    Assertion.assertTrue(ads.areRubiconDfpParamsPresent(currentGptSlotParams, patternParam43tierPrice, patternParam44tierPrice), currentGptSlotParams + " does not contains " + patternParam43tierPrice + " or " + patternParam44tierPrice);
    ads.verifyGptAdInSlot(slot, LINE_ITEM_ID, CREATIVE_ID);
}
Also used : AdsBaseObject(com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject) Test(org.testng.annotations.Test) InBrowser(com.wikia.webdriver.common.core.annotations.InBrowser)

Example 87 with AdsBaseObject

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

the class TestAdsDfpParamsPresentMercury method dfpParamsPresentMercury.

@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
@Test(dataProviderClass = MobileAdsDataProvider.class, dataProvider = "dfpParams", groups = { "MobileAds", "AdsDfpParamsPresentMercury" })
public void dfpParamsPresentMercury(String wikiName, String article, String adUnit, String slot, List<String> pageParams, List<String> slotParams) {
    String testedPage = urlBuilder.getUrlForPath(wikiName, article);
    AdsBaseObject ads = new AdsBaseObject(driver, testedPage);
    ads.verifyGptIframe(adUnit, slot, SRC_MOBILE);
    ads.verifyGptParams(slot, pageParams, slotParams);
}
Also used : AdsBaseObject(com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject) Test(org.testng.annotations.Test) InBrowser(com.wikia.webdriver.common.core.annotations.InBrowser)

Aggregations

AdsBaseObject (com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject)87 Test (org.testng.annotations.Test)79 AutoplayVuap (com.wikia.webdriver.pageobjectsfactory.componentobject.ad.AutoplayVuap)29 InBrowser (com.wikia.webdriver.common.core.annotations.InBrowser)15 NetworkTrafficDump (com.wikia.webdriver.common.core.annotations.NetworkTrafficDump)12 VideoFanTakeover (com.wikia.webdriver.pageobjectsfactory.componentobject.ad.VideoFanTakeover)12 Execute (com.wikia.webdriver.common.core.annotations.Execute)3 UseUnstablePageLoadStrategy (com.wikia.webdriver.common.driverprovider.UseUnstablePageLoadStrategy)3 RelatedIssue (com.wikia.webdriver.common.core.annotations.RelatedIssue)2 JavascriptActions (com.wikia.webdriver.common.core.elemnt.JavascriptActions)2 SonySideViewObject (com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.SonySideViewObject)2 Dimension (org.openqa.selenium.Dimension)2 DontRun (com.wikia.webdriver.common.core.annotations.DontRun)1 HarEntry (net.lightbody.bmp.core.har.HarEntry)1