[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中的 ...
随机推荐
- C-冒泡排序,选择排序,数组
——构造类型 ->数组 ->一维数组 ->相同类型的一组数据 ->类型修饰符--数组名—[数组的元素个数(必须是整型表达式或者是整型常量,不能是变 ...
- storm启动流程
email:chenguibin2004@126.com storm: 是一个分布式的实时流式计算框架,具有低延迟.高可用.分布式.可扩展.数据不丢失的特点, storm包含四个核心组件: Nimbu ...
- Android Studio IDE 所遇问题汇总
[窗体视图无法显示] 在/res/values/styles.xml文件中,修改一下内容 <!-- Base application theme. --><style nam ...
- 给linux设置grub密码
一.明文加密:vim /etc/grub.conf在hiddemenu下面新增一行,输入:password 密文然后:wq保存退出 在开机出现退数菜单的时候,按任意键,就会出现启动选择菜单,这时下面的 ...
- C# 标签打印示例 1
初次写博客,有哪些不足的地方,还请多多指点,给予建议,谢谢! 如若想要源码,请留言. 本实例是在Webservice 中通过excel做模板来打印标签.具体需求是:一个订单一页纸打印4行 ...
- (转) .NET实现Repeater控件+AspNetPager控件分页
SqlConnection (.NET C#) 连接及分页 .net的访问数据机制决定了访问大量数据时会致使客户端机器消耗大量资源,因此有必要对数据进行分页显示,开发工具vs.net+sqlserve ...
- 《第一行代码》学习笔记3-活动Activity(1)
1.活动-一种可以包含用户界面的组件,用于和用户进行交互. <Button android:id="@+id/button_1" android:layout_width=& ...
- table超过30个字段如何处理呢? bootstrap
样式: @media (max-width: 768px) { .table-supplier { width: 100%; height: 100%; margin-bottom: 12.75px; ...
- rr
times = gcd(rotdist,length); printf( ;i<times;i++) { t = vec[i]; j = i; ) { k = j+ r ...
- js delete 用法
1,对象属性删除 function fun(){ this.name = 'mm'; } var obj = new fun(); console.log(obj.name);//mm delet ...