本文整理汇总了TypeScript中protractor.browser.isElementPresent方法的典型用法代码示例。如果您正苦于以下问题:TypeScript browser.isElementPresent方法的具体用法?TypeScript browser.isElementPresent怎么用?TypeScript browser.isElementPresent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类protractor.browser
的用法示例。
在下文中一共展示了browser.isElementPresent方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: it
it('Deselect bubble by click on "X", or on the bubble(TC30)', async () => {
await mapChart.clickOnBubble('green');
await mapChart.clickXiconOnBubble('USA');
expect(await browser.isElementPresent(mapChart.selectedCountryLabel)).toBeFalsy();
await mapChart.clickOnBubble('green');
expect(await mapChart.selectedCountriesLabels.getText()).toMatch('United States');
expect(await mapChart.selectedBubbles.get(0).getAttribute('style')).toContain('opacity: 1;');
await mapChart.deselectBubble('green');
expect(await browser.isElementPresent(mapChart.selectedCountryLabel)).toBeFalsy();
});
示例2: it
it('should load node children asynchronously', async () => {
page.navigateTo();
page.getAsyncChildrenNodeFolding().click();
const firstAsyncChild = page.getFirstAsyncChild();
expect(await browser.isElementPresent(firstAsyncChild)).toBe(true);
expect(await firstAsyncChild.getText()).toEqual('Input Mono');
expect(await page.getLastAsyncChild().getText()).toEqual('Source Code Pro');
});
示例3:
return modal.isPresent().then(isPresent => {
if (isPresent) {
console.error('Modal dialog is showed, need to click confirm button');
return browser.isElementPresent(confirmButton)
.then(isPresent => {
if (isPresent) {
console.error('clicking on confirm button');
return confirmButton.click();
}
}, error => {
console.log('error');
console.log(error);
});
}
});
示例4:
browser.wait(() => {
return browser.isElementPresent(connect);
}, Constants.longWait);
示例5: waitForElement
export function waitForElement(selector: string) {
return browser.isElementPresent(by.css(selector) as ProtractorBy);
}
示例6: waitForElement
export async function waitForElement(selector: string) {
return await browser.isElementPresent(by.css(selector));
}
示例7: expectOverlayInFullscreen
/** Expects the overlay container to be in fullscreen mode. */
async function expectOverlayInFullscreen() {
expect(await browser.isElementPresent(by.css('#fullscreen-pane > .cdk-overlay-container')))
.toBe(true, 'Expected the overlay container to be in fullscreen mode.');
}
示例8: expectOverlayInBody
/** Expects the overlay container to be inside of the body element. */
async function expectOverlayInBody() {
expect(await browser.isElementPresent(by.css('body > .cdk-overlay-container')))
.toBe(true, 'Expected the overlay container to be inside of the body.');
}
示例9: waitForDialog
function waitForDialog() {
return browser.isElementPresent(by.css('md-dialog-container') as ProtractorBy);
}