Thanks. Could you please let me know how to create an HASH from the <DL>
tag.

or Is it possible to know how many <DT> tags available under <DL> tag?



On Thu, Jun 21, 2012 at 12:06 AM, Chuck van der Linden <[email protected]>wrote:

> This one is tricky because the Delimited List behaves in HTML a little
> like the DT is wrapped around the DD, but in fact they are just one after
> the other.
>
> I think we may need to consider if there could be some better means when
> dealing with these elements to have an association between the DT and the
> DD such that you could do something that looked like
>
>   browser.dt(:how => 'what').dd  and it would return the DD that is
> associated with that DT, as if the DT was a container.
>
>   Or perhaps there would be a way to treat a DL a bit like a hash (or
> maybe a method to create a hash from a DL) where the DT is the key, and the
> DD is the value
>
> In the meantime, you may have to do something similar to either making a
> hash out of the list contents, or building a list of the DT's, finding the
> one you want to determine its index, and then pluck out the DD you want.
>
>
>
> On Wednesday, June 20, 2012 3:27:11 AM UTC-7, gajendra wrote:
>>
>> Is there any way where i can find the index of the DT tag in the web
>> page?
>> There are so many values gets populated based on the value from the
>> previous screen.
>>
>> In general the field like Account Name, System Account Id etc are
>> dynamic it may change the position in the webpage. So i need some generic
>> function/Statement where i pass the Value/Text of <DT> and it should
>> return me the value/text of <DD>
>>
>> Regards,
>> Gajendra
>>
>> On Wed, Jun 20, 2012 at 3:48 PM, Željko Filipin <[email protected]>wrote:
>>
>>> On Wed, Jun 20, 2012 at 12:09 PM, Gajendra Jain <[email protected]>
>>> wrote:
>>> > But When i tried <DT> Account Name</DT>, i got the same value
>>> 37914766, Where as my expected value should be AccountName1
>>>
>>> Try this:
>>>
>>> browser.dt(:text => "Account Name ").parent.dd(:index => 1).text
>>>
>>> Željko
>>> --
>>> filipin.eu
>>>
>>> --
>>> Before posting, please read http://watir.com/support. In short: search
>>> before you ask, be nice.
>>>
>>> [email protected]
>>> http://groups.google.com/**group/watir-general<http://groups.google.com/group/watir-general>
>>> watir-general+unsubscribe@**googlegroups.com<watir-general%[email protected]>
>>>
>>
>>  --
> Before posting, please read http://watir.com/support. In short: search
> before you ask, be nice.
>
> [email protected]
> http://groups.google.com/group/watir-general
> [email protected]
>

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

[email protected]
http://groups.google.com/group/watir-general
[email protected]

Reply via email to