pkudrys
6 months agoContributor
There is a way to extract the xpath from name mapped object. Unfortunately, if I'm not mistaken, it works only if the mapped element exists in UI. The ability to get the xpath also from not an existing element is something I'm really missing too.
Here is the solution I'm currently using (returns the first xpath):
//get xpath from mapped element
function GetXpathFromAlias(mappedElement)
{
let str = mappedElement.Name;
let match = str.match(/\"(.*)\"/);
if (match)
{
let substring = match ? match[1] : '';
return substring;
}
{
Log.Error("XPath not found." + str);
}
}
Related Content
- 3 years ago
- 6 years ago
- 12 years ago
- 2 years ago