Using variable in selector (SAP)

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?

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

1 Like

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

1 Like

:+1: