Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Repeating If loop
#6
Solved: 10 Years, 9 Months, 3 Weeks ago
Quote: Warning or Fail
"If Browser("Wisdom").Page("Wisdom IA").Frame("parent").WebElement("No Results Found").GetROProperty("visible") = True Then" is not found.

My code gives me a warning or fails when WebElement("No Results Found") is not found. My goal is to check if the WebElement("No Results Found") is displayed,
You can not use GetRoProperty for an object which doesn't exist(in your case it may/'nt exist)
so use .Exist method again as you used in first line


If Browser("Wisdom").Page("Wisdom IA").Frame("parent").WebElement("No Results Found").Exist(5) Then

And to make your code look better, use a function to test data availability by just passing date parameter and get the returned value as boolean found or not found

By the way "If" is not a loop, it's a conditional statement!
Reply


Messages In This Thread
Repeating If loop - by mv8167 - 06-30-2011, 11:06 PM
RE: Repeating If loop - by parminderdhiman84 - 06-30-2011, 11:17 PM
RE: Repeating If loop - by mv8167 - 06-30-2011, 11:34 PM
RE: Repeating If loop - by parminderdhiman84 - 06-30-2011, 11:45 PM
RE: Repeating If loop - by mv8167 - 07-01-2011, 06:59 PM
RE: Repeating If loop - by rajpes - 07-04-2011, 05:27 PM
RE: Repeating If loop - by mv8167 - 07-06-2011, 12:35 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  FOR LOOP shayk1985 1 5,131 12-13-2012, 11:35 AM
Last Post: sams001
  How to exit from a for loop silpavinod 2 9,411 10-17-2012, 12:55 AM
Last Post: agarwl.anurag
  for loop sia sharma 1 3,210 09-13-2012, 11:44 AM
Last Post: ksrikanth2k9
  Help with Loop LJENNE 1 3,067 08-10-2012, 12:32 PM
Last Post: Ankesh
  How to get out of infinite FOR loop... sssidana 3 4,405 07-20-2012, 01:04 AM
Last Post: sree.85

Forum Jump:


Users browsing this thread: 1 Guest(s)