a month ago
I have to export data from one section of a page and then do the same in another section after scrolling down using Chrome. When I "inspect" each filter in Chrome it giving me the same Xpath expression. The Xpath expression only appears once in Chrome dev tools when I do a find on it see below). How do I get my automation to recognize that I want the filter on the second page?? My automation scrolls to the next page but it continues to use the dropdown from the first page. I have been working on this for a while and getting nowhere. Confluence is the product, which uses Java
a month ago - last edited a month ago
@a026833 Hi,
2 solutions can be considered:
the first one:
- try to put (//your_xpath_expression)[last()] exemple (//button[@id='h'])[last()]
By doing this, your xpath will take your last element.
Second : try to see in the inspector in the DOM (the html tree) if the page 2 and 1 have a unique attribute that show us the page number, for example:
div page=1 and inside this div, in the descendant children, we find your element, so your xpath will be for example:
//div[@page=1]//your_xpath_expression it will be on page 1
//div[@page=2]//your_xpath_expression it will be on page 2
try it and let me know.
Dont hesitate to ask question if i am not clear
a month ago
Thank you so so much! Your first solution did the trick, I was about to give up on this
a month ago - last edited a month ago
Please mark be as best answer if i answer your request that's will help the community