Hi,
     The application under test has got a tree structure. I want to write a test case which invovles navigating through the tree structure and verifying whether the correct screen is displayed when the corresponding link is clicked. I am able to navigate through the tree structure by using the link index.I am retrieving the innertext of the link and then verifying whether that text is present on the other frame. The code that I am using
   link_index  = 1     
while(ie.frame(:index,tree_frame_index).link(:index,link_index).exists?)
  link_text = ie.frame(:index,tree_frame_index).link(:index,link_index).innerText
  ie.frame(:index,tree_frame_index).link(:index,link_index).click
  if $ie.frame(:index,text_frame_index).contains_text(link_text)
     puts "Test passed"
  else
 &nb! sp;  puts "Test failed"
  end
  link_index = link_index + 1
end
Here the text of the child nodes are same for all the parent nodes. How do I know whether the text displayed of the child node belongs to the corresponding parent node?
 
Is there way by which we can find out the parent nodes and child nodes of a tree structure in watir?
 
 
 
 
 


Send instant messages to your online friends http://in.messenger.yahoo.com

_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to