Hello,
I am new to Ruby and Watir and as my first assignment, I am trying to
fix the ruby script which automated the opening and browsing messages
in the Excite Mail. After Excite changed interface, the script has
been failing.
I used IE toolbar to see the underlying elements in the page and it
seems that it is lots of nested divs before you find an actual #text
which provides the visible text for the link.
I am not sure how to access the divs deep down to find the text value
I want and than click it.
The structure of HTML for "Logout" link looks like this.
<DIV class=ApplicationHeader id=ApplicationHeader>
<DIV class=NavigationBar>
<DIV class=NavigationBar_Padding>...</DIV>
<DIV class=NavigationBar_logo>...</DIV>
<DIV class=NavigationBar_buttons>...</DIV>
<DIV class=NavigationBar_extra>
<DIV class=NavigationBar_Search>
<DIV class=NavigationBar_Links>
<DIV class=NavigationLink>...</DIV>
<DIV class=NavigationLink>...</DIV>
<DIV class=NavigationLink>...</DIV>
<DIV class=NavigationLink>
<DIV class=NavigationLink_Icon>...</DIV>
<DIV class=NavigationLink_text>
#text
I tried following but it didn't work.
if ($ie.div(:id, "ApplicationHeader").div(:index,
1).div(:index,4).div(:index,2).div(:index,4).div(:text,/
Logout/).exists?)
thr = Thread.new{$ie.div(:id,
"ApplicationHeader").div(:index,1).div(:index,4).div(:index,
2).div(:index,4).div(:text,/Logout/).click}
if (thr.join(MaxPageLoadWait).nil?)
thr.exit
end
debug "Clicked logout link"
end
I am able to find the div ApplicationHeader using following
$ie.div(:id, "ApplicationHeader")
Any help would be highly appreciated.
Thanks,
Nisha
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Watir General" group.
To post to this group, send email to [email protected]
Before posting, please read the following guidelines:
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---