The getValue() method is now available in all UI objects in Tellurium 0.8.0
Snapshot.

Thanks,

Jian

On Wed, Jun 16, 2010 at 4:46 PM, Jian Fang <[email protected]> wrote:

> That is correct behavior. The getText() command actually got back the text
> node of a DOM node.
> But if there is no text node defined, it should be empty.
>
> To make things easier, I will add getValue to the base UI object in 0.8.0
> so that all UI objects
> can call getValue() method directly.
>
> BTW, there are some subtle difference between getValue and getAttribute.
> See the following JavaScript
> implementation of getValue().
>
> // Get the value of an <input> element
> function getInputValue(inputElement) {
>     if (inputElement.type) {
>         if (inputElement.type.toUpperCase() == 'CHECKBOX' ||
>             inputElement.type.toUpperCase() == 'RADIO')
>         {
>             return (inputElement.checked ? 'on' : 'off');
>         }
>     }
>     if (inputElement.value == null) {
>         throw new SeleniumError("This element has no value; is it really a
> form field?");
>     }
>     return inputElement.value;
> }
>
> That is to say, if you have a checkbox or a radio button, getValue will not
> look at the "value" attribute, but the "checked" attribute instead.
>
> Thanks,
>
> Jian
>
>
> On Wed, Jun 16, 2010 at 4:31 PM, kamundse <[email protected]> wrote:
>
>> When I use getText() I see:
>>
>> org.junit.ComparisonFailure: Button 'create_account' did not have
>> correct text. expected:<[Create My Account]> but was:<[]>
>>        at org.junit.Assert.assertEquals(Assert.java:123)
>> ...
>>
>> getAttribute() did work.
>>
>> Thanks!
>>
>> -Kristin
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "tellurium-users" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected]<tellurium-users%[email protected]>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/tellurium-users?hl=en.
>>
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"tellurium-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/tellurium-users?hl=en.

Reply via email to