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. Android自定义控件(一)——开关控件

    Google 在 API 14 开始才新增了Switch 控件. 因此,我们可以选择自己封装一个Switch . 效果如图: View主要代码: public class SwitchView ext ...

  2. SQL中@@ROWCOUNT函数

    返回受上一语句影响的行数.如果行数大于 20 亿,请使用 ROWCOUNT_BIG. 语法 @@ROWCOUNT        返回类型 int   注释 Transact-SQL 语句可以通过下列方 ...

  3. Java ----------- SQL语句总结(更新中。。。。。。)

    #对数据库的操作 *创建数据库 CREATE DATABASE database_name:database_name为创建的数据库的变量名称. #对表的操作

  4. 数据库分库分表(sharding)系列(三) 关于使用框架还是自主开发以及sharding实现层面的考量

    当团队对系统业务和数据库进行了细致的梳理,确定了切分方案后,接下来的问题就是如何去实现切分方案了,目前在sharding方面有不少的开源框架和产品可供参考,同时很多团队也会选择自主开发实现,而不管是选 ...

  5. 图片拉伸(有保护区域) resizableImageWithCapInsets

    在仿写QQ会话的时候背景蓝色图片是拉伸而来,但是有些地方是受保护的不能拉伸 所以定义了下面的工具类中的一个方法,专门拉伸图片 UIImageResizingModeStretch:拉伸模式,通过拉伸U ...

  6. MYSQLI DEMO

    1.Select // DEMO mysqli连接方式参考 $db = new mysqli("localhost:3306", "root", "& ...

  7. Map基本用法

    Map的基本用法 map内部使用的是红黑树,在map内部所有的数据都是有序的 map插入有三种方法: insert(pair<int,string>(i,str)); myMap.inse ...

  8. jsp笔记,包括编译指令和动作指令,九大对象等

    jsp基础知识 不包括HTTP协议,只有jsp的基础知识,包括表达式,代码片段,jsp九大对象等. 编译指令是在jsp被转换成selvet时,使用的. 而动作指令,是在每次客户端请求时动态执行.

  9. 兼容性之IOS下label 无法点击

    今天做移动端的页面时碰到一个稀奇的问题,那就是点击label无法选中与之相关的checkbox,下面是问题代码: <li class="list-item clearfix notif ...

  10. mysql在关闭时的几个阶段

    mysql关闭的大致过程 1.The shutdown process is initiated 初始化关机过程有许多种方法1.mysqladmin shutdown ; 2.kill pid_of_ ...