I want to dynamically select orderid from the list and double click on it so that it navigates to order page. From the picture selector for order id # 726810 :
"< wnd app=‘case (9).exe’ cls=‘#32770’ />
< wnd ctrlid=‘12546’ />
< ctrl name=‘726810’ role=‘list item’ /> "
selector for order id # 726809 :
"< wnd app=‘case (9).exe’ cls=‘#32770’ />
< wnd ctrlid=‘12546’ />
< ctrl name=‘726809’ role=‘list item’ /> "
Attribute “name” alone is changing , so i created a variable called “orderid” and inserted in dynamic selector like below .
< wnd app=‘case (9).exe’ cls=‘#32770’ />
< wnd ctrlid=‘12546’ />
< ctrl name=‘“+orderid.ToString()+”’ role=‘list item’ />
It is not showing any errors but also not selecting the orders which i pass as parameter. Please help me , what i’m supposed to do here.
Your selector seems to be fine. However in desktop applications, when automating drop down items you cannot directly select the value as we do in web applications. So for desktop application dropdowns, you first need to add a click activity on the drop down which will expand the list. The. Use another click avtivity (which you have already) to select the value. Then it will work.
I have done a good explanation on this along with a working workflow solution in the below post. You may refer to that as well…
After printing the expression is the selector same as the above 2 you have mentioned.
Can you provide the expression you have printed.
The error which you are getting cannot find the selector is because if you see one your attribute ctrl name where you are passing order id has an extra " at start and end and thats y its not validating try to remove it and then use it in uiexplorer and try to validate it
while giving the selector ,i’m only using like this “+variableName+” but when i’m opening the selector again or after the run , it is displaying as shown in the error .
I did not understand , printing thing you are talking about . how do you want me to print?
Did you try validating the selector after providing wild card in Uiexplorer.
If it still doesn’t work the issue is will selector , you have to make it more dynamic and search for any other attribute which is unique like Issue ID and remove order ID
Okay, so I have come across this scenario a few times. This usually occurs when you use the ‘indicate element’ using click activity’s functionality; then edit the selector with the variables, to try and make it dynamic.
In my case, I have a hard time making that work sometimes.
So here’s what I do, and I know works! (and hopefully will solve your issue as well),
Identify the selectors - You have already identified the selectors and “what’s changing” and where to place the variable.
Drop-in a new click activity and DO NOT indicate the element.
Instead, open the properties panel of the New ‘Click Activity’ and edit the selector field using the expression editor.
You’ll notice this opens up more like a text-box than the usual ‘selector’ field.
Enclosed in double-quotes, place in your prepared selector (along with the variable adjustments) in this field.
Hit OK.
Try it Out!
Your selector is probably going to be something like below:
It’s a known bug which firstly will change your "+<variable>+" for quote;+<variable>+quote;. You need to edit selector manually not through UiExplorer but from Properties pane and change again quote; for ". This should work then.