Macaca macaca run issue sumbit

onionyao · 2016年11月28日 · 最后由 onionyao 回复于 2016年11月29日 · 1769 次阅读

我按照https://macacajs.github.io/zh/environment-setupeletron 的驱动的方式进行安装,也看到了可耐的小猴子,也安装了

写了个很 simple 的 demo

details:
#!/usr/bin/env python3.5

-- coding:utf-8 --

from macaca import WebDriver

desired_caps={
platformName: 'desktop',
browserName: 'electron'
}

driver=WebDriver(desired_caps)
driver.init()

driver.set_window_size(1280,600).get('https://www.so.com/?src=so.com')

web_element=driver.element_by_id('input')

print(type(web_element))

when i opened the command windows and execute "macaca run --verbose". some error appear,contents below

webdriver sdk launched

/usr/local/lib/node_modules/macaca-cli/node_modules/mocha/lib/utils.js:628
throw new Error("cannot resolve path (or pattern) '" + path + "'");
^

Error: cannot resolve path (or pattern) 'macaca-test'
at Object.lookupFiles (/usr/local/lib/node_modules/macaca-cli/node_modules/mocha/lib/utils.js:628:15)
at /usr/local/lib/node_modules/macaca-cli/node_modules/mocha/bin/_mocha:326:30
at Array.forEach (native)
at Object. (/usr/local/lib/node_modules/macaca-cli/node_modules/mocha/bin/_mocha:325:6)
at Module._compile (module.js:573:32)
at Object.Module._extensions..js (module.js:582:10)

请给予指导可能是哪里存在问题?我已经重新安装了一次 macaca,thanks for your help

共收到 1 条回复 时间 点赞

OK, As I Know, Maybe this issue is a mistake.
step 1:
macaca server
step 2:
open the newTerminated and execute "python xxx.py"

需要 登录 后方可回复, 如果你还没有账号请点击这里 注册