本文整理匯總了TypeScript中protractor.element類的典型用法代碼示例。如果您正苦於以下問題:TypeScript element類的具體用法?TypeScript element怎麽用?TypeScript element使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了element類的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: it
it('"Bombasto" should be the logged in user', function () {
let loggedInUser = element.all(by.xpath('//div[text()="Name: Bombasto"]')).get(0);
expect(loggedInUser).toBeDefined();
});
示例2: it
it('supports ng-repeat', function () {
expect(element.all(by.css('hero-detail')).count()).toBe(3);
});
示例3: beforeEach
beforeEach(() => {
browser.get('/forms/ts/selectControl/index.html');
select = element(by.css('select'));
options = element.all(by.css('option'));
p = element(by.css('p'));
});
示例4: beforeEach
beforeEach(function() {
let FormControlOption = element.all(by.css('select option')).get(0);
FormControlOption.click();
});
示例5: it
it(`has h2 '${expectedH2}'`, () => {
let h2 = element.all(by.css('h2')).map((elt: any) => elt.getText());
expect(h2).toEqual(expectedH2);
});