zoukankan      html  css  js  c++  java
  • [Protractor] Getting Started With Protractor

    Protractor is an end-to-end testing library for AngularJS. 

    Install: 

    npm install -g protractor

    This will install two command line tools, protractor and webdriver-manager

    Set up:

    webdriver-manager update
    webdriver-manager start

    Protractor Config file:

    exports.config = {
        specs: [
            './e2etest/**/*.spec.js'
        ],
        seleniumAddress: 'http://localhost:4444/wd/hub'
    };

    index.spec.js:

    describe('angularjs homepage todo list', function() {
        it('should add a todo', function() {
            browser.get('https://angularjs.org');
            expect(browser.getTitle()).toBe('AngularJS — Superheroic JavaScript MVW Framework');
        });
    });

    RUN:

    protractor conf.js
  • 相关阅读:
    jmeter工具应用1
    django1
    5.自动化测试模型
    4.清除cookie操作
    2.操作浏览器
    3.8种元素定位
    1.介绍与环境安装
    模块
    urllib库
    自动化测试PO模式
  • 原文地址:https://www.cnblogs.com/Answer1215/p/4966095.html
Copyright © 2011-2022 走看看