下面是我的代码:
forOnly(devices.desktop, function () {
test("Home page on ${deviceName}", function (device) {
var driver = createDriver("https://www.tresemme.com/uk/home.html",
device.size);
var properties = loadProperties("./properties/specFilePath.properties");
var brandSpecPath = properties.get("tresemme");
console.log(brandSpecPath);
checkLayout(driver, brandSpecPath, ["tresemme", "all"]);
this.report.error("Something went wrong on the page")
.withAttachment("Screenshot", takeScreenshot(driver));
driver.quit();
});
});
我的问题是我必须在项目中为不同品牌运行此代码,并且都具有自己的gspec文件,所以有什么办法可以在运行时(即通过命令行参数)填充gspecFilePath?