我按照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


↙↙↙阅读原文可查看相关链接,并与作者交流