I am working on assignment 10 in “Building Bot Tasks with RPA Express” course. I am able to search for the product on Amazon but I am not able to find a way to click on the right product in the search result. I tried following approaches:
- Find a xpath (//*[@id=“result_x”]/div/div/div/div/div/div/a/h2) for a product and use a loop to go through all the elements (in “result_x” - x is replaced by numbers the loop) in page and find the xpath of the product that matches the product name. Click the product (using xpath). It worked pretty well for some of the products but it broke when xpath (xpath template used in the loop) changed for some products.
- Second approach was simple, using a click action on the web element with text. This didn’t work at all. I kept on getting error “Error executing MouseClickAction”.
Please let me know if I am doing anything wrong or suggest an approach that will work.