So in this activity the task is to be able to take input, (stored in variable name “digit” of GenericType) and then based off that input the bot will highlight the specified number on the calculator.
Following the video’s instruction I get this code when I use Edit Selector for the Highlight Activity.
However this code does not work for me, when I modify the code as per the video instructions and press OK, my code just changes to this automatically and what actually happens is only 0 gets highlighted regardless of my input.
to get the selector use UiExplorer and make your selector in one line and add quotation at both the ends.
for eg:
if this was your selector
.uia automationid=‘NumberPad’ cls=‘LandmarkTarget’ />
<uia automationid=‘num0Button’ cls=‘Button’ name=‘Zero’ /
make it as
“”
then Paste this into the Selector Box under Target section in Properties section for Desired Activity here Click Activity.
I Have attache a note and the work flow for the refrence.
Hey I just wanted to update what happened. So previously I was trying to edit the selector in this window
But that screen does not recognize I am trying to concatenate digit into the selector. So I needed to go into the actual Properties panel itself and modify the selector string there.
EDIT: For anyone viewing this later in the second screenshot I should of put digit.ToString my bad.
I also noticed after I have done this “+ +” concatenation, when I now try to open the Selector window I get:
My issue is solved now, but is there anyway to get to the last screenshot I showed without typing “+ something +” into where I showed in the 2nd screenshot?
If we want to make selector dynamic we have to pass either variable into selector or have to use wild cards like * or ?. And we don’t have any other option to do this.
And also if we want to use dynamic selector then no need to indicate on the screen and just go to selector option in properties and copy paste the selector and make sure it should be enclosed in double quotes.
When I did this lesson, it instructed me to remove the name attribute and cls attribute of the automationid attribute along with the NumberPad container and the cls attribute from the application window. I attempted to add the “+digit.ToString+” with this method and was continuing to get errors. It wasn’t until I reselected and only removed the name and cls attributes of the automationid, leaving the container and cls attributes in the application window, did it finally work. Final selector code shown below: