本文整理汇总了TypeScript中protractor.ExpectedConditions.urlContains方法的典型用法代码示例。如果您正苦于以下问题:TypeScript ExpectedConditions.urlContains方法的具体用法?TypeScript ExpectedConditions.urlContains怎么用?TypeScript ExpectedConditions.urlContains使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类protractor.ExpectedConditions
的用法示例。
在下文中一共展示了ExpectedConditions.urlContains方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: it
it('should start on login page', () => {
browser.waitForAngularEnabled(false);
browser.get('/');
browser.wait(ExpectedConditions.urlContains('/Identity/Account/Login'), 12000);
expect(element(by.id('account'))).toBeTruthy(); // the account form is present
expect(element(by.css('form#account'))).toBeTruthy(); // the account form is present
const registerLink = element(by.css('form#account p:nth-of-type(2) a'));
expect(registerLink).toBeTruthy();
expect(registerLink.getText()).toBe('Register as a new user');
registerLink.click();
browser.wait(ExpectedConditions.urlContains('/Identity/Account/Register'), 12000);
});
示例2: it
it('should navigate to "about" when clicking on about button', async () => {
const isDisplayed = await page.aboutMenu$.isDisplayed();
await page.aboutMenu$.click();
await browser.sleep(navigateSleep);
browser.wait(ExpectedConditions.urlContains(page.navigatedTo_About), 5000);
});
示例3: go
async go() {
await browser.get('#/builders');
await browser.wait(EC.urlContains('#/builders'),
5000,
"URL does not contain #/builders");
const localBuilder = element.all(By.linkText(this.builder));
await localBuilder.click();
}
示例4: it
it('should create a ladder with default settings', () => {
create.navigateTo();
create.setParameter('name', 'bar');
create.setParameter('teams_count', '3');
create.setParameter('players_per_team', '3');
create.submit();
browser.wait(ExpectedConditions.urlContains('bar'), 5 * oneSecond);
});
示例5: it
it('redirects to projects page if already logged in', () => {
BellowsLoginPage.logout();
loginPage.loginAsUser();
SignupPage.get();
browser.wait(ExpectedConditions.urlContains('projects'), constants.conditionTimeout);
browser.getCurrentUrl().then(() => {
expect(browser.getCurrentUrl()).toContain('/app/projects');
});
});
示例6: go
async go() {
await browser.get('#/waterfall');
await browser.wait(EC.urlContains('#/waterfall'),
10000,
"URL does not contain #/waterfall");
await browser.wait(EC.elementToBeClickable($("div.waterfall")),
5000,
"waterfall is not clickable");
}
示例7: go
async go() {
await browser.get('#/mydashboard');
await browser.wait(EC.urlContains('#/mydashboard'),
10000,
"URL does not contain #/mydashboard");
var buildLink = element.all(By.linkText("runtests/1")).first();
await browser.wait(EC.elementToBeClickable(buildLink),
500000,
"runtests/1 link not clickable");
await buildLink.click();
}
示例8: go
async go() {
await browser.get('#/builders');
await browser.wait(EC.urlContains('#/builders'),
10000,
"URL does not contain #/builders");
let localBuilder = element(By.linkText(this.builder));
await browser.wait(EC.elementToBeClickable(localBuilder),
5000,
"local builder not clickable");
await localBuilder.click();
}