Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^9: WWW::Mechanize - how to get the position of an element on my screen?

by Corion (Pope)
on Feb 02, 2012 at 08:21 UTC ( #951376=note: print w/ replies, xml ) Need Help??


in reply to Re^8: WWW::Mechanize - how to get the position of an element on my screen?
in thread WWW::Mechanize - how to get the position of an element on my screen?

XPath is "just" a query language for trees. When starting out with XPath, I found the analogy to paths in a directory tree helpfull. "*" works the same, "/" works the same. If you don't care about the intermediate directories, use //.


Comment on Re^9: WWW::Mechanize - how to get the position of an element on my screen?
Select or Download Code
Re^10: WWW::Mechanize - how to get the position of an element on my screen?
by mascip (Pilgrim) on Feb 02, 2012 at 09:54 UTC

    Thank you ! Same algorithms, other language. Should be fairly simple =o)

    In my searches on internet, i found that Mozilla::Mechanize seems to do this another way. The elements it returns are Mozilla::DOM::HTMLElement, and it gets their position thanks to a QueryInstance.
    I don't know what a DOM:HTMLElement are, nor QueryInstance. I don't have the time to learn these now, and know that i want to use WWW::Mechanize::Firefox, so i could as well forget about it for now.

    I was just wondering if it was equivalent to using XPath in the end, and if a few words could make me understand.
    If not, it's all alright : i now know i should use XPath.
    And if i need to understand these, i'll read a book about it.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://951376]
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: (7)
As of 2014-12-27 20:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (177 votes), past polls