Using variable in selector (SAP)

selector
sap

#1

Hi all,

I am trying to use variable in the selector when making SAP automation. Tried different variations, but even though there is no error thrown the selector does not recognize the variable component. The “” are aromatically being replaced with "

Any suggestions?


#2

Hi,

The variable should not be enclosed with double quotes.
A selector with variable can look any of the two
"<wnd app='notepad.exe' cls='Notepad' title='"& notepadTitle & "'/> <wnd cls='Edit'/> <ctrl role='editable text'/>"
or
"<wnd app='notepad.exe' cls='Notepad' title='"+ notepadTitle + "'/> <wnd cls='Edit'/> <ctrl role='editable text'/>"

Make sure the selector is typed in the string format.
image


#3

Right! typing in string format that is what i missed! thank you


#4

:+1: