I tried this also, but all in vain: require 'rubygems' require 'watir' require 'win32ole' require 'watir/ie' require 'watir\contrib\enabled_popup'
def startClicker(button , waitTime= 9, user_input=Yes) hwnd = $ie.enabled_popup(waitTime) if(hwnd) w = WinClicker.new if(user_input) w.setTextValueForFileNameField( hwnd, "Yes") end sleep 3 w.clickWindowsButton_hwnd( hwnd, "Yes" ) w=nil end end ie = Watir::IE.new ie.goto('http://qa2.mlb.com/enterworkflow.do? flowId=sb_purchase&brand=cle_scoreboard&wfClub=cle') It is not clicking"Yes" button of security alert pop-up. Please help me out. Regards D G On Jul 20, 3:58 pm, Dheeraj Gambhir <checktestingthi...@gmail.com> wrote: > It is not working yet, i have tried all the given below methods in > code: > ********************************** > require 'rubygems' > require 'watir' > require 'win32ole' > > ie = Watir::IE.new > ie.goto('http://qa2.mlb.com/enterworkflow.do? > flowId=sb_purchase&brand=cle_scoreboard&wfClub=cle') > puts "Security Alert must be in the way. Click to bypass" > autoit.WinActivate( "Security Alert", "") > autoit.Send( "(TAB)") > autoit.Send( "(TAB)") > autoit.Send( "(Enter)") > > autoit.ControlClick("Microsoft Internet Explorer",'', 'OK') > autoit.ControlClick("Security Information",'', '&Yes') > autoit.ControlClick("Security Alert",'', '&Yes') > sleep(5) > > ********************************** > > #------------------------------------------------------------------------------------------------------------ > # > #includes > require 'watir' # the controller > require 'win32ole' > # set a variable > test_site = 'http://qa2.mlb.com/enterworkflow.do? > flowId=sb_purchase&brand=cle_scoreboard&wfClub=cle' > > # open the IE browser > ie = Watir::IE.new > > # print some comments > puts "## Beginning of test: Form Submission" > puts " " > > puts "Step 1: go to the test site: " + test_site > a = Thread.new { > ie.goto(test_site) > } > ie.send_keys('{TAB}') > ie.send_keys('{TAB}') > ie.send_keys('{ENTER}') > a.join > puts " Action: entered " + test_site + " in the address bar." > puts " " > puts "Step 2: enter 'dheeraj.gamb...@tavant.com' in the > emailAddress text field" > ie.text_field(:name, "emailAddress").set > ("dheeraj.gamb...@tavant.com") > puts " Action: entered dheeraj.gamb...@tavant.com in the > emailAddress field" > puts " " > puts "Step 3: enter 'dheeraj' in the password text field" > ie.text_field(:name, "password").set("dheeraj") > puts " Action: entered dheeraj in the password field" > puts " " > puts "Step 4: click the 'Login' button" > ie.button(:value, "Login").click > puts " Action: clicked the Login button." > if ie.contains_text("September") > puts "Test Passed. Found the test string: 'September'. Actual > Results match Expected Results." > else > puts "Test Failed! Could not find: 'September'" > end > > puts " " > ie.link(:text, "September").click > > *************************************** > > On Jul 20, 2:46 pm, Željko Filipin <zeljko.fili...@wa-research.ch> > wrote: > > > On Mon, Jul 20, 2009 at 11:34 AM, Dheeraj Gambhir < > > > checktestingthi...@gmail.com> wrote: > > > whenever i goto the login > > > page it throws me a security alert popup > > > Take a look: > > >http://wiki.openqa.org/display/WTR/Pop+Upshttp://wiki.openqa.org/disp... > > > Željko > > --http://watirpodcast.com/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~----------~----~----~----~------~----~------~--~---