小编ran*_*ger的帖子

mocha 错误:未找到测试文件:“test/” npm ERR!测试失败

我试图在 linux 上运行 mocha 测试 > @ test C:\Users\wd.ssh\tel\qa_test\mocha-api-tests

错误:未找到测试文件:“test/” npm ERR!测试失败。有关更多详细信息,请参见上文。

这是我的 package.json

{
    "scripts": {
        "test": "mocha --reporter mocha-junit-reporter --timeout 60000 --exit",

    },
    "dependencies": {
        "cassandra-driver": "3.5.0",
        "chai": "4.2.0",
        "chai-http": "4.2.0",
        "express": "4.16.4",
        "mocha-junit-reporter": "1.18.0",
        "request-promise": "4.2.2"
    }
}
Run Code Online (Sandbox Code Playgroud)

使用的命令: npm install --global mocha npm i 并使用 npm test 运行测试

项目结构:

项目结构

mocha.js node.js

18
推荐指数
5
解决办法
2万
查看次数

在机器人框架中获取元素属性

您好如何在Robot框架中使用Get Element Attribute?在指令中我有元素属性的返回值.

例如,attribute_locator由元素定位符后跟@符号和属性名称组成element_id@class.

我有这个xpath=${check_radio_xpath}@class正确的方法吗?哪里${check_radio_xpath} = md-radio-11

我收到此错误:

${ischecked} = Selenium2Library . Get Element Attribute xpath=${check_radio_xpath}@class

Documentation:
Return value of element attribute.

TRACE   Arguments: [ 'xpath=md-radio-11@class' ]        
DEBUG   Finished Request    
FAIL    ValueError: Element 'xpath=md-radio-11' not found.
Run Code Online (Sandbox Code Playgroud)

robotframework

2
推荐指数
1
解决办法
2万
查看次数

标签 统计

mocha.js ×1

node.js ×1

robotframework ×1