Install:

npm install -g elementor

Then run:

webdriver-manager start

Lets say if we want to test 'http://angular.github.io/protractor/#/api' page:

elementor http://angular.github.io/protractor/#/api

Notice: close the chrome debug tool first! Otherwise protractor cannot run!

  • When the page open, right click the tab, choose duplicate!
  • Choose the second tab, open the chrome debugger tool
  • In debugger tool, in elements tab, inspet one element, see the protractor tab:

The number "1" you see here indicate that there is only 1 element match hte locators.

Let's select:

by.css("#searchInput")
  • Go to the first window, click the extension tool:

  • Type what you want in the search input:

Then you can find the element you want.

  • You can use 'sendKeys()' function to trigger seach:
element.all(by.css("#searchInput")).sendKeys("filter")

  • You can use 'clear()' function to clean the input:
element.all(by.css("#searchInput")).clear()

---------------------------------

You can also use webstorm plugin for testing. Install the 'elementor' plugin.

When imaging you are doing some unit testing.

You can select the code you want, right click, in the pop menu select 'Test selected locator'.

[Protractor] Protractor Interactive with elementor的更多相关文章

  1. protractor protractor.conf.js [launcher] Process exited with error code 1 undefined:1190

    y@y:karma-t01$ protractor protractor.conf.js [launcher] Process exited with error code undefined: vl ...

  2. 使用Protractor进行AngularJS e2e测试案例

    环境: y@y:karma-t01$ protractor --version Version y@y:karma-t01$ node -v v4.2.2 y@y:karma-t01$ y@y:kar ...

  3. [Protractor] Test Simple Binding With Protractor

    Protractor is built to interact with AngularJS applications. In this lesson, we will take a look at ...

  4. WebApp的自动测试工具: protractor和selenium

    Protractor是Selenium的扩充,支持Angularjs element(by.css('my-css')).click(); 一.用by的各种Locator定位元素 选中1个元素: el ...

  5. E2E test protractor selenium

    E2E Test和传统的Unit Test不同的是:(1)不涉及代码层面,不会去测试某段代码是否正确或者某行代码是否被覆盖(2)它是从用户的角度出发,用来测试一个应用的流程是否符合预期. 一 Sele ...

  6. JavaScript资源大全中文版(Awesome最新版)

    Awesome系列的JavaScript资源整理.awesome-javascript是sorrycc发起维护的 JS 资源列表,内容包括:包管理器.加载器.测试框架.运行器.QA.MVC框架和库.模 ...

  7. Web Development Terms

    I've come across lots of terms while learning web development. I'm feeling myself overwhelmed. Here ...

  8. angular单元测试与自动化UI测试实践

    关于本文:介绍通过karma与jsmine框架对angular开发的应用程序进行单元与E2E测试. angular单元测试与集成测试实践 先决条件 创建项目 webstorm中创建空白web项目 创建 ...

  9. npm start 作用

    在配置phonecat项目时需要运行npm start在本地配置一个服务器环境,npm start首先会安装一系列的必要程序,这些程序依赖package.json中的内容,package.json中的 ...

随机推荐

  1. 并行计算基础&编程模型与工具

    在当前计算机应用中,对快速并行计算的需求是广泛的,归纳起来,主要有三种类型的应用需求: 计算密集(Computer-Intensive)型应用,如大型科学project计算与数值模拟: 数据密集(Da ...

  2. Hacker(22)----解除系统中的密码

    Win7系统中,用户可以设置BIOS密码以及系统登录密码,这些密码都有各自的用途.但对黑客而言,完全可以采用不同的方式绕过这些密码.下面介绍黑客如如何接触这些密码. 一.解除BIOS密码 BIOS密码 ...

  3. OC特有语法-分类(category)

    本文转载Keefo. Objective-C的Object-oriented programming特性提供subclass和category这2个比较非常重要的部分.subclass应该反复被各种编 ...

  4. python-线程、进程、协程

    进程 && 线程 进程:是内存中的一个独立的句柄,我们可以理解为一个应用程序在内存中就是一个进程. 各个进程之间是内存相互独立,不可共享的 线程:每个应用运行之后就会对应启动一个主线程 ...

  5. input(file)浏览按钮美化 (巨简单),网上那些都弱爆了

    <!DOCTYPE HTML> <html> <body> <input type="file" id="upload" ...

  6. WndPric的使用方法

    protected override void WndProc(ref Message m) { const int WM_SYSCOMMAND = 0x0112; const int SC_CLOS ...

  7. FineUI按钮控件

    按钮的状态与大小 按钮有启用/禁用,按下/正常几种状态,对应的属性分别为Enabled.EnablePress.Pressed三个属性. 按钮有大中小三个尺寸,对应的属性为Size. 按钮上的图标 按 ...

  8. Android中多表的SQLite数据库(译)

    原文: Android SQLite Database with Multiple Tables 在上一篇教程Android SQLite Database Tutorial中,解释了如何在你的And ...

  9. 《第一行代码》学习笔记17-碎片Fragment(2)

    1.碎片的状态和回调: (1)运行状态:碎片可见+所关联的活动处于运行状态. (2)暂停状态:当活动进入暂停状态(由于另一个未占满屏幕的活动被添加到栈顶),与其相关联的可见碎片会进入暂停状态. (3) ...

  10. 《第一行代码》学习笔记14-UI(3)

    1. (1)所有控件都是直接或间接继承自View,所用的所有布局都是直接或间接继承自ViewGroup的. (2)View是Android中一种最基本的UI组件,可以在屏幕上绘制一块矩形区域,并能响应 ...