You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using Appium in Robot Framework to automate a Windows UWP application. In inspect.exe, the element I want to click is a Radio Button with name='QA' and the following are its ancestors:
I am using the following absolute xpath locator method to click it in Robot Framework script:
Click Element xpath=/Pane[@Name='Desktop${SPACE}1']/Window[@Name='FusionReg-MockUI']/Window[@Name='FusionReg-MockUI']/RadioButton[@Name='QA']
The above line fails with error 'Did not match any elements'.
however, if I use relative XPath it works!! Its very strange.
Click Element xpath=//RadioButton[@Name='QA']
I want to use absolute XPATH. What am I doing wrong?
I am not an expert in XPATH and I would really appreciate a solution, since I am doing some PoC work with Robot Framework + Appium + WinAppDriver for Windows App Automation.
Thanks.
The text was updated successfully, but these errors were encountered:
Just an note about your example - "//" is not "relative", but rather "recursive from current node": Click Element xpath=//RadioButton[@Name='QA']
...but sorry no idea why the absolute path is not working. Maybe the double ancestor: FusionReg-MockUI" window causes it somehow (#583 discusses something about "duplicate runtimeId", though I don't know if there's a bug report or proper explanation about the underlying problem in that).
I am using Appium in Robot Framework to automate a Windows UWP application. In inspect.exe, the element I want to click is a Radio Button with name='QA' and the following are its ancestors:
I am using the following absolute xpath locator method to click it in Robot Framework script:
Click Element xpath=/Pane[@Name='Desktop${SPACE}1']/Window[@Name='FusionReg-MockUI']/Window[@Name='FusionReg-MockUI']/RadioButton[@Name='QA']
The above line fails with error 'Did not match any elements'.
however, if I use relative XPath it works!! Its very strange.
Click Element xpath=//RadioButton[@Name='QA']
I want to use absolute XPATH. What am I doing wrong?
I am not an expert in XPATH and I would really appreciate a solution, since I am doing some PoC work with Robot Framework + Appium + WinAppDriver for Windows App Automation.
Thanks.
The text was updated successfully, but these errors were encountered: