Hi, Please find attached a script to extract scrap information from orkut user. What I am seeing is that when I do click on submit button, the click call never returns. The tracing of the calls reveals that click function call is spinning because @ie.busy status never becoming false.
I think the problem is in the OLE interface of ie which goes havoc when dealing with orkut. I would appreciate any pointers about how can I go step further in debugging. I have a workaround now by using timeout but this is very naive solution. I would also appreciate if I can have some patch in watir code so that I need not have timeout around every click call. (The attached script has work around code commented.) If needed I can send out my analysis using tracing. Environment: Watir 1.5 Thanks and Regards, Manish
require 'watir' # the watir controller require 'timeout' include Watir # set a variable test_site = 'https://www.google.com/accounts/ServiceLoginBox?continue=https%3A%2F%2Fwww.orkut.com%2FRedirLogin.aspx%3Fmsg%3D0%26page%3Dhttp%253A%252F%252Fwww.orkut.com%252F&followup=https%3A%2F%2Fwww.orkut.com%2FGLogin.aspx&service=orkut&nui=2&uilel=1&skipvpage=true&hl=en-US' # open the IE browser ie = Watir::IE.new # print some comments puts "## Beginning of test: Orkut Scraps" puts " " #Login puts "Step 1: go to the test site: " + test_site ie.goto(test_site) puts "Step 2: Enter the username" ie.text_field(:name, "Email").set("talent.capture") #Login puts "Step 3: Enter the password" ie.text_field(:name, "Passwd").set("recruitment") #Password puts "Step 4: Clear remember me checkbox" ie.checkbox(:name, "PersistentCookie").clear #Clear Remember me on this computer #begin #status = Timeout::timeout(20) { puts "Step 5: Submit" ie.button(:value, "Sign in").click #Submit # } #rescue TimeoutError # puts "Looks like this is working ...I am on my way :-)\n" #end puts "Now on Home page" #ie = Watir::IE.attach(:url, "http://www.orkut.com/Home.aspx") while ! ie.contains_text("talent") do p "waiting for page to load" sleep 0.1; end a = ie.contains_text("talent.capture") if !a puts "Test failed! Page didn't contain text: Reached test verification point." else # begin #status = Timeout::timeout(20) { puts "Click on scrapbook" ie.link(:text, "scrapbook").click # } # rescue TimeoutError # puts "Looks like this is working ...I am on my way :-)\n" # end end exit
_______________________________________________ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general