Selenium Webdriver - Fetching Table Data

后端 未结 7 1972
执笔经年
执笔经年 2021-02-04 08:03

I want to fetch data from tables in UI. I know about looping through rows and columns using \"tr\" and \"td\". But the one the table I have is something like this:



        
相关标签:
7条回答
  • 2021-02-04 08:54

    Mayby it's too late for the owner of this question, but helpful for other.

    List<WebElement> cells = row.findElements(By.xpath(".//*[local-name(.)='th' or local-name(.)='td']"));
    
    0 讨论(0)
提交回复
热议问题