Search in sources :

Example 1 with AdsBaseObject

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

the class TestAdsGptPageParam method adsGptPageParamMercury.

@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
@Test(dataProviderClass = AdsDataProvider.class, dataProvider = "adsGptPageParam", groups = "AdsGptPageParamMercury")
@UseUnstablePageLoadStrategy
public void adsGptPageParamMercury(String wikiName, String article, String gptPattern, Boolean paramShouldPresent) {
    AdsBaseObject wikiPage = new AdsBaseObject(driver, urlBuilder.getUrlForPath(wikiName, article));
    String gptPageParams = wikiPage.getGptPageParams(AdsContent.MOBILE_TOP_LB);
    if (paramShouldPresent) {
        Assertion.assertStringContains(gptPageParams, gptPattern);
    } else {
        Assertion.assertStringNotContains(gptPageParams, gptPattern);
    }
}
Also used : AdsBaseObject(com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject) UseUnstablePageLoadStrategy(com.wikia.webdriver.common.driverprovider.UseUnstablePageLoadStrategy) Test(org.testng.annotations.Test) InBrowser(com.wikia.webdriver.common.core.annotations.InBrowser)

Example 2 with AdsBaseObject

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

the class TestAdType method adsAdTypeCollapse.

@Test(dataProviderClass = AdTypeDataProvider.class, dataProvider = "collapse", groups = "TestAdTypeCollapse")
public void adsAdTypeCollapse(String wikiName, String article, String adUnit, String[] slots) {
    String testedPage = urlBuilder.getUrlForPath(wikiName, article);
    AdsBaseObject ads = new AdsBaseObject(driver, testedPage);
    for (String slotName : slots) {
        ads.verifyGptIframe(adUnit, slotName, "gpt");
        ads.verifyIframeSize(slotName, "gpt", 0, 0);
    }
    final String topButtonWideSelector = AdsContent.getSlotSelector(AdsContent.TOP_BUTTON_WIDE);
    ads.verifyNoAd(topButtonWideSelector);
}
Also used : AdsBaseObject(com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject) Test(org.testng.annotations.Test)

Example 3 with AdsBaseObject

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

the class TestAdsDfpParamsPresentMercury method dfpParamsPresentSyntheticMercury.

@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
@Test(dataProviderClass = MobileAdsDataProvider.class, dataProvider = "dfpParamsSynthetic", groups = { "MobileAds", "AdsDfpParamsPresentSyntheticMercury" })
public void dfpParamsPresentSyntheticMercury(String wikiName, String article, String queryString, String adUnit, String slot, List<String> pageParams, List<String> slotParams) {
    String testedPage = urlBuilder.getUrlForPath(wikiName, article);
    if (StringUtils.isNotEmpty(queryString)) {
        testedPage = urlBuilder.appendQueryStringToURL(testedPage, queryString);
    }
    AdsBaseObject ads = new AdsBaseObject(driver, testedPage);
    ads.verifyGptIframe(adUnit, slot, SRC_MOBILE);
    ads.verifyGptParams(slot, pageParams, slotParams);
    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 4 with AdsBaseObject

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

the class TestAdsDisableGpt method adsDisableGpt.

private void adsDisableGpt(String wikiName, String article, String instantGlobals, String slotName, String disasterProviders) {
    String url = urlBuilder.getUrlForPath(wikiName, article);
    url = urlBuilder.appendQueryStringToURL(url, DISASTER_RECOVERY_URL_PARAM);
    if (StringUtils.isNotEmpty(instantGlobals)) {
        url = urlBuilder.appendQueryStringToURL(url, instantGlobals);
    }
    new AdsBaseObject(driver, url).verifyProvidersChain(slotName, disasterProviders);
}
Also used : AdsBaseObject(com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject)

Example 5 with AdsBaseObject

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

the class TestAdsAdDriverForcedStatusOasis method adsAdDriverForcedStatusSuccessOasis.

@Test(dataProviderClass = AdsDataProvider.class, dataProvider = "adDriverForcedStatusSuccess", groups = "AdsAdDriverForcedStatusOasis")
public void adsAdDriverForcedStatusSuccessOasis(String wikiName, String article, List<String> slots) {
    String testedPage = urlBuilder.getUrlForPath(wikiName, article);
    AdsBaseObject ads = new AdsBaseObject(driver, testedPage);
    ads.verifyForcedSuccessScriptInSlots(slots);
}
Also used : AdsBaseObject(com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject) Test(org.testng.annotations.Test)

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