robotframework / OldSeleniumLibrary

Deprecated Selenium library for Robot Framework
Apache License 2.0
13 stars 3 forks source link

TABLE size #203

Closed spooning closed 9 years ago

spooning commented 9 years ago

Originally submitted to Google Code by mickaelp... on 20 Sep 2011

Hello everybody.

My issue is to get the number of columns and rows of a table who is name is xpath. How do i do this plz ?

Thanks.

Mickael

spooning commented 9 years ago

Originally submitted to Google Code by @yanne on 16 Oct 2011

Note that this is a tracker for bug reports and enhancement requests. General discussion and questions should be submitted to the mailing list: http://groups.google.com/group/robotframework-users/

That said, I think that you can use XPaths like these

${rows}= | Get Matching XPath Count | //table[id="myTableId"]/tr | ${cols}= | Get Matching XPath Count | //table[id="myTableId"]/tr/td |

to get number of rows and cols. (These do not work with nested tables, though)