Hi
I am trying to build a selector which will click on 'File' tab in a Word document that is open. The name of the Word document will vary. So I created a variable, NewVar, which has the partial name of the Word document.
Say the document is named test1.docx, I assigned the string 'test' to NewVar.
I selected the UI element and modified the Name attribute of the Window to 'Contains' %NewVar%, as given below.
:desktop > window[Name*="%NewVar%"][Process="WINWORD"]
If I run this, it shows an error saying that the window cannot be found.
However, if I change the Name attribute to 'Contains' 'test', as given below, it works without any issue.
:desktop > window[Name*="test"][Process="WINWORD"]
I would really appreciate it if anyone can throw light on why the first method is not working and how to get around it?