当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript by.model方法代码示例

本文整理汇总了TypeScript中protractor.by.model方法的典型用法代码示例。如果您正苦于以下问题:TypeScript by.model方法的具体用法?TypeScript by.model怎么用?TypeScript by.model使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在protractor.by的用法示例。


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

示例1: it

  it('should add numbers', () => {
    element(by.model('first')).sendKeys('4');
    element(by.model('second')).sendKeys('5');
    element(by.id('gobutton')).click();

    expect(element(by.binding('latest')).getText()).toEqual('9');
  });
开发者ID:angular,项目名称:protractor-cookbook,代码行数:7,代码来源:spec.ts

示例2: it

    it('should be possible to control phone order via the drop-down menu', function() {
      let queryField = element(by.model('$ctrl.query'));
      let orderSelect = element(by.model('$ctrl.orderProp'));
      let nameOption = orderSelect.element(by.css('option[value="name"]'));
      let phoneNameColumn = element.all(by.repeater('phone in $ctrl.phones').column('phone.name'));

      function getNames() {
        return phoneNameColumn.map(function(elem: ElementFinder) {
          return elem.getText();
        });
      }

      queryField.sendKeys('tablet');   // Let's narrow the dataset to make the assertions shorter

      expect(getNames()).toEqual([
        'Motorola XOOM\u2122 with Wi-Fi',
        'MOTOROLA XOOM\u2122'
      ]);

      nameOption.click();

      expect(getNames()).toEqual([
        'MOTOROLA XOOM\u2122',
        'Motorola XOOM\u2122 with Wi-Fi'
      ]);
    });
开发者ID:AnthonyPAlicea,项目名称:angular,代码行数:26,代码来源:e2e-spec.ts

示例3: login

export function login() {
    browser.get(env.baseUrl);
    browser.waitForAngular();
    element(by.model("vm.user.username")).sendKeys(USER.USERNAME)
    element(by.model("vm.user.password")).sendKeys(USER.PASSWORD);
    element(by.css(".loginButton")).click();
    browser.waitForAngular();
}
开发者ID:3drepo,项目名称:3drepo.io,代码行数:8,代码来源:helpers.ts

示例4: constructor

    constructor()
    {
        this.firstTextBox=element(by.model("first"));
        this.secondTextBox = element(by.model("second"));
        this.goButton = element(by.id("gobutton"));
        this.result = element(by.repeater("result in memory")).element(by.css("td:nth-child(3)"));

    }
开发者ID:ashutoshchittora,项目名称:TypeScriptCucumberProtractorVisualStudioCode,代码行数:8,代码来源:Calculator.ts

示例5: it

 it('can change the role of a member', () => {
   projectSettingsPage.membersTab.listFilter.sendKeys('dude');
   browser.wait(ExpectedConditions.visibilityOf(projectSettingsPage.membersTab.list.first()
     .element(by.model('user.role'))));
   Utils.clickDropdownByValue(projectSettingsPage.membersTab.list.first().element(by.model('user.role')), 'Manager');
   expect<any>(projectSettingsPage.membersTab.list.first().element(by.model('user.role'))
     .element(by.css('option:checked')).getText()).toEqual('Manager');
   projectSettingsPage.membersTab.listFilter.clear();
 });
开发者ID:,项目名称:,代码行数:9,代码来源:

示例6: constructor

 constructor() {
   this.first_operand = element(by.model('first'));
   this.second_operand = element(by.model('second'));
   this.operator = (optor:string) => {
    return element(by.cssContainingText('option',optor));
   }
   this.go_button = element(by.id('gobutton'));
   this.result = element(by.binding('latest'));
 }
开发者ID:angular,项目名称:protractor-cookbook,代码行数:9,代码来源:calcPage.ts

示例7: it

        it('when valid should not show validation error', () => {
            // whne
            const input = element(by.model('ctrl.user.email'));
            input.clear();
            input.sendKeys('c.c@gmail.com');

            // then
            const errorMsg = input.element(by.xpath('following-sibling::span'));
            expect(errorMsg.getAttribute('class')).toBe('ng-hide');
        });
开发者ID:ccrowhurstram,项目名称:ram-protractor-training,代码行数:10,代码来源:exercise1.spec.ts

示例8: it

    it("should be navigated to HomePage when login with valid account", async function(){
        
        let username_ele = browser.element(by.model("Auth.user.name"))
        let password = browser.element(by.model("Auth.user.password"))
        let userDes = browser.element(by.model("model[options.key]"))
        let login_btn = browser.element(by.xpath("//button[contains(text(),'Login')]"))
        let home_title= browser.element(by.xpath("//h1[text()='Home']"))

        await browser.waitForAngularEnabled(true)
        await browser.get("http://www.way2automation.com/angularjs-protractor/registeration/#/login")
        await browser.manage().window().maximize()
        await username_ele.sendKeys("angular")
        await password.sendKeys("password")
        await userDes.sendKeys("ABC")
        await login_btn.click()
        
        await expect(home_title.isDisplayed()).toBe(true)
        await browser.sleep(5000)
    })
开发者ID:AnhPhamIT,项目名称:Protractor,代码行数:19,代码来源:Login.ts


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