On 9/13/06, Ryan <[EMAIL PROTECTED]> wrote:
Just post everything here.

I am trying to use an open source tool called rth, which supposidly has a plugin to watir..thats why I am trying to get this workin on my linux machine..


I just took a look at the rth demo code.  You don't need Watir to see the demo work. Just take this bit

###############################################
# Open Google
test_site = 'http://www.google.com'
ie = IE.new
ie.goto(test_site)
db.writeVerification(stepNum, "Open Google","Google Search page appears","Google opened successfully", "INFO",  "Google Home Page", "N/A", "N/A", "21")
stepNum += 1

# Enter pickaxe in search box and click Search button
ie.text_field(:name, "q").set("pickaxe")
ie.button(:name, "btnG").click


# Verify that text appears on search results page
if ie.contains_text("Programming Ruby")
  db.writeVerification(stepNum, "Enter \"pickaxe\" in google text box and click \"Google Search\" button","\"Programming Ruby\" appears on page","Actual Results match Expected Results", "PASS",  "Google Search", "N/A", "N/A", "26")
else
  db.writeVerification(stepNum, "Enter \"pickaxe\" in google text box and click \"Google Search\" button","\"Programming Ruby\" appears on page","Actual Results does not match Expected Results", "FAIL",  "Google Search", "N/A", "N/A", "26")
end
stepNum += 1

# Close the browser
ie.close

######################################################

and replace it with something goofy:

######################################################

var1 = 1
var2 = 2

db.writeVerification(stepNum, "assign var1","assign var2"," preparing to add", "INFO",  "for real", "N/A", "N/A", "21")
stepNum += 1

result = var1 + var2


# Verify that text appears on search results page
if result == 3
  db.writeVerification(stepNum, "result of adding is 3","Actual Results match Expected Results", "PASS",  "addition", "N/A", "N/A", "26")
else
  db.writeVerification(stepNum, "addition in Ruby is broken","Actual Results does not match Expected Results", "FAIL",  "addition", "N/A", "N/A", "26")
end
stepNum += 1
##############################################

but feel free to learn Watir anyway.  :)
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to