Dynamic webpage x-path

When I tried to copy an xpath on this page, it gave me something like this “//*[@id=“search_product_image_online_price_9786162872655”]”
It gave no results. How should I use it?

I tried to use it - it worked.
The only problem is that Thai characters are written incorrectly in the log file.

Thanks for the info. another problem i have is I have a list of product in excel but it seem that every product has a different xpath. I tried and it doesn’t work.

In this case you can try building a relative xpath based on the element’s attributes instead of copying the xpath from browser.
You can see how to do it in this post in the Knowledge Base: https://kb.workfusion.com/display/RPAe/XPath+Guide

@Kinalina could you provide several examples of pages from which you will copy the price?

in this example

only the numbers changes…the rest remain the same.I tried using wildcard * but it doesn’t fetch the data.

@Kinalina so as I understand, there may be one book on the page, and there may be several, right? Or is it always just one book, for which you need to get the price?

yes, you are correct. sometime is only 1 book, but could have others, but i just need the first book which appeared on the page

@Kinalina try using xpath //span[contains(@id,‘search_product_image_online_price’)]

@ashapkina I am finding that there are two specific actions in QuickBooks for when I am printing a report to PDF. It is not working to trigger an action step using the IMAGE, so I have gone with Web Element. The problem here is that the xpath appears to be dynamic in each session.

So I wanted to find out is there a way to right mouse click to search for new xpath and then save it to a variable, then use a condition to execute the new dynamic xpath?

If we performed the above using an Exception Handling action, could this work?

@ashapkina I am really struggling with this to get a solid xPath in place. I have gone through all of the items in the KB, and need to better understand please.

What is the formula I should be looking for or to build here please? I am tired of my stuff getting broken due to image changes to applications.


Same issue here, too.

@ashapkina, did you see this?

@todd try using Exception handling in this case: if the click on the Xpath fails, try using a mouse click on image.

I posted (3) images for example and response, please share next steps for each please, thank you.

You need to put all mouse clicks on xpaths that fail in the Exception Handling action. Put the mouse click on the xpath in the Try to complete block, and in the If an exception occurred block, put the Mouse click on an image of the button - the bot will use it as a backup option in the Xpath fails.