use of com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject in project selenium-tests by Wikia.
the class TestAdsBrowserError method adsScrollHandlerBrowserError.
@Test(groups = "AdsScrollHandlerBrowserError")
public void adsScrollHandlerBrowserError() {
JavascriptActions jsActions = new JavascriptActions(driver);
String testPage = urlBuilder.getUrlForPath("project43", "SyntheticTests/UAP");
testPage = urlBuilder.appendQueryStringToURL(testPage, "scrollhandler=1");
AdsBaseObject adsBaseObject = new AdsBaseObject(driver);
adsBaseObject.getUrl(testPage);
jsActions.addErrorListenerScript();
jsActions.waitForJavaScriptTruthy("window.scrollY == 0");
jsActions.scrollBy(0, 5001);
jsActions.waitForJavaScriptTruthy("window.scrollY != 0");
Assertion.assertEquals(jsActions.getWindowErrors(), "");
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject in project selenium-tests by Wikia.
the class TestAdsNoAdsForSony method adsNoAdsForSonyMobile.
@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
@Test(dataProviderClass = AdsDataProvider.class, dataProvider = "noAdsForSony", groups = "AdsNoAdsForSonyMobile")
public void adsNoAdsForSonyMobile(String wikiName, String path) {
String testedPage = urlBuilder.getUrlForPath(wikiName, path);
SonySideViewObject sonyPage = new SonySideViewObject(driver);
AdsBaseObject wikiPage = sonyPage.goToDestinationPage(testedPage);
wikiPage.verifyNoAdsOnMobilePage();
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject in project selenium-tests by Wikia.
the class TestAdsNoAdsForSony method adsNoAdsForSonyOasis.
@Test(dataProviderClass = AdsDataProvider.class, dataProvider = "noAdsForSony", groups = "AdsNoAdsForSonyOasis")
public void adsNoAdsForSonyOasis(String wikiName, String path) {
String testedPage = urlBuilder.getUrlForPath(wikiName, path);
SonySideViewObject sonyPage = new SonySideViewObject(driver);
AdsBaseObject wikiPage = sonyPage.goToDestinationPage(testedPage);
wikiPage.verifyNoAdsOnPage();
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject in project selenium-tests by Wikia.
the class TestAdsOnSpecial method TestAdsOnFilePages.
@Test(groups = { "TestAdsOnFilePages" }, dataProviderClass = AdsDataProvider.class, dataProvider = "filePages")
public void TestAdsOnFilePages(String wikiName, String article, String lineItemId, String adUnit, String leaderboardSlot, String medrecSlot, Dimension resolution) throws Exception {
String testedPage = urlBuilder.getUrlForPath(wikiName, article);
AdsBaseObject ads = new AdsBaseObject(driver, testedPage, resolution);
ads.verifyGptIframe(adUnit, leaderboardSlot, "gpt");
ads.verifyGptAdInSlot(leaderboardSlot, lineItemId, "");
ads.verifyGptIframe(adUnit, medrecSlot, "gpt");
ads.verifyGptAdInSlot(medrecSlot, lineItemId, "");
}
use of com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject in project selenium-tests by Wikia.
the class TestAdsBtfBlocking method adsAtfDelayBtfMercury.
@InBrowser(emulator = Emulator.GOOGLE_NEXUS_5, browser = Browser.CHROME)
@Test(dataProviderClass = AdsDataProvider.class, dataProvider = "delayBtf", groups = "AdsBtfBlockingMercury")
@RelatedIssue(issueID = "ADEN-4344")
public void adsAtfDelayBtfMercury(String wikiName, String article, boolean isWgVarOn) throws InterruptedException {
PageObjectLogging.log("$wgAdDriverDelayBelowTheFold", String.valueOf(isWgVarOn), true);
String testedPage = urlBuilder.getUrlForPath(wikiName, article);
AdsBaseObject adsBaseObject = new AdsBaseObject(driver, testedPage, MOBILE_SIZE);
adsBaseObject.waitForPageLoadedWithGpt();
Assertion.assertTrue(adsBaseObject.checkSlotOnPageLoaded(AdsContent.MOBILE_AD_IN_CONTENT), AdsContent.MOBILE_AD_IN_CONTENT);
Assertion.assertTrue(adsBaseObject.checkSlotOnPageLoaded(AdsContent.MOBILE_PREFOOTER), AdsContent.MOBILE_PREFOOTER);
}
Aggregations