hi, im trying to make a dynamic locators like this
data/locators.yaml
DobleValue:
newValue: {xpath: "//td[contains(@title,'${value}')]"}
the newValue locator is in the data/locators.yaml and im trying to use javascript to replace the '${value}' with a value that i send as a parameter, i try it to use like this but is not working, is there anyway how to make what i want?
- script: |
var locatorString = $data("data/locators").DobleValue.newValue
var newLocator = locatorString.replace("${plan}",$macroArgs.plan)
$runMacro("macro", {
locator: newLocator
});
Thank you!
hi, im trying to make a dynamic locators like this
data/locators.yaml
the newValue locator is in the data/locators.yaml and im trying to use javascript to replace the '${value}' with a value that i send as a parameter, i try it to use like this but is not working, is there anyway how to make what i want?
Thank you!