| import { browser, protractor } from 'protractor'; |
| |
| export function changeURL(url: string) { |
| return browser.get(url).then(() => { |
| return browser.getCurrentUrl().then((newURL) => { |
| return newURL; |
| }); |
| }); |
| } |
| |
| export function waitForElementInVisibility (_element ) { |
| let EC = protractor.ExpectedConditions; |
| return browser.wait(EC.invisibilityOf(_element)); |
| } |
| |
| export function waitForElementPresence (_element ) { |
| let EC = protractor.ExpectedConditions; |
| return browser.wait(EC.presenceOf(_element)); |
| } |
| |
| export function waitForElementVisibility (_element ) { |
| let EC = protractor.ExpectedConditions; |
| return browser.wait(EC.visibilityOf(_element)); |
| } |
| |
| export function waitForStalenessOf (_element ) { |
| let EC = protractor.ExpectedConditions; |
| return browser.wait(EC.stalenessOf(_element)); |
| } |
| |