Navigating through the menu tree

1 view
Skip to first unread message

Hemalatha

unread,
Oct 8, 2008, 3:16:28 AM10/8/08
to watir-...@googlegroups.com

Hi,

 

     When i navigate through the menu tree, the nodes takes some 2 seconds to load, mean while script fails saying that it is unable to find the node element.

 

 I used wait_until in my script, even then it fails.

 

It does not fail all the time, this code is inside the loop and it fails after the loop executes some 25 times.

What should i do, so that the script waits till the nodes appear on the screen and then click on the link.

 

I use windows vista and IE7

 

My code is

 

wait_until { $browser.frame(“leftFrame”).link(:text,”EMS”).exists?}

$browser.frame(“leftFrame”).link(:text,”EMS”).click

 

wait_until {$browser.frame(“LEFTFRAME”).link(:text,”ADMINISTRATOR”).exists?}

$browser.frame(“leftFrame”).link(:text, ,”ADMINISTRATOR”).click

 

wait_until {$browser.frame(“LEFTFRAME”).link(:text,”School”).exists?}

$browser.frame(“leftFrame”).link(:text, ”School”).click

 

wait_until {$browser.frame(“LEFTFRAME”).link(:text,”Create School”).exists?}

$browser.frame(“leftFrame”).link(:text,”Create School”).click

 

 

Regards,

Hema

Reply all
Reply to author
Forward
0 new messages