• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

TypeScript protractor.ProtractorExpectedConditions类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了TypeScript中protractor.ProtractorExpectedConditions的典型用法代码示例。如果您正苦于以下问题:TypeScript ProtractorExpectedConditions类的具体用法?TypeScript ProtractorExpectedConditions怎么用?TypeScript ProtractorExpectedConditions使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了ProtractorExpectedConditions类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。

示例1:

/// <reference path="../../built/index.d.ts" />
import {Browser, ElementArrayFinder, ElementFinder, ElementHelper, ProtractorExpectedConditions, ProtractorBy} from 'protractor';
let browser: Browser;
let by: ProtractorBy;
let By: ProtractorBy;
let element: ElementHelper;
let $: (search: string) => ElementFinder;
let $$: (search: string) => ElementArrayFinder;
let ExpectedConditions: ProtractorExpectedConditions;
element.all(by.css('')).clone();
element.all(by.css('')).then(() => {}, () => {});  // this is not appearing on the website
element.all(by.css('')).filter(() => {});
element.all(by.css('')).get(0);
element.all(by.css('')).first();
element.all(by.css('')).last();
element.all(by.css('')).count();
element.all(by.css('')).locator();
element.all(by.css('')).each((element: any, index: number) => {});
element.all(by.css('')).map(() => {});
element.all(by.css('')).reduce(() => {}, '');
element.all(by.css('')).evaluate('expression');
element.all(by.css('')).allowAnimations(false);
element.all(by.css('')).$$('');
element.all(by.css('')).getDriver();
element.all(by.css('')).getId();
element.all(by.css('')).getRawId();
element.all(by.css('')).serialize();
element.all(by.css('')).findElement(by.css(''));
element.all(by.css('')).click();
element.all(by.css('')).getTagName();
element.all(by.css('')).getCssValue('cssStyleProperty');
开发者ID:daominhdam,项目名称:protractor,代码行数:31,代码来源:test_pass.ts


示例2:

/// <reference path="../../built/ambient.d.ts" />
import {ProtractorExpectedConditions} from 'protractor';
let ExpectedConditions: ProtractorExpectedConditions;
ExpectedConditions.not(0);
ExpectedConditions.not('1');
ExpectedConditions.not(true);
ExpectedConditions.and(0);
ExpectedConditions.and('1');
ExpectedConditions.and(true);
ExpectedConditions.or(0, () => {});
ExpectedConditions.or('1', () => {});
ExpectedConditions.or(true, () => {});
ExpectedConditions.or(() => {}, 0);
ExpectedConditions.or(() => {}, '1');
ExpectedConditions.or(() => {}, true);
ExpectedConditions.or(0, '1');
ExpectedConditions.alertIsPresent(0);
ExpectedConditions.alertIsPresent('1');
ExpectedConditions.alertIsPresent(true);
ExpectedConditions.alertIsPresent(() => {});
ExpectedConditions.elementToBeClickable(0);
ExpectedConditions.elementToBeClickable('1');
ExpectedConditions.elementToBeClickable();
ExpectedConditions.elementToBeClickable(true);
ExpectedConditions.elementToBeClickable(() => {});
开发者ID:AleNoemi,项目名称:protractor,代码行数:25,代码来源:test_fail_expected_conditions.ts


示例3: sendKeysOnElement

 async sendKeysOnElement(xpath:string, data:string, timeOut=this.timeOut) {
     console.log("Sending key to element " + xpath)
     var ele:ElementFinder = await this.curBrowser.element(by.xpath(xpath));
     await this.curBrowser.wait(this.until.presenceOf(ele), timeOut, 'Element ' + xpath +' takes too long to appear in the DOM');
     await this.curBrowser.wait(this.until.visibilityOf(ele), timeOut, 'Element '+ xpath +' is not visible');
     await ele.sendKeys(data)
 }
开发者ID:AnhPhamIT,项目名称:Protractor,代码行数:7,代码来源:actionSupport.ts


示例4: clickOnElement

    async clickOnElement(xpath:string, timeout=this.timeOut){
        console.log("Clicking on element " + xpath)
        var ele= await this.curBrowser.element(by.xpath(xpath))
        await this.curBrowser.wait(this.until.presenceOf(ele),timeout, 'Element ' + xpath +' takes too long to appear in the DOM')
        await this.curBrowser.wait(this.until.elementToBeClickable(ele), this.timeOut, 'Element ' + xpath +' is NOT clickable')
        await ele.click()

    }
开发者ID:AnhPhamIT,项目名称:Protractor,代码行数:8,代码来源:actionSupport.ts


示例5: getElementAttribute

 async getElementAttribute(xpath:string, attribute:string):Promise<string>{
     var ele:ElementFinder = await this.curBrowser.element(by.xpath(xpath))
     var attributeValue:string =""
     await this.curBrowser.wait(this.until.presenceOf(ele), this.timeOut, 'Element ' + xpath + ' takes too long to appear in the DOM' )
     
     await ele.getAttribute(attribute).then(function(value){
         console.log("Attribute value: " + value)
         attributeValue = value
     })
     return attributeValue
 }
开发者ID:AnhPhamIT,项目名称:Protractor,代码行数:11,代码来源:actionSupport.ts


示例6: waitForElementDisplay

 async waitForElementDisplay(xpath:string) {
     var ele = await this.curBrowser.element(by.xpath(xpath));
     await this.curBrowser.wait(this.until.presenceOf(ele), this.timeOut, 'Element ' + xpath +' takes too long to appear in the DOM');
     await this.curBrowser.wait(this.until.visibilityOf(ele), this.timeOut, 'Element '+ xpath +' is not visible on screen');
    
 }
开发者ID:AnhPhamIT,项目名称:Protractor,代码行数:6,代码来源:actionSupport.ts



注:本文中的protractor.ProtractorExpectedConditions类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
TypeScript protractor.browser类代码示例发布时间:2022-05-25
下一篇:
TypeScript protractor.ProtractorBy类代码示例发布时间:2022-05-25
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap