I am able to automate the first dropdown but the robot does not run further to make dropdown selection for another field. Instead I receive following error, which I tried debugging by increasing the timeout limit and also changing the waitforready property. Still no change is observed.
Also, it workd fine during web recording but doesn’t work for a dynamic selection based on my workflow logic. Please, take a look at my workflow to understand the scenario better.
I looked at your logic and it indeed gives me the same error, but it seems like it all can be a bit simplified.
Please make sure the UiAutomation package is updated to the newest version.
@loginerror, In my workflow, I am trying to match the variable value with each item in the dropdown menu, If matched that particular item is selected.
Did you find any flaw in my logic? Any suggestion to improve or modify or simplify it?
I Know the workflow works smoothly for static selection as demonstrated by you. But I am trying to automate the process for dynamic selection for various inputs.
If you want a list of options, I would definitely use the Scraping Wizard combined with Generate Data Table to get it instead of Find Children. It seems that it would be easier to handle, and could potentially work around the issue with Get Attribute activity.
The output of the Scraping Wizard is a String. You can then use this string as input for the Generate Data Table activity that will split it by NewLine, like this:
Using “User First Row as Column Headers” option might be nice to remove the “Sample Input” piece that you don’t want anyway from the actual rows
This will give you a Data Table that you can iterate using For Each Row activity.
I edited my workflow following your advice but the problem still persists. I am receiving a new error now which I tried debugging by checking my .net framework, rebooting my laptop and reviewing my UiPath extension on chrome
Also, note that the selection for Region field on the website is made correctly but the robot could not select the right item for the District field and instead throws an error as shown above even after tweaking the logic.
I assume you want to dynamically select the value in each box. This means that you need a Select activity with a variable instead of the value written between quotes - that bit is simple and obvious.
Then, if you want to know if the value is on the list before you use the Select activity, you can use the Scraping Wizard to generate a String that will either contain your value or not (and either throw an exception or Select the value).
Could you share a simple write down of your logic that will include your end goal and core steps?
EDIT
I suppose there is 1 more situation I can think of, in which you want to select all possible combinations one by one. Fair enough, it is possible, but will get quite tricky really fast if not all the select fields are required to complete the selection (and you want it to be 100% dynamic).
I would like to select the values from a customer application system and match them against the drop down field items on the bank’s property valuation webpage.
I am trying to create a module for this task, whereby I am assigning a values to the variables to check the feasibility of this project.
For that I have assigned one of the variables Area/ Region a value “Hong Kong” (This value will be picked from the client’s application for matching and selecting the drop down item corresponding to it)
Similar flow will follow for other fields - District, Building, Street, Flat, Room.
I have created the logic for that in my workflow. When the program runs, the robot is able to make the first selection for Region on point but selection for other fields ex. district is not made and an error is thrown as shown in the earlier posts.
I hope it clarifies what I am trying to achieve here
It is pretty clear now. Could you give this project a try and see if it fulfills all your conditions? GetFillValues.zip (36.9 KB)
If you run from Main.xaml, it will assign a bunch of variables first and then invoke those variables to a sub-flow that only fills the values on a web page.
The sub-flow is not finished and for now only fills the first two select fields, but the principle is explained and easy to replicate.
It will throw an exception when the value it tries to fill in is either empty or not available in the select field.