Replace "if verify($ie.text.include?(searchedtext))==true"
with "if $ie.text.include?(searchedtext)"



----- Original Message ----
From: Margam <[email protected]>
To: Watir General <[email protected]>
Sent: Tuesday, January 27, 2009 11:16:06 AM
Subject: [wtr-general] Need help with verifying if text exists!


HI all,
I am trying to verify if particular text is present in the page using
verify method. And also output corresponding "passmessage" and
"failmessage". This is the code snippet I am using:
-------------------------
def verify_text(searchedtext,passmessage,failmessage)
    if verify($ie.text.include?(searchedtext))==true
      puts passmessage
  else
      puts failmessage
  end
end
---------------------------------------------------

Note: all arguments for this function are passed from the main script.

The problem I am facing is, even if the "verify" passes, only the
"failmessage" is output. The "passmessage" is never output.

The reason I want to use "verify" instead of a simple
"$ie.text.inclue?" is, so that not only the failmessage is output but
also a failure is raised.

Hope I am clear.
Can someone tell me what the problem is?
Thank you

Margam

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to