How to capture and compare a tag content, using Xpath, for automation using Selenium c#?

Asked

Viewed 26 times

0

I would like to know how I can take the content of a tag, for an Xpath, and filter it, for example: I have the following code below, it basically goes to a website, and finds a table, and within that table it will have several fields, but I only need the second field that contains the dates and times as tag content, clicking on one of the dates and times I can download the file corresponding to the date, but I have to download everything within a certain period of time, how can I compare my period fields that are Datetimepicker with the content indicated by an Xpath?

Note: I won’t need the hours, only the date to filter.

var list = _nav.Driver.FindElements(By.XPath("//div[@class='gridBody']//table[@role='presentation']//tbody//tr"));
                    foreach(var linha in list)
                    {
                        var colunas = linha.FindElements(By.XPath("./td"));
                        var recebidoData = int.Parse(colunas[1].Text);
                        
                        
                        
    
                    }

Who can contribute I thank :)

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.