[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中的 ...
随机推荐
- Tomcat6.0 only supports J2EE 1.2, 1.3, 1.4, and Java EE 5 Web modules
使用tomcat6发布项目的时候,报以上错误,servlet版本太高的原因.tomcat6不支持servlet3.0 解决方法有两个: 1.使用高版本的tomcat,如tomcat7.tomcat8 ...
- kmp代码实现
/* kmp彻底理解 next 数组 :用来指导S[i]串 T[j]串 对应字符失配 指导 i 不回溯,即j应该走多少个位置 next[j]:j位置前一个元素 需要 计算某个字符对应的next值,就是 ...
- 慕课Linux学习笔记(三)系统分区
Linux的系统分区 主分区:最多四个 扩展分区:最多只能一个,不能写入数据,只能包含逻辑分区 逻辑分区 必须分区: / (根分区) Swap 分区 (交换分区,内存的两倍,不超过2GB,如果内存大于 ...
- 第一次碰到try-except(core python programming 2nd Edition 3.6)
# coding: utf-8 # 使用Windows系统,首行'#!/usr/bin/env Pyton'无用,全部改为'# coding: utf-8' 'readtextfile.py -- r ...
- Scala学习笔记--函数式编程
一.定义 简单说,"函数式编程"是一种"编程范式"(programming paradigm),也就是如何编写程序的方法论. 它属于"结构化编程&qu ...
- nginx网站架构优化思路(原)
本人接触的优化主要分为三大类 黑体的为本模块下的重点 ---------------安全优化 安全在生产场景中是第一位的 1.1 站点目录权限的优化 (修改权限755 644 所属用户root,需要 ...
- log4c 编译安装简单小结(ubuntu12)
1 下载源码,解压 (假定解压到了当前用户的根目录下,位置是~/log4c-1.2.3) 2 编译安装log4c(指定--prefix极其重要,如果没有指定到/usr下会有一堆麻烦事,还有,不能按照他 ...
- 什么是Code Review
Code Review 是一种通过复查代码提高代码质量的过程,在XP方法中占有极为重要的地位,也已经成为软件工程中一个不可缺少的环节. 本文通过对Code Review的一些概念和经验的探讨,就如何进 ...
- jquery checkbox 全选、取消全选
$("#checkall").click(function(){ $("input[name='uid']").prop("checked" ...
- eclipse打开文件位置Open Explorer 插件
,OpenExplorer插件可以满足这个功能,可以到https://github.com/samsonw/OpenExplorer/downloads下载最新版本,将jar包放到eclipse的pl ...