I was trying to automate a button click in a web application where I identify the correct button using its innertext which is passed as a variable in the path as shown below:
Code: Select all
optionName = "Edit";
someRepoItem.FindSingle<ATag>(".//a[@innerText~"+ optionName +"]");
No element found for path './/a[@innertext~@edit]'.
I have tried it with multiple values for optionName such as Delete and Duplicate. In both these cases, the value is replaced as "@delete" and "duplicate" respectively instead of just "Delete" or "Duplicate".
Has someone faced this situation before. Please help if so.
Thanks
Manish