
Announcements
Hello,
I am new for Power Automate, and now I working on creating a Chrome browser work follow by Power Automate.
I facing following issue now.
1. Open new Chrome browser window via specifided URL: A, Power Automate save the URL as Variable 'browser'. (OK)
2. Click one button on opened website, then a new website with different URL: B(change in real time) will open.(OK)
3. Capture one UI element in new opened website page (NOK)
Everytime I failed on step 3 and error message is 'No element found with selector'
I did something try to debug, if I do like following then no issue.
1. Open new Chrome browser window via URL: B(copied manually from above step 2), Power Automate save the URL as Variable 'browser'. (OK)
2. Capture one UI element in new opened website page (OK)
So I suspect my issue not caused by wrong UI element ID, but may caused by the variable 'browser' still stores the URL: A that was opened at the beginning. In the step3 , the Power Automate will still try to get the UI elements from URL: A, then causing failure.
Can anybody help me how to fix this issue.
Thanks a lot.
The %Browser% variable does not store the URL. It stores a browser instance. It will still work, regardless of the URL that you navigate to, as long as you are navigating within the same window and tab. If the new URL opens in a new tab, then you need a new browser instance variable, which you can get by using the Launch new Chrome action, but making it attach to an existing instance, instead of launching a new one. If it is within the same tab, you should not have any issues with your browser instance.
It might be that your selector is not dynamic and uses some parameter that actually changes on each session. It is very frequent with the "Id" property of an element. So, you might want to check your selector and see what it looks like. Then recapture the element after opening the same URL in a new session, to see if anything has changed.
Check this article out for some more reference on modifying selectors: https://learn.microsoft.com/en-us/power-automate/desktop-flows/build-custom-selectors
Also this video tutorial: https://www.youtube.com/watch?v=2PcyBa22Jj8&ab_channel=Thomas%22Shaky%22Petersen
-------------------------------------------------------------------------
If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.
I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.