Macaca 等待机制

工具软件自己的问题
不支持面向页面设计模式 , 更不用说面向组件
搭建环境


C:\Windows\system32>cnpm install macaca-electron -g
Downloading macaca-electron to C:\Users\zhangqiang\AppData\Roaming\npm\node_modules\macaca-electron_tmp
Copying C:\Users\zhangqiang\AppData\Roaming\npm\node_modules\macaca-electron_tmp\_macaca-electron@1.1.6@macaca-electron to C:\Users\zhangqiang\AppData\Roaming\npm\node_modules\macaca-electron
Installing macaca-electron's dependencies to C:\Users\zhangqiang\AppData\Roaming\npm\node_modules\macaca-electron/node_modules
[1/7] co@^4.6.0 installed at node_modules\_co@4.6.0@co
[2/7] webdriver-dfn-error-code@^1.0.3 installed at node_modules\_webdriver-dfn-error-code@1.0.4@webdriver-dfn-error-code
[3/7] driver-base@^0.1.0 installed at node_modules\_driver-base@0.1.4@driver-base
[4/7] xlogger@^1.0.0 installed at node_modules\_xlogger@1.0.6@xlogger
[5/7] selenium-atoms@~1.0.1 installed at node_modules\_selenium-atoms@1.0.2@selenium-atoms
[6/7] electron-prebuilt@^0.37.6 installed at node_modules\_electron-prebuilt@0.37.8@electron-prebuilt
[7/7] macaca-utils@~0.1.8 installed at node_modules\_macaca-utils@0.1.9@macaca-utils
execute post install 1 scripts...
[1/1] scripts.postinstall electron-prebuilt@^0.37.6 run "node install.js"
Downloading electron-v0.37.8-win32-x64.zip
[============================================>] 100.0% of 49.65 MB (4.84 MB/s)
[1/1] scripts.postinstall electron-prebuilt@^0.37.6 finished in 23s
Recently updated (since 2017-06-19): 3 packages (detail see file C:\Users\zhangqiang\AppData\Roaming\npm\node_modules\macaca-electron\node_modules\.recently_updates.txt)
2017-06-23
→ electron-prebuilt@0.37.8 › extract-zip@1.6.5 › concat-stream@1.6.0 › readable-stream@2.3.2 › string_decoder@~1.0.0(1.0.3) (02:36:15)
2017-06-22
→ electron-prebuilt@0.37.8 › extract-zip@1.6.5 › concat-stream@1.6.0 › readable-stream@^2.2.2(2.3.2) (21:48:21)
→ electron-prebuilt@0.37.8 › extract-zip@1.6.5 › concat-stream@1.6.0 › readable-stream@2.3.2 › safe-buffer@~5.1.0(5.1.1) (04:19:28)
All packages installed (166 packages installed from npm registry, used 37s, speed 81.41kB/s, json 183(271.17kB), tarball 2.66MB)
[3/7] driver-base@^0.1.0 installed at node_modules\_driver-base@0.1.4
x
C:\Windows\system32>cnpm install macaca-electron -g
Downloading macaca-electron to C:\Users\zhangqiang\AppData\Roaming\npm\node_modules\macaca-electron_tmp
Copying C:\Users\zhangqiang\AppData\Roaming\npm\node_modules\macaca-electron_tmp\_macaca-electron@1.1.6@macaca-electron to C:\Users\zhangqiang\AppData\Roaming\npm\node_modules\macaca-electron
Installing macaca-electron's dependencies to C:\Users\zhangqiang\AppData\Roaming\npm\node_modules\macaca-electron/node_modules
[1/7] co@^4.6.0 installed at node_modules\_co@4.6.0@co
[2/7] webdriver-dfn-error-code@^1.0.3 installed at node_modules\_webdriver-dfn-error-code@1.0.4@webdriver-dfn-error-code
[3/7] driver-base@^0.1.0 installed at node_modules\_driver-base@0.1.4@driver-base
[4/7] xlogger@^1.0.0 installed at node_modules\_xlogger@1.0.6@xlogger
[5/7] selenium-atoms@~1.0.1 installed at node_modules\_selenium-atoms@1.0.2@selenium-atoms
[6/7] electron-prebuilt@^0.37.6 installed at node_modules\_electron-prebuilt@0.37.8@electron-prebuilt
[7/7] macaca-utils@~0.1.8 installed at node_modules\_macaca-utils@0.1.9@macaca-utils
execute post install 1 scripts...
[1/1] scripts.postinstall electron-prebuilt@^0.37.6 run "node install.js"
Downloading electron-v0.37.8-win32-x64.zip
[============================================>] 100.0% of 49.65 MB (4.84 MB/s)
[1/1] scripts.postinstall electron-prebuilt@^0.37.6 finished in 23s
Recently updated (since 2017-06-19): 3 packages (detail see file C:\Users\zhangqiang\AppData\Roaming\npm\node_modules\macaca-electron\node_modules\.recently_updates.txt)
2017-06-23
→ electron-prebuilt@0.37.8 › extract-zip@1.6.5 › concat-stream@1.6.0 › readable-stream@2.3.2 › string_decoder@~1.0.0(1.0.3) (02:36:15)
2017-06-22
→ electron-prebuilt@0.37.8 › extract-zip@1.6.5 › concat-stream@1.6.0 › readable-stream@^2.2.2(2.3.2) (21:48:21)
→ electron-prebuilt@0.37.8 › extract-zip@1.6.5 › concat-stream@1.6.0 › readable-stream@2.3.2 › safe-buffer@~5.1.0(5.1.1) (04:19:28)
All packages installed (166 packages installed from npm registry, used 37s, speed 81.41kB/s, json 183(271.17kB), tarball 2.66MB)


