There is a typical scenario in web page automation.
Step1: to click some element(e.g, a query button).
Step2: some part of the page is refreshed by loading data.
Step3: to do something with the refreshed page.
The problem is that it is very difficult to judge when the page loading is finished. Reasons are:
- The laoding time is not fixed depending on network status and loading data amount.
- There is no obvious difference between before and after page loading.
- During page loading, a “loading…” icon does appear and disappear but trying to capture that loading icon element by FindElement and WaitElementVanish doesn’t work all the time. That “loading…” element changes too fast or it is very difficult to get its selector by indicating on the web page.
I am wondering if there are some standard and effective solutions for such kind of scenario? Some solutions that don’t need to handle that too fast “loading…” icon element.
you can use On element appear and set wait visible true for any icon on the page after finishing loading
Thanks for your suggestion.
In my scenario, there might be no new element appear which means the page has nothing changed after loading. I can’t use OnElementAppear on that “loading…” icon because it changes too fast so that I can’t get its selector by indicating at all. :<
Thanks for your suggestion.
In my scenario, I am not able to use OnElementAppear on that “loading…” icon because it changes too fast so that I could not get its selector by indicating it(even if I used “F2” key to try many times). :<
Is there any other kind of solutions besides waiting for the fast appearing and disappering “loading…” icon?
in this case, after taking an action on the page could occur some changes in the attribute for a specific element on the page and that means changes in the selector, you can check these changes before and after taking the action in two ways the first from inspect element or from UI Explore >> Preparty Explore
Thanks for this new solution and I will try it.
But, in some special cases, there might be no changes at all in the page after page loading. For example: querying logistics info in some logistics web page as below steps:
Step1. to input an incorrect logistics number V1.
Step2. the page answered “no data for this logistics number”.
Step3. to input another incorrect logistics number V2.
Step4. the page answered “no data for this logistics number”.
It is difficult to judge in step4 whether that “no data for …” is for V2. It is possible that the page didn’t answer at all due to some network issues or the page hasn’t finished to answer(so the page didn’t change at all).
The key is to distinguish “page not loaded” and “page loaded but is the same”. It will be good if UiPath is able to detect the underlying network requests and responses(like Microsoft’s Playwright framework).
can you check if the elements on the page are active or not when the “loading…” icon appears that means when the Loading icon appears it could the same element becomes not active so we can know whether the Loading appears or not to check if there is a network issue or actually no result found.
where this solution is applicable you can wait for the same element to re-active after finishing the Loading icon and check the result
Yes, I did think of this way but that page is so lazy that there is really nothing else changed(content and status). This page is really not RPA-friendly. :<
Welcome to community.
Remove simulate click from activities you use and mark the wait for ready field completed.
Thanks for your information. I will try it.