Selector Type Into Activity in web-app

Hi everyone!

I have the following problem:

Scenario:

I need to enter data in a text field to search for a product on a website.
After searching the product is selected and registered in the WEB application.

The number of times this operation will be performed is undefined as it will depend on the number of products that will be selected.

In integration I’m using the While Activity
and set the Loop so that if there are more products to select the process repeats or goes to the next step.

It works perfectly to insert the first product, however, when the loop occurs, the automation does not work, because it cannot find the field where the product name will be inserted for the search.

I believe it is because of the code change on the site. Every time a product is inserted the form element changes its code to identify which product is being inserted, whether 1, or 2, or 3, etc.

Example:
With no product inserted:

input type = “text” class = “form-control” data-cart-type = “search-product” data-position = “left” data-item = “0” uipath_custom_id = “4”>

With products inserted:
input type = “text” class = “form-control” data-cart-type = “search-product” data-position = “left” data-item = “1”>

And so it changes.

We know that to indicate the element to be filled with TYPE INTO ACTIVITY you must click on it. According to product insertion the element remains in the same place only with the modified code. I believe there is a solution by setting the selector.

Is this really the solution? How could I do this?

Thanks!!!

Hi @Also_Pizzaria,

Ideally your solution should work with one Type Into Activity, even if the page reloads and textbox properties changes.

Though, if it is not working, you can try using Anchor Base and user Find Element on left side to find that TextBox in the WebPage. On the Right side you can use Type into Activity to fill the data in Textbox.

I hope this helps. :slight_smile:

1 Like

Hi @mayank_26
Thanks for your help. But unfortunately it didn’t work, it’s still the same!

Hi,

I noticed that what is changing is “webctrl idx”. How can I set a variable for this?

Thanks!

Kindly have a view on this for using variables in selector

Cheers @Also_Pizzaria