Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^3: Javascript Navigation with WWW::Mechanize::Firefox

by Anonymous Monk
on Sep 20, 2012 at 16:55 UTC ( #994699=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Javascript Navigation with WWW::Mechanize::Firefox
in thread Javascript Navigation with WWW::Mechanize::Firefox

I am getting like "No elements found found

When that happens, dump the innerHTML of body and verify the lack of such an element

print $body =~ m{(<li.*?class="next".*?</li>)};

Using firebug, if I turn off javascript, there is no search results, no next button

But if I turn on javascript,  $x('//li[@class="next"]'); returns two nodes

/html/body/form/div[2]/div[2]/div[2]/div/table/tbody/tr/td[2]/div/tabl +e/tbody/tr[2]/td/span/div/ul/li[5] /html/body/form/div[2]/div[2]/div[2]/div/table/tbody/tr/td[2]/div/tabl +e/tbody/tr[25]/td/span/div/ul/li[5]

Also, maybe the search results are still loading

Replies are listed 'Best First'.
Re^4: Javascript Navigation with WWW::Mechanize::Firefox
by Matt™ (Acolyte) on Sep 20, 2012 at 17:47 UTC

    Thanks, Its working now. Site was loading. :)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://994699]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (9)
As of 2016-06-27 12:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (337 votes). Check out past polls.