Try inserting a statement to logout or go back to the original page. See below:
On 2/9/07, lianagi <[EMAIL PROTECTED]> wrote:
Thanks for all the help. =) I can now take input from a text file. One more problem though, using the following codes: myFile = File.new( "C:\\Documents and Settings\\Jone\\Desktop\\names.txt", "r" ) lineArray = IO.readlines( myFile.path ) lineArray.each{ |line| ie.text_field( :name, "searchname" ).set( line ) ie.button(:src, /btn_weiter/).click
if ie.contains_text( "found" )
sleep 300
else You might want to assert something here if text isn't found: end ie.goto("the search page") # in other words go back, check another name }
myFile.close() the problem is... After the name had been found, it will sleep for 300 secs then after that It won't go back to the input name text field (coz after clicking the search button, I will be directed to page 2) then the program stops. Because of that, I can only check the first name on my list. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6488&messageID=18513#18513 _______________________________________________ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
_______________________________________________ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general