Re: dogtail-devel question of dogtail -- inbox.doAction('activate')
- From: David Malcolm <dmalcolm redhat com>
- To: Yan Tian <tyan redhat com>
- Cc: dogtail-devel-list gnome org
- Subject: Re: dogtail-devel question of dogtail -- inbox.doAction('activate')
- Date: Thu, 28 Sep 2006 13:58:46 -0400
On Thu, 2006-09-28 at 16:47 +0800, Yan Tian wrote:
> Hi all,
>
> I have a question of _inbox.doAction('activate')_ in script of evolution
> application.
>
> In the 'Mail Folder Tree', expand the 'On this Computer' table cell,
> there is 'Inbox' table cell. Expand the account_name table cell, there
> is 'Inbox' table cell too. Code as below:
>
> inbox = evo.findChildren(dogtail.predicate.GenericPredicate("Inbox",
> roleName="table cell"), recursive=True)
>
> I tried to handle the 'Inbox' table cell of account_name. But the
> account_name, 'On this Computer', 'Inbox' of account_name, 'Inbox' of
> 'On this Computer' had the same ancestor 'Mail Folder Tree' table cell.
>
> I used findAncerstor() method. But cann't find valuable roleName to
> differentiate the two widget.
>
> Did anyone meet with the same question and how to deal with it? Thanks.
I believe you can do the search in two stages, with something like this,
given accountName:
accountNode = evo.findChildren(dogtail.predicate.GenericPredicate(accountName, roleName="table cell"), recursive=True)
myAccountInbox = accountNode.findChildren(dogtail.predicate.GenericPredicate("Inbox", roleName="table cell"), recursive=True)
(note the different starting point for the second search)
onThisComputerNode = evo.findChildren(dogtail.predicate.GenericPredicate("On This Computer", roleName="table cell"), recursive=True)
onThisComputerInbox = onThisComputerNode.findChildren(dogtail.predicate.GenericPredicate("Inbox", roleName="table cell"), recursive=True)
Hope this helps
Dave
[
Date Prev][Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]