XPath to click through list of links and then extract
I am trying to click through the search results of the following page (as an example)
Currently I have structured it as follows.
I have a loop item > Loop Mode = Variable List > Matching XPath = //table[@class="table table-striped table-fluid"]/tbody[1]/tr[position()<9] (* see note below)
(note: I have included the position <9 in an effort to have the loop go through all <tr> elements)
Within the loop item I have a click item with a Relative XPath to the loop item = //a[@class="btn-primary" and contains(text(), "Select")]/preceding-sibling::a[1]
I basically need Octoparse to go through each the highlighted links (there are 2 links that have been twice, once against the name of the corporation and once against the select button.)
After the click item I have the extract data item
Unfortunately. This is not working. The results are 2 blank lines. When switch on the browser mode in the Run Dialog, I do not see the browser going through the individual links.
Any help would be appreciated.
Please sign in to leave a comment.
Comments
0 comments