dogtail-devel hypertext / hyperlink objects



Hi,

As it's my first post here, let me start with congratulations for
Dogtail, it's a great application!

I'm trying to get links on a webpage as separate objects. Now separate
links are seen as a text string, e.g. 
       Node roleName='text' name='' description='no description'
text='Google.ro offered in: Romana  magyar  Deutsch Advertising Programs
- About Google - Go to Google.com'


I've implemented Hypertext class support to pyspi (sent patch to
pyspi-list, I'll followup with Hyperlink) and added this to tree.py
249c249
<       contained = ('__accessible', '__action', '__component',
'__text', '__editableText')
---
>       contained = ('__accessible', '__action', '__component',
'__text', '__editableText', '__hypertext')
286a287,291
>               # Swallow the Hypertext object, if it exists
>               hypertext = self.__accessible.getHypertext()
>               if hypertext is not None:
>                       self.__hypertext = hypertext
>
391a397,398
>               elif attr == "hypertext":
>                       return self.__hypertext.getHypertext()

However, the dump of Epiphany tab is exactly the same as before, no
Hypertext object. What should I do to get the links as objects (and
click on them from Dogtail) ?


And another issue, why are the text entries in web pages (<input
type='text'...>) have the roleName "text" instead of "editableText" in
node dump? Would make it easier to find, I don't know how to get the
text entry in this dump:

       Node roleName='table cell' name='no name' description='no
description' text=''
         Node roleName='text' name='Username' description='no
description'
          Action node='Node roleName='text' name='Username'
description='no description'' name='' description='' keybinding=''
          Node roleName='text' name='' description='no description'
text='Username'
        Node roleName='table cell' name='no name' description='no
description' text=''
         Node roleName='text' name='Username' description='no
description' text=''
         Node roleName='text' name='' description='no description'
text=''

( the html is "Username <input type=text name=Username ...>" )

Thanks in advance for enlightenment :)

-- 
Marius Andreiana




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]