[Protractor] Protractor Interactive with elementor
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的更多相关文章
- 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 ...
- 使用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 ...
- [Protractor] Test Simple Binding With Protractor
Protractor is built to interact with AngularJS applications. In this lesson, we will take a look at ...
- WebApp的自动测试工具: protractor和selenium
Protractor是Selenium的扩充,支持Angularjs element(by.css('my-css')).click(); 一.用by的各种Locator定位元素 选中1个元素: el ...
- E2E test protractor selenium
E2E Test和传统的Unit Test不同的是:(1)不涉及代码层面,不会去测试某段代码是否正确或者某行代码是否被覆盖(2)它是从用户的角度出发,用来测试一个应用的流程是否符合预期. 一 Sele ...
- JavaScript资源大全中文版(Awesome最新版)
Awesome系列的JavaScript资源整理.awesome-javascript是sorrycc发起维护的 JS 资源列表,内容包括:包管理器.加载器.测试框架.运行器.QA.MVC框架和库.模 ...
- Web Development Terms
I've come across lots of terms while learning web development. I'm feeling myself overwhelmed. Here ...
- angular单元测试与自动化UI测试实践
关于本文:介绍通过karma与jsmine框架对angular开发的应用程序进行单元与E2E测试. angular单元测试与集成测试实践 先决条件 创建项目 webstorm中创建空白web项目 创建 ...
- npm start 作用
在配置phonecat项目时需要运行npm start在本地配置一个服务器环境,npm start首先会安装一系列的必要程序,这些程序依赖package.json中的内容,package.json中的 ...
随机推荐
- [RxJS] Displaying Initial Data with StartWith
You often need to render out data before you stream begins from a click or another user interaction. ...
- LR翻页脚本并在每页实现业务操作
性能需求:在列表中删除后有记录,或对列表中的每条记录进行操作(如点击每条记录的“单号”进入订单详情页面,或在列表中对每条记录进行“启用”.“停止”操作) 举例:Vuser脚本模拟用户在订单列表中点击每 ...
- C-二维数组,多维数组
-----二维数组 ->在数组定义当中,行数和列数需要用常量定义 ->在定义的时候如果没有数值进行填充,则补零 ->第一个数是行,第二个数是列 ...
- 最流行的android组件大全
目录 [−] 工具和教程 UI组件 类库 游戏引擎 Android HTML5应用 Android 是目前最流行的移动操作系统(还需要加之一吗?). 随着新版本的不断发布, Android的功能也日益 ...
- 《第一行代码》学习笔记10-活动Activity(8)
1.除了onRestart()方法,其他都是两两相对的.三种生存期: (1)完整生存期:onCreate()~onDestroy().一般情况下,一个活动会在onCreate()中完成各种初始化操作, ...
- C#图像处理(2):给图片加白边
C#图片处理给图片添加白边: /// <summary> /// 在图片上方加入白边 /// </summary> /// <param name="Img&q ...
- unison实时双向数据同步
软件下载 ocamlopt下载地址:http://caml.inria.fr Unison下载地址:http://www.seas.upenn.edu/~bcpierce/unison 1.安装uni ...
- Json部分知识(前台显示格式、Json-lib日期处理)
1,Json格式用于datagrid数据显示 easyui前台显示数据可以使用JSONObject,也可以使用JSONArray.但是如果需要在datagrid表格中进行数据显示,只能使用JSONOb ...
- OpenSuse13.2硬盘安装
直接参考文章:OpenSuse硬盘安装 补充: Win7引导Grub4dos时,本人尝试根据xp引导方式中使用boot.ini来引导,引导成功,不需要bcdedit命令,简化了引导步骤.
- 用phpMyAdmin修改mysql数据库密码
1初始数据库密码为空. 2第一步,点击phpMyAdmin里的用户选项. 3选择root localhost用户名,点击编辑权限. 4此时会出来修改权限的页面,里面可以设置的选项还是比较多的,暂时不管 ...