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:
Upon execution, the optionName is replaced as "@edit" instead of "Edit" and an error is thrown as below.
Code: Select all
optionName = "Edit"; someRepoItem.FindSingle<ATag>(".//a[@innerText~"+ optionName +"]");
No element found for path './/a[@[email protected]]'.
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.