运行




到入到IDEA


问题

找不到 macha 框架

在项目路径里找不到 webdriver-client



macaca run 怎么指定运行哪个测试 js 文件

Error: >> session.js:40:14 [master] pid:19012 Error: Cannot find module 'macaca-android'
at Function.Module._resolveFilename (module.js:536:15)
at Function.Module._load (module.js:466:25)
x
Error: >> session.js:40:14 [master] pid:19012 Error: Cannot find module 'macaca-android'
at Function.Module._resolveFilename (module.js:536:15)
at Function.Module._load (module.js:466:25)
Macaca 等待机制的更多相关文章
- WebDriver元素等待机制
能否构建健壮和可靠的测试是UI自动化测试能否成功的关键因素之一.但实际情况是当一个测试接着一个测试执行的时候,常会遇到各种不同的状况.比如脚本去定位元素或去验证程序的运行状态时,有时会发现找不到元素, ...
- Python+Selenium笔记(十):元素等待机制
(一) 前言 突然的资源受限或网络延迟,可能导致找不到目标元素,这时测试报告会显示测试失败.这时需要一种延时机制,来使脚本的运行速度与程序的响应速度相匹配,WebDriver为这种情况提供了隐式等待 ...
- selenium等待机制
等待机制 因为你要查找的标签由于网速等原因迟迟没有加载出来,你就直接获取这个标签,很明显是报错,现有的简单粗暴的解决办法就是time.sleep(3),睡几秒,也就是设置线程等待,等这个标签加载出 ...
- selenium WebDriverWait类等待机制的实现
在自动化测试脚本的运行过程中,可以通过设置等待的方式来避免由于网络延迟或浏览器卡顿导致的偶然失败,常用的等待方式有三种: 很多人学习python,不知道从何学起.很多人学习python,掌握了基本语法 ...
- selenium等待机制学习笔记
转载至: https://blog.csdn.net/huilan_same/article/details/52544521 1. 强制等待 第一种也是最简单粗暴的一种办法就是强制等待sleep(x ...
- appnium显式等待机制
强制等待: sleep不推荐全局隐式等待 全局隐式等待: 在服务端等待 driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS); ...
- selenium(Java)WebDriverWait等待机制
//标题是不是“百度一下,你就知道” 18 new WebDriverWait(driver,5).until(ExpectedConditions.titleIs("百度一下,你就知道&q ...
- 再谈AbstractQueuedSynchronizer:共享模式与基于Condition的等待/通知机制实现
共享模式acquire实现流程 上文我们讲解了AbstractQueuedSynchronizer独占模式的acquire实现流程,本文趁热打铁继续看一下AbstractQueuedSynchroni ...
- 再谈AbstractQueuedSynchronizer2:共享模式与基于Condition的等待/通知机制实现
共享模式acquire实现流程 上文我们讲解了AbstractQueuedSynchronizer独占模式的acquire实现流程,本文趁热打铁继续看一下AbstractQueuedSynchroni ...
随机推荐
- YII2 rule exist unique
['mobile', 'exist', 'targetClass' => 'xmobile\modules\v1\models\BuyerList', 'message' => '当前用户 ...
- 从零开始学习前端JAVASCRIPT — 8、JavaScript基础COOKIE
1:通信协议 定义:通信协议是指双方实体完成通信或服务所必须遵循的规则和约定.协议定义了数据单元使用的格式,信息单元应该包含的信息与含义,连接方式,信息发送和接收的时序,从而确保网络中数据顺利地传送到 ...
- ConcurrentDictionary 与 Dictionary
ASP.NET中ConcurrentDictionary是.Net4 增加的,与 Dictionary 最主要区别是, 前者是线程安全的集合,可以由多个线程同时并发读写Key-value. 那么 ...
- C#面向对象的三大基本特征
封装: 封装是指将数据与具体操作的实现代码放在某个对象内部,使这些代码的实现细节不被外界发现(可以使代码更加安全),外界只能通过接口使用该对象,而不能通过任何形式修改对象内部实现,正是由于封装机制,程 ...
- Inno Setup卸载时注销bho
Inno setup是一个制作安装包的免费工具,比如你用Qt开发完成一款软件,拿Inno setup打个安装包甩给客户安装就好了. 但是bho插件在注册后,万一用户卸载软件时,bho插件还是躺在管理加 ...
- ASP.NET Web API总结
1. 跨域 提供Http层的web api时,通常需要考虑跨域问题. 因为浏览器处于安全考虑,默认不允许前端页面向不是自己所在的ip/域名发起请求,因此需要服务器端指明自己允许部分或所有域名进行跨域请 ...
- 【QTP专题】02_时间同步点问题
一.什么是同步点 同步点是指在一个测试过程中,指示QuickTest等待应用程序中某个特定过程运行完成以后再运行下一步操作.Waits until the specified object prope ...
- Mysql内置功能《三》视图
一 视图 视图是一个虚拟表(非真实存在),其本质是[根据SQL语句获取动态的数据集,并为其命名],用户使用时只需使用[名称]即可获取结果集,可以将该结果集当做表来使用. 使用视图我们可以把查询过程中的 ...
- fillna()
将下面注释掉 fillna() 函数:有一个inplace参数,默认为false,不会对原来dataframe中进行替换,为True时候会修改原来的.
- zTree API中刷新树没效果
想刷新树,但是根据API来的refresh无效 ---------------------------------------------------------------------------- ...