Selectors Variable


#1

Hi,
I’m having errors with my variable in selector.
This is my selector

<ctrl automationid='employeeTypeRadioButtons' />
<ctrl name=' + &quot;buttonRadio&quot; +' role='list item' />
<ctrl name=' + &quot;buttonRadio&quot; + ' role='radio button' />

I have tried looking at similar topics but it’s not to clear. Any help is appreciated. Thanks.

Pls see my XAML file for workflow. ExpenseItGenerateReport.xaml (13.3 KB)

Thanks for help


#2

Hey @mingerz

Please try attached workflow and let me know if still you have any doubts :slight_smile:

ExpenseItGenerateReport.xaml (11.7 KB)

Regards…!!
Aksh


#3

Hi Aksh1yadav,
I got this error.


#4

Try with some delay or simulate option check that… Itz working for me


#5

What did you fix. Because I no longer see the selector in the activity ERROR!!!. What was wrong with my selector?


#6

Now it is working for you?

Sometime “&quot;” creates a problem and you were appending wrong it should be like this:

<ctrl name='"+buttonRadio+"' role='list item' />

and one more thing i have observed for radio selection you were not assigning that output into any variable to click that selected radio option so have changed that selector as well to make it dynamic.

Regards…!!
Aksh


#7

Thanks Aksh. I will give that a try.
So I should always put the whole selector enclosed in a string right? if my selector contains variables.


#8

double quotes always changes to &quot by itself. How to fix it?


#9

Well sometimes when you will open Expression editor and try to paste it or type it, converted to like that what you are facing.

Selector editor, as it will encode the quotes for XML (hence the " there).

Alternative what i do is directly type into that selector property without opening the quotes or use notepad and remove that &quot with actual quotes like single or double then directly paste there.

Regards…!!
AKsh


#10

Thanks.How to pass variables in Extract Meta Data property?