[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'.
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· AI技术革命,工作效率10个最佳AI工具