Hello, I have a question about inserting a variable into selecter.
Here’s the original syntax with static values:
I need to use a variable (e.g. Row) instead of the static value 5. I tried to search all relevant posts here, but none of the suggested syntaxes worked. We tried several versions including:
<sap id = 'usr / lbl [43, ’ +Row+ ‘]’ />
<sap id = ‘usr / lbl [43, ‘" +Row+ "’]’ />
and several other variations but we get a syntax error most of the times and cannot continue. Often the problem seems to be that it does not recognice the variable as a variable.
In the case when we managed to get it to recognized it as a variable the robot ended with an error:
Cannot find the UI element corresponding to this selector: <wnd app='saplogon.exe' cls='SAP_FRONTEND_SESSION' title='Sledování vzájemných zápočtů (verze 2.11 build 18.10.2007)' /><sap id='usr/lbl[43,"+ Row+"]' />
What are we doing wrong? How should the syntax look like?
Put it exactly as below directly in Selector property: "<wnd app='saplogon.exe' cls='SAP_FRONTEND_SESSION' title='Sledování vzájemných zápočtů (verze 2.11 build 18.10.2007)' /><sap id='usr/lbl[43," + Row.ToString + "]' />"
Make sure you’re not using Selector editor, as it will encode the quotes for XML (hence the " there).
Once you have the selector string as the expression, pressing the ... button will open the Expression editor which will work normally and not encode anything.
I’m not sure if this is the best solution but what we did was create a variable to which we assigned a value equal to the selector that we wanted and than just put the variable as the only thing into the selector. It seems to work fine so far.
i tried so many ways to insert a variable in selector but it is not working, let see i’m upload error images. any one know another method or solution please let me know
@Madhavi_Jaiswal
Hi Madhvi
In Selector I am getting below Code what is my understanding is this is not a table But in sap its view like table structure.
Can you give little bit of explanation on how can we scarp it. Its series of shipment number.
usr/lbl[8,4]
That was helpful. Although initially when I pressed the … next to the selector, it opened the UI Explorer. I had to literally type in the variable name etc in place, without even clicking on the …