Re: [gnome-desktop-testing] setting a queryEditableText

Hi Leo,

You're trying to change something that's read-only. The file name isn't editable until you start to rename the file. Right-click>Rename... or F2 will both do the trick. Once you do that, you need to make sure you get the child object for the edit field, not for the file icon. This was a little more obvious when we had a semi-working LDTP script recorder but you can still get an example with accerciser.

Fire it up, drill down to the contents of the folder, and find your file. Open the Interface Viewer tab. You'll note that the Text field, when expanded, lets you view the name of the folder but not edit it. Now in Nautilus, right-click the file and pick Rename... A new object will appear in accerciser at the bottom of the list in the same container. It will have the text box icon. In Interface Viewer, the Text property is listed as (Editable) and, indeed, the text can be changed there which updates it in Nautilus.

So as far as writing a test, you'd have to set focus to the icon, press F2 or pick Rename... from the context menu, then getchild on the parent container to get the edit box. Hope that makes sense.

On Wed, May 26, 2010 at 2:53 PM, Leo Arias F. <yo elopio net> wrote:
Hello desktop-testing-list at gnome,

I don't remember if I introduced myself before. My name is Leo Arias,
and I'm learning about Mago and LDTP in order to help with Ubuntu
automated tests.

I started a nautilus test that creates a new folder. You can check it

But I'm having a problem. When I try to set the name of the folder on:
58         untitled_folder.settextvalue(folder_name)

I get the following error:
'Text cannot be entered into object.'

Looking to the ldtp code I found that this error is thrown when the
function queryEditableText() of the text field returns a
NotImplementedError exception.

But I don't understand what does it mean. Could you please explain to me
what is not implemented?
If it's possible, I would love to help implementing it. And if it isn't,
is there a workaround to set the name of the folder?

pura vida.
¡paz y baile!
desktop-testing-list mailing list
desktop-testing-list gnome org

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