|
I’m
stuck! I have
an application that generates a report—the user: Selects
the reports tab Chooses
the desired report Select
the division and date interval to report on Clicks
the Submit button When the
submit button is clicked a new window opens (the report itself) with the same
name as the parent window that spawned it. I need to be able to get that
window (the report) and be able to time its status until it completely renders.
The trouble I am having is the test completes long before the spawned-page renders,
and I need the test to complete only after the report renders. Any suggestions?
Here is my test code: ----------
Begin Code ------------ def
test0_runSingle
openPage()
$ie.link( :text, /A300/i ).click
dbList = $ie.select_list( :name, 'DivBranch').getAllContents
for dbl in dbList
$ie.selectBox( :name, 'DivBranch').select("#{dbl}")
end
$ie.text_field(:name, "dateSelect").set("01/01/2005")
$ie.button("Submit").click
# Start time stamp for report
$start = DateTime.now
cw = IE.attach(:title, /RAPID - Reports/i)
puts cw.status()
assert(cw.contains_text("RAPID REPORT FOR OPERATIONS - A300"))
$stop = DateTime.now
diff = $stop - $start
h,m,s,frac = Date.day_fraction_to_time(diff)
s += frac.to_f
puts "That's #{h} Hours, #{m} Minutes, #{s} Seconds" end
-----------
End Code ------------ ____________________ |
_______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general
