How to return a whole column with Selenium?
Posted
by Kymair Wu
on Stack Overflow
See other posts from Stack Overflow
or by Kymair Wu
Published on 2010-05-05T07:35:04Z
Indexed on
2010/05/05
7:38 UTC
Read the original article
Hit count: 189
selenium
I know that Selenium has a built-in method getTable("tableName.row.column") can return a cell conveniently. However how can I return a whole column?
I've tried getText() directly, however only the first cell was returned,
getText("//tbody[@id='recordsTable']/tr[contains(@class, 'someclass')]")
But getXpathCount() with the same Xpath expression showed there're multiple elements matched.
getXpathCount("//tbody[@id='recordsTable']/tr[contains(@class, 'someclass')]") // result is 15
Please kindly help, many thanks!
© Stack Overflow or respective owner