[Webtest] Using emulateSetInputFieldAttribute to enable a disabled listbox control

Denis N. Antonioli webtest@lists.canoo.com
Fri, 19 Aug 2005 14:35:14 +0200


Hi Chris

emulateSetInputFieldAttribute had been written just for input field =20
(text fields).
As it happens, I had the need this week to activate a select element =20
(pull down menu) and just adapted the code to handle any kind of form =20=

element :-)

Starting with build 989 (from August 18), =20
emulateSetInputFieldAttribute has a new attribute 'tagName' to let =20
webtest know what it should be looking for. The attribute has the =20
default value "input", but you can change it as desired.

Look at webtest's selftests for a comprehensive example.

Happy testing
     dna


On 18 ao=FBt 05, at 23:20, Chris Humphrey wrote:

> I recently migrated my scripts to use Canoo 1.7.  I am attempting =20
> to extend a few of them to handle the testing of some disabled =20
> controls on some pages in our web application.  I started by using =20
> the example html and canoo xml scripts on the webtest site.  The =20
> example uses a disabled button and I didn't have any problems =20
> getting it to work.  I changed the html by adding a listbox with a =20
> single element and disabled the control.
>
> Running the script results in this error:
>
> Test step emulateSetInputFieldAttribute (/Scripts/=20
> EnableListboxTest.xml:49: )  named "Enabling the Listbox control" =20
> failed with message "No suitable form found having field named =20
> "myListbox"".
>
> It seems like this is more of a problem with trying to find the =20
> field in the DOM that with the emulateSetInputFieldAttribute call.  =20=

> The HTML is very simple (I even simplified the example by making it =20=

> include a single form inside the body tag with the listbox inside =20
> that.  There isn't anything complicated.  I'm just stumped since =20
> the button example works but this won't.
>
> Thanks in advance for any help on this issue,
> ~Chris
>
>
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
>

--=20
Committees never have vision. They have meetings
   -- John C. Welch