本文整理匯總了TypeScript中protractor.browser.ExpectedConditions.visibilityOf方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript browser.ExpectedConditions.visibilityOf方法的具體用法?TypeScript browser.ExpectedConditions.visibilityOf怎麽用?TypeScript browser.ExpectedConditions.visibilityOf使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類protractor.browser.ExpectedConditions
的用法示例。
在下文中一共展示了browser.ExpectedConditions.visibilityOf方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: goOnVideosList
async goOnVideosList (isMobileDevice: boolean, isSafari: boolean) {
let url: string
// We did not upload a file on a mobile device
if (isMobileDevice === true || isSafari === true) {
url = 'https://peertube2.cpy.re/videos/local'
} else {
url = '/videos/recently-added'
}
await browser.get(url)
// Waiting the following element does not work on Safari...
if (isSafari === true) return browser.sleep(3000)
const elem = element.all(by.css('.videos .video-miniature .video-miniature-name')).first()
return browser.wait(browser.ExpectedConditions.visibilityOf(elem))
}
示例2: navigateTo
async navigateTo () {
await element(by.css('.header .upload-button')).click()
return browser.wait(browser.ExpectedConditions.visibilityOf(element(by.css('.upload-video-container'))))
}