java - Galen 框架:主要 gspec 中的 EcmaError 异常错误
问题描述
我尝试使用 github 上的示例实现 galen 响应式测试,但遇到此错误。我在 Java 中使用 galen 2.4.0。
public class ResponsiveTestManager extends GalenTestBase {
private PropertiesManager pm;
@BeforeSuite
public void setup() {
pm = PropertiesManager.createInstance();
}
@Test(dataProvider = "devices")
public void homepage_responsive(TestDevice device) throws IOException {
load(pm.getProperties().getProperty("homepage"));
checkLayout(System.getProperty("user.dir") + "\\galen_specs\\main.gspec", device.getTags());
}
}
com.galenframework.parser.SyntaxException:语句中的 JavaScript 错误
引起:org.mozilla.javascript.EcmaError:ReferenceError:“run_in_grid”未定义。
主要的.gspec
@@ Set run_in_grid selenium grid http://127.0.0.1:4444/wd/hub
Homepage in Selenium Grid
${run_in_grid} --page http://phptravels.net/login
check homepage.gspec
主页.gspec
@objects
login-username css input[name=username]
为什么会出现这个 javascript 错误。如何解决这个问题?请帮忙。十亿感谢您的帮助。
我按照这个教程
解决方案
Is there a reason why @@ Set
has an uppercase S here? Anyways, it doesn't seem to be neccessary to use the run_in_grid variable at all, so this main.gspec should work according to how variables work:
Homepage in Selenium Grid
selenium grid http://127.0.0.1:4444/wd/hub --page http://phptravels.net/login
check homepage.gspec
推荐阅读
- python - Python如何根据CSV排序订购Xml文件?
- excel - 将多个 CSV 文件合并到一个工作簿中(每个工作表将以其原始文件名的前缀命名) VBA
- python - Python:使用 for 循环更改原始数据
- android - 在使用转换多部分发送图像字符串 url 时,我收到错误打开失败:ENOENT(没有这样的文件或目录)
- d3.js - d3 放大所选区域下方的区域并放大到最大
- python - 如何使用 psycopg2.extras.execute_values
- c - C语言结构中全局指针有什么用
- html - 如何通过使用引导程序和 HTML/CSS 单击按钮来激活按钮的切换?
- slack - 如何创建仅在来自特定频道的消息中显示的松弛消息快捷方式?
- ethereum - 如何检查代币是否有交易费用(即代币是通货紧缩的)