Re: [gnome-desktop-testing] setting a queryEditableText
- From: Ara Pulido <ara ubuntu com>
- To: desktop-testing-list gnome org
- Subject: Re: [gnome-desktop-testing] setting a queryEditableText
- Date: Wed, 02 Jun 2010 12:30:11 +0200
Hello Leo et al,
On 05/31/2010 10:08 PM, Leo Arias F. wrote:
> Hello,
>
> Thanks a lot for all your answers. You have given me useful tips for
> future tests :)
>
> On 05/27/2010 05:47 AM, Ara Pulido wrote:
>> You can also confirm this running orca (screen reader), the Icon View
>> has a bug in the a11y information.
>>
>
> Did you report the issue, or should I do it?
I reported it. It is bug 588250 [1].
>
>> You can still create your test, but you will need use the List View
>> instead, which seems to be working correctly.
>
> I added a function to switch view:
> http://bazaar.launchpad.net/~elopio/mago/mago-nautilus/revision/123
>
> Now, my script switches to list view, then creates a new folder and
> tries to change the name:
>
> def test_nfm_001 (self, folder_name):
> self.application.switch_to_view('list')
> self.application.create_folder(folder_name)
>
> [...]
>
> TXT_UNTITLED_FOLDER = 'txtuntitledfolder*'
>
> def create_folder(self, folder_name):
> nautilus = ooldtp.context(self.name)
>
> create_folder_menu_item = nautilus.getchild(self.MNU_CREATE_FOLDER)
> create_folder_menu_item.selectmenuitem()
>
> untitled_folder = nautilus.getchild(self.TXT_UNTITLED_FOLDER)
> untitled_folder.settextvalue(folder_name)
> ==================
>
> But now I get a child not found error while trying to get
> txtuntitledfolder*. I can see the text field, and it is editable. And
> the text it shown is "untitled folder". So I don't know what's the
> problem now.
> Do I have to select something before getting the child?
>
> And I can't look for the error using the python console because when I
> set the focus to the terminal, the textfield changes to a read-only
> label. Could you explain to me what are the actions that I have to add
> to the script in order to change the name using f2 or the context menu?
> I looked for code that does something like this but didn't found anything.
The list view are not text fields, but a table. Using tables is
different than using text fields.
You can do things like this:
ldtp.wait(1)
self.remap()
nautilus = ooldtp.context(self.name)
table = nautilus.getchild("tblListView")
for i in range(0, table.getrowcount(), 1):
text = table.getcellvalue(i, 0)
if text == "untitled folder":
table.setcellvalue(i, 0, folder_name)
The problem now, is that, although getcellvalue is working correctly,
"setcellvalue" seems to not be implemented in LDTP2!!!! I filed a bug
against LDTP for this reason [2]
>
> thanks, and sorry for asking so much.
No problem. Thanks for contributing!
Ara.
[1] https://bugs.launchpad.net/bugs/588250
[2] https://bugzilla.gnome.org/show_bug.cgi?id=620343
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]