Questions about dynamic selectors

@ushu ushu](Profile - ushu - UiPath Community Forum)

try the following

"<html app='chrome.exe' htmlwindowname='nameStorage:?;re*' title='É̼ÒÖÐÐÄ£­-ÀíÏëÉú»îÉÏÌìè' /><webctrl name='skuPrice' tableRow='"+yourvariable.ToString+"' tag='INPUT' type='text' />"

consider to put it in a single line please

The data is filled in this input box and not looped down to the bottom.

@Uddynitjh That means for the first field the selector was working fine. From the next field the selector was changing. Can you please show the complete selector of the second field (without any variables in the selector)

Dynamic Selector.txt (2.5 KB)This is all the selectors

@Uddynitjh That means for cursor dwell it was working. From starting of skuprice it was not working

So, here you should pass the odd order through a variable that you define (yourvariable.Tostring)

Also, I have observed that the way you were passing variable to the selector was not correct . Follow the below steps

  • Open selector
  • Remove the existing value within double quotes in table row attribute
  • Now, right click within the double quotes then you can see different options (choose variable, argument etc)
  • Click on choose variable and automatically that variable pop up in the selector

below link for ref

Run the process and check the output

IMG_2949I operate this way, it seems that something is wrong somewhere.

@Uddynitjh The selector is not validating since the variable has null value. Try to give some default value to the variable . Follow the below steps

  • Expand the variables panel
  • Provide the default value as 1 to the Yourvariable since the odd order starting from 1 . Like below

  • Now, go and validate selector

Uploading: IMG_2952.gif…The selector is fine, but there is no loop entry.

IMG_2952The selector is fine, but there is no loop entry.

@Uddynitjh Loop entry mean is the bot not going to next field? If that is the case you should increment the value once the processing of first field is done

  • YourVariable = YourVariable + 1

Were you using for each or while loop to go through each field ?

I am needing to fill in the data sequentially into the input box where the variable fields below are located, but it only enters in the top input box and does not jump to the variable field input box below.I changed it to variable=variable+1, but it still has this result.

Instead of trying to loop and calculate dynamic selectors, just use Find Children to get an array of all the text boxes. Then pass the UI Element object to the Type Into within a For Each.

I’m sorry, is there a corresponding document that explains this, so I can look into it.

@Uddynitjh Below are the few docs

Okay, I’ll look into it first. Thanks! I will consult you again if I don’t understand something.

Thank you very much for your answer. I have studied it. Find children is very suitable for obtaining the text content of the drop-down box. But the problems I encountered need to fill in the prize excel data into the 1, 3, 5, 7, 9 marked on the figure in turn… these input boxes. I don’t know if it applies to this question.

You can use the UI Elements for any activity - click, type into, set text, etc.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.