in reply to Re^2: WWW::Mechanize::Firefox and dynamic pages
in thread WWW::Mechanize::Firefox and dynamic pages

UPDATE: Using the scroll function makes the bar scroll, but then when I call:

$mech->content()

The friends' names aren't there, even though they are there on the page and I can find them using Firebug. How do I get all the data to load when I call mech->content()?

Replies are listed 'Best First'.
Re^4: WWW::Mechanize::Firefox and dynamic pages
by Corion (Patriarch) on Jul 28, 2013 at 08:04 UTC

    Maybe the additional elements live in another iframe? What is the XPath expression you get from Firebug for the new elements?

      The XPath returned from the code is:

      /html/body/div/p/a

        This is weird - as the list lives in the main document, it certainly should show up with ->content() after the elements have been added. I'm not aware of any caching going on. You will need to debug this on your own, and make sure that your parsing actually picks up the correct value from ->content (or even use the nodes as returned by ->selector or ->xpath directly.