in reply to Re^5: 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?
Thank you for this precious advice.
I see two ways out of this:
1. i start this mini-project all over again (it's very doable : at the moment i'm only doing tests to identify the tools i should use), using XPath instead of HTML::Tree. Which will allow me to use this ->element_coordinate() function from WWW::Mechanize::Firefox.
2. i have found HTML::TreeBuilder::XPath which apparently enables to use both Trees and XPath. Could this enable me to use ->element_coordinates() from my tree nodes ?
I'm trying solution 2. I've been fighting to get this to work, and finally got to a point where i identified my obstacle :
Apparently, get_element_coordinate() takes a MozRepl::RemoteObject::Instance as an argument, and i didn't find how HTML::Tree::XPath could return me such an object from my HTML::Element tree node.
If someone had a simple solution to this, great.
Otherwize, i'll just start it again with XPAth. Which would be good for me to learn anyway.
As you can see, i'm learning as i go, and there's lots i have to learn. Any book / tutorial / website for me to learn would be very welcome. I like book-learning more than all. As an indication, i read "Perl & LWP" and "Spidering Hacks" already. But neither of them addresses the DOM (i'm not even sure what it is), nor Javascript (i did two tutorials, but it's not enough), nor XPath in depth, nor... all the important things i forget.
Thanks a lot for building this very useful library Corion, and for answering beginners' questions : it's very kind of you.
Have a good day =o)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^7: WWW::Mechanize - how to get the position of an element on my screen?
by Corion (Patriarch) on Feb 01, 2012 at 07:28 UTC | |
by mascip (Pilgrim) on Feb 01, 2012 at 23:24 UTC | |
by Corion (Patriarch) on Feb 02, 2012 at 08:21 UTC | |
by mascip (Pilgrim) on Feb 02, 2012 at 09:54 UTC |