Undesired timeout error raised for get attribute activity while robot fails to make appropriate dropdown selection

Dear All,

I am trying to automate a process to select drop down item automation from the following website:
https://ww2.hkbea-cyberbanking.com/servlet/PL061Show?Lang=Eng

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.

Can anybody help me to resolve this problem and help appropriate selection for the “District” Field? I do not see any logic error in the workflow.

Please, take a look:

Solution1.xaml (48.7 KB)

Hi @Tom1989

Is there a reason why you wouldn’t use two Select activities? It seems to work for me on IE:

The end result on the webpage:
image

@loginerror,

I want to automate it in chrome and I already tried using select activities but it doesn’t work.

Again, I request you to take a look at my workflow. you will notice that I have already used select item activity for both drop down selection.

Note that, the selection for the first dropdown menu is made accurately but the robot could not make the same selection for the “District” field.

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.

Hmm, I’ve just tested it on Chrome and the exact same workflow worked (also when I dynamically assign the values):

Could you give this below workflow a run?
SelectDropdown.xaml (8.7 KB)

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.

It works quite nicely:

Hi @loginerror,

Thanks for your suggestion.

Will the output of screen scraping be stored as a string or string array?

Also, What changes do I need to make to my datatable for my variable to iterate through every item captured using screen scraping?

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 :slight_smile:

This will give you a Data Table that you can iterate using For Each Row activity.

It will look more or less like that:

@loginerror, I will try and keep you informed.

1 Like

Hi @loginerror,

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

Please, take a look at my new workflow:

Solution1.xaml (69.1 KB)

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 am not sure i understand your goal here.

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).

It might be a fun challenge though.

1 Like

@loginerror

Project Background:

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 :slight_smile:

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.

1 Like

@Tom1989

I was going through your workflow and i found that

  1. In first ForEach loop in If activity pass Break Or else it will work again and again for all the items.
  2. In second ForEach Loop you have passed t_options in selectItem activity. Instead of that you should pass the District variable.

Thanks

1 Like

Thanks @loginerror, You simplified my logic :smiley:

1 Like

Had tried that before but received errors while running the workflow.

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