9mohit2 has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I want to iterate through a dynamic table. The first column has a checkbox while other have values. What I am trying is- Firstly getting the element till <tbody> tag present under the <table> tag :

my $table = $driver->find_element_by_xpath(".//*[\@id='table']/tbody") +; my $rows = $driver->find_child_element($table, ".//tr");

But I don't think $rows is getting what I intend to get that is all <tr> tags. After which I can find all <td> inside each <tr> using similar technique to get the table values.

Replies are listed 'Best First'.
Re: Getting Table values in Selenium
by 9mohit2 (Sexton) on Nov 17, 2016 at 07:25 UTC
    Sorry, Got the error which was using get_child_element which should be replaced with find_child_elements.