Hi,
Can't find the solution to my issue. I have nodes to be identified, I mean - I have to get nodes names for following case:
<content-scope scope-data="scopeData">
<link-group data="scopeData[0]">
<text-img data="scopeData[1]">
</content-scope>When I'm using following syntax (FirePath, directly from browser)
name((//content-scope[@scope-data='scopeData']/*)[1]) or
name((//content-scope[@scope-data='scopeData']/*)[2])then I get node name ( link-group and text-img).
In robot-framework it doesn't work with keywords Get Text or Get Value. I get message: "InvalidSelectorException: Message: invalid selector: Unable to locate an element with the xpath expression name((//content-scope[@scope-data='scopeData']/*)[1]) because of the following error: TypeError: Failed to execute 'evaluate' on 'Document': The result is not a node set, and therefore cannot be converted to the desired type. (Session info: chrome=44.0.2403.157)"
How to build correct xpath which is interpreted by RF or which keyword should be used?
Open Browser file:///D:/temp/rf/a.html${elements} Get Webelements xpath=(//content-scope[@scope-data='scopeData']/*)log ${elements[0].tag_name}
RF code:
Open Browser file:///D:/temp/rf/a.html
${elements} Get Webelements //content-scope[@scope-data='scopeData']/*