use of com.wikia.webdriver.common.core.elemnt.JavascriptActions in project selenium-tests by Wikia.
the class VideoFanTakeover method scrollToAdVideo.
private void scrollToAdVideo(WebElement element) {
JavascriptActions javascriptActions = new JavascriptActions(driver);
javascriptActions.scrollToElement(element, GLOBAL_NAV_HEIGHT);
}
use of com.wikia.webdriver.common.core.elemnt.JavascriptActions in project selenium-tests by Wikia.
the class TestAdsVuapTheNewGeneration method openPageWithVideoInLocalStorage.
private AdsBaseObject openPageWithVideoInLocalStorage(Page page) {
final AdsBaseObject ads = new AdsBaseObject(driver);
ads.getUrl(urlBuilder.getUrlForWiki("project43"));
JavascriptActions runScript = new JavascriptActions(driver);
runScript.execute("localStorage.setItem('" + VuapVideos.PORVATA_VAST + VuapVideos.VAST_VIDEO + ");");
ads.getUrl(page);
return ads;
}
use of com.wikia.webdriver.common.core.elemnt.JavascriptActions 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(), "");
}
Aggregations