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


TypeScript browser.driver.get方法代码示例

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


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

示例1: it

  it('should transfer component state', function() {
    // Load the page without waiting for Angular since it is not bootstrapped automatically.
    browser.driver.get(browser.baseUrl + 'transferstate');

    // Test the contents from the server.
    const serverDiv = browser.driver.findElement(by.css('div'));
    expect(serverDiv.getText()).toEqual('5');

    // Bootstrap the client side app and retest the contents
    browser.executeScript('doBootstrap()');
    expect(element(by.css('div')).getText()).toEqual('50');

    // Make sure there were no client side errors.
    verifyNoBrowserErrors();
  });
开发者ID:BobChao87,项目名称:angular,代码行数:15,代码来源:transferstate-spec.ts

示例2: it

  it('should measure performance', function() {
    browser.sleep(3000);  // wait for extension to load

    browser.driver.get(TEST_URL);

    browser.executeScript('window.startProfiler()').then(function() {
      console.log('started measuring perf');
    });

    browser.executeAsyncScript('setTimeout(arguments[0], 1000);');
    browser.executeScript('window.forceGC()');

    browser.executeAsyncScript('var cb = arguments[0]; window.getProfile(cb);')
        .then(function(profile: any) {
          assertEventsContainsName(profile, 'gc');
          assertEventsContainsName(profile, 'script');
        });
  });
开发者ID:AlmogShaul,项目名称:angular,代码行数:18,代码来源:spec.ts

示例3: it

  it('should display: Hello world!', function() {
    // Load the page without waiting for Angular since it is not bootstrapped automatically.
    browser.driver.get(browser.baseUrl + 'helloworld');

    const style = browser.driver.findElement(by.css('style[ng-transition="hlw"]'));
    expect(style.getText()).not.toBeNull();

    // Test the contents from the server.
    const serverDiv = browser.driver.findElement(by.css('div'));
    expect(serverDiv.getText()).toEqual('Hello world!');

    // Bootstrap the client side app.
    browser.executeScript('doBootstrap()');

    // Retest the contents after the client bootstraps.
    expect(element(by.css('div')).getText()).toEqual('Hello world!');

    // Make sure the server styles got replaced by client side ones.
    expect(element(by.css('style[ng-transition="hlw"]')).isPresent()).toBe(false);
    expect(element(by.css('style')).getText()).toBe('');

    // Make sure there were no client side errors.
    verifyNoBrowserErrors();
  });
开发者ID:BobChao87,项目名称:angular,代码行数:24,代码来源:helloworld-spec.ts

示例4: goTo

export function goTo(profile: string) {
    browser.waitForAngular();
    return browser.driver.get(`http://localhost:49152/${profile}`);
}
开发者ID:vfcosta,项目名称:angular-theme,代码行数:4,代码来源:utils.ts

示例5: beforeEach

 beforeEach(() => {
   browser.driver.get('http://localhost:8080');
 });
开发者ID:marley-js,项目名称:Mastering-TypeScript-Programming-Techniques,代码行数:3,代码来源:spec.ts

示例6: Given

 Given('I go to {stringInDoubleQuotes}', (page) => {
     browser.waitForAngular();
     return browser.driver.get(`http://localhost:49152${page}`);
 });
开发者ID:vfcosta,项目名称:angular-theme,代码行数:4,代码来源:steps.ts


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