Search in sources :

Example 1 with InBrowser

use of com.wikia.webdriver.common.core.annotations.InBrowser in project selenium-tests by Wikia.

the class TestAdsFandomUap method adsFandomHubUapMobile.

@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
@Test(dataProviderClass = FandomAdsDataProvider.class, dataProvider = "fandomHubUapPage", groups = { "AdsFandomUapMobile" })
@RelatedIssue(issueID = "ADEN-4339")
public void adsFandomHubUapMobile(String pageType, String pageName, long atfId, long btfId) {
    AdsFandomObject fandomPage = loadPage(pageName, pageType);
    fandomPage.triggerOnScrollSlots();
    verifyUapAtf(atfId, AdsFandomContent.TOP_BOXAD, fandomPage);
    verifyUapBtf(btfId, AdsFandomContent.INCONTENT_BOXAD_MOBILE, AdsFandomContent.BOTTOM_LEADERBOARD, fandomPage);
}
Also used : AdsFandomObject(com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsFandomObject) Test(org.testng.annotations.Test) RelatedIssue(com.wikia.webdriver.common.core.annotations.RelatedIssue) InBrowser(com.wikia.webdriver.common.core.annotations.InBrowser)

Example 2 with InBrowser

use of com.wikia.webdriver.common.core.annotations.InBrowser 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 3 with InBrowser

use of com.wikia.webdriver.common.core.annotations.InBrowser 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 InBrowser

use of com.wikia.webdriver.common.core.annotations.InBrowser in project selenium-tests by Wikia.

the class TestAdsFandom method adsFandomAdsMobile.

@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
@Test(dataProviderClass = FandomAdsDataProvider.class, dataProvider = "fandomAds", groups = { "AdsMobilePresenceFandom", "AdsMobileFandom" })
public void adsFandomAdsMobile(String pageType, String pageName) {
    AdsFandomObject fandomPage = loadPage(pageName, pageType);
    verifySlotsOnMobile(fandomPage, pageType);
}
Also used : AdsFandomObject(com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsFandomObject) Test(org.testng.annotations.Test) InBrowser(com.wikia.webdriver.common.core.annotations.InBrowser)

Example 5 with InBrowser

use of com.wikia.webdriver.common.core.annotations.InBrowser in project selenium-tests by Wikia.

the class TestCorrelatorDFP method correlatorIDInQueryStringShouldBeTheSameMercury.

@InBrowser(browser = Browser.CHROME, emulator = Emulator.GOOGLE_NEXUS_5)
@Test(groups = "DFPCorrelatorMercury")
@NetworkTrafficDump
@Execute(onWikia = "project43")
public void correlatorIDInQueryStringShouldBeTheSameMercury() {
    networkTrafficInterceptor.startIntercepting("DFPCorrelator");
    new HomePage().open();
    networkTrafficInterceptor.logDFP(correlatorMobile);
}
Also used : HomePage(com.wikia.webdriver.pageobjectsfactory.pageobject.HomePage) NetworkTrafficDump(com.wikia.webdriver.common.core.annotations.NetworkTrafficDump) Execute(com.wikia.webdriver.common.core.annotations.Execute) Test(org.testng.annotations.Test) InBrowser(com.wikia.webdriver.common.core.annotations.InBrowser)

Aggregations

InBrowser (com.wikia.webdriver.common.core.annotations.InBrowser)184 Test (org.testng.annotations.Test)180 Execute (com.wikia.webdriver.common.core.annotations.Execute)146 PostEntity (com.wikia.webdriver.elements.mercury.components.discussions.common.PostEntity)50 PostDetailsPage (com.wikia.webdriver.elements.mercury.pages.discussions.PostDetailsPage)35 PostsListPage (com.wikia.webdriver.elements.mercury.pages.discussions.PostsListPage)26 GuidelinesPage (com.wikia.webdriver.elements.mercury.pages.discussions.GuidelinesPage)17 AdsBaseObject (com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsBaseObject)15 NetworkTrafficDump (com.wikia.webdriver.common.core.annotations.NetworkTrafficDump)13 MoreOptionsPopOver (com.wikia.webdriver.elements.mercury.components.discussions.common.MoreOptionsPopOver)12 SearchResultsPage (com.wikia.webdriver.elements.mercury.pages.SearchResultsPage)12 LightboxComponentObject (com.wikia.webdriver.pageobjectsfactory.componentobject.lightbox.LightboxComponentObject)12 VideoFanTakeover (com.wikia.webdriver.pageobjectsfactory.componentobject.ad.VideoFanTakeover)11 CategoriesFieldset (com.wikia.webdriver.elements.mercury.components.discussions.common.category.CategoriesFieldset)10 UserPostsPage (com.wikia.webdriver.elements.mercury.pages.discussions.UserPostsPage)10 AdsFandomObject (com.wikia.webdriver.pageobjectsfactory.pageobject.adsbase.AdsFandomObject)9 RelatedIssue (com.wikia.webdriver.common.core.annotations.RelatedIssue)7 CategoryPill (com.wikia.webdriver.elements.mercury.components.discussions.common.category.CategoryPill)7 PostActionsRow (com.wikia.webdriver.elements.mercury.components.discussions.common.PostActionsRow)6 ReplyCreator (com.wikia.webdriver.elements.mercury.components.discussions.common.ReplyCreator)5