Skip to content

Commit

Permalink
max page number
Browse files Browse the repository at this point in the history
  • Loading branch information
tlevine committed Jun 5, 2012
1 parent 47fbfbc commit a977dac
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions yoga/oh_just_use_selenium.py
Expand Up @@ -54,9 +54,12 @@ def main():

# Fast forward to new pages: Maximum page
max_page_numbers = driver.find_elements_by_xpath('//td[a[text()="..."]]/preceding-sibling::td[position()=1]')
if max_page_numbers == []:
max_page_numbers = [page_number.xpath('../td[position()=last()]') for page_number in page_numbers]

for nodes in [page_numbers, ellipses, max_page_numbers]:
print(nodes)
print [n.text for n in nodes]
if len(nodes) == 1:
import pdb; pdb.set_trace()
raise ValueError('Only one navigation row')
Expand Down

0 comments on commit a977dac

Please sign in to comment.