Roro Roro - 24 days ago 6x
C# Question

C# Selenium XPath grabbing data from a table in a div

I am try to grab data from a table that has two columns. The rows do not have a distinct identifier. But I can search the first column for specifics to find out if I should grab the second column's data. The table does not have an id, but the Div does. I need to grab the dollar amounts seen in the screen shot below. I would be very grateful for your help.

enter image description here


Use following-sibling in xpath

//div[@id='subtotals-marketplace-table']//td[contains(text(),"Estimated tax")]/following-sibling::td[1]