UNPKG

@financial-times/o-ads

Version:

This package contains the core functionality used by the FT in providing ads across all of its sites. This includes ft.com, howtospendit.com, ftadviser.com and other specialist titles.

18 lines (17 loc) 940 B
"use strict"; const wait = 8000; module.exports = { before: function (browser) { browser.url(browser.launch_url + '/Individual-Ad.html'); }, 'Step 1: go to leaderboard demo page': function (browser) { browser.waitForElementVisible('body', wait); }, 'Step 2: verify the leaderboard advert is displayed': function (browser) { browser.waitForElementVisible('#leaderboard-gpt', wait, 'Advert has been initiated and visible') // switch focus to first iframe .page.ad().cleverFrame('google_ads_iframe_/5887/test.5887.origami_0') // wait for 1 second for advert to appear .waitForElementPresent('.img_ad', wait, 'Advert image is visible') // make sure we can see the correct URL .assert.attributeContains('img', 'src', 'https://tpc.googlesyndication.com/simgad/12593654562240684097', 'Correct image is displayed for leaderboard') // switch focus back to main page .page.ad().cleverFrameParent().end(); } };