Data Extraction from Webpage Tables with Nested Elements

I am encountering an issue while working with multiple tables on a webpage. My goal is to check if a specific value is present in the table header. If it is, I need to extract data from the first column. To achieve this, I have implemented a nested element. The first element successfully retrieves the entire table, but the second element fails to retrieve any rows. I would greatly appreciate any assistance or guidance in resolving this matter.

Element 1
“xpath”: “//div[@id="ember3"]/div[1]/div[3]/div[2]/div[6]/div/div[3]/div/table”

Element 2
“xpath”: “/thead/tr/th[1]”

I tested on a random table on openflow, and works for me
“xpath”: “//table”
“xpath”: “/thead/tr/th[1]”

First of all, you need to increase MaxResults on get element to get more than one
Secondly, if each table is not the same, but you know they all use an hr you can use wildcard searching descendants with
“xpath”: “//th”

Thanks @Allan_Zimmermann. I was able to make it work with the suggestion you gave. However it’s not working in MS Edge but works fine in Chrome. Could it be an issue with add-in?

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.