How to add the page load time in JS to Uipath?

I need a help to fetch the code form Js for load time and insert into studio.my question is In my web application iam going to click on a button .after clicking on the button it will load for sometime ,after completing the load I will click on another button .for example , I can click on electronics in Flipkart app .after clicking on electronics it will take come time to load and then I will click on the mobiles .and these two buttons are in enabled state. So , delays are also not workig here because the loading time is fluctuates everytime.for this I need to add the application XmlHttpRequest JS code using inject Js code activity or else other ways are there. please let me know .
Note: Timeouts are also not working because the buttons are in enable state.

Hi,

Did you try activity “On Element Appear”?

Hi @shabbeerjntu5401 ,

Instead of doing it with js just use element exist or element appear.

Element already exist there .

You mean on clicking button the button shows in progress on same screen