I am trying to develop a check for replies vs. views for a forum.
Problems,
A) dynamically find categories
B) dynamically iterate thru topics to cull answer
Since I am still new to WATIR, I don't know howto set up the iteration
and I'm trying to get the navstrip info so that I know what area the info
came from
Any help appreciated
--------------.rb starts -------------------------------------
#--------------------------------------------------------------#
#
#
# Edit of Simple LAWSON SITE check
#
#
#------------------------------------------------------------------#
require 'watir' # the watir controller
# set a variable
base_site = 'http://lawsontalk.com/index.php'
forum_detail = '?showforum=17'
test_site = base_site + forum_detail
# open the IE browser
ie = Watir::IE.new
# print some comments
puts "## Beginning; open Lawsontalk"
puts " "
puts "go to the test site: " + test_site
ie.goto(test_site)
puts " Action: entered " + test_site + " in the address bar."
# Set Login Info - This WORKS
# puts " Action: Enter Login info for forum"
# ie.text_field(:name, "UserName").set("Login")
# ie.text_field(:name, "PassWord").set("Password")
# This should press 'GO' button to complete login, disabled for testing
# ie.button(:name, "Go").click
# Once Logged in perform Housekeeping
#
# this should be LawsonTalk -> Community -> General
Thread_area = ie.div(:id, "navstrip")
# this should be an iteration of all forum topics
Topic = ie.row(:row, "forum topics")
# Compare Replies to Views
# If views > 50 and Replies = 0 then Thread requires attention
puts " Action: Find threads not answered"
puts " The following Topic" + Topic + " in area" + Thread_area + " has " +
Views + " and no replies, this may require attention "
puts " "
# end of test
puts "## End of test"
# End
-------------.rb ends-------------------------------------
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general