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);
}
}
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);
}
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);
}
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);
}
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);
}
Aggregations