If you find out whether you installed Popup killer app? And, make sure to set your browser security to 'medium'.
I really like to know how to disable All popups like that. Not for testing, but for something else. Thanks. ----- Original Message ---- From: HAHAHA <windchillfigh...@gmail.com> To: Watir General <watir-general@googlegroups.com> Sent: Tuesday, December 16, 2008 7:53:39 AM Subject: [wtr-general] Re: button.Click_No_Wait only highlights the button, does not click I tried. The click_no_wait still cannot click the button. I think maybe it is really the configure problem. I use XP SP3, ruby186-27, watir1.6.2. Do you think some earlier version will be better? I know some programs cannot run in current version, like rubyscript2exe.rb. On Dec 16, 3:49 am, "pramod D" <petkar.pra...@gmail.com> wrote: > Hi, > > I worked with your code and it is working fine, Only thing you need to do is > introduce sleep(5) just before clicking the button. It will handle the pop > up. > > Thanks, > Pramod > > > > On Mon, Dec 15, 2008 at 8:57 PM, HAHAHA <windchillfigh...@gmail.com> wrote: > > > Thank you for your code. I test it. But Click_no_wait still cannot > > work. The result shows "There's no popup. " > > Here is the code I used to test. I changed your code to get it. > > > require 'watir' > > require 'watir/ie'# > > > require 'watir\contrib\enabled_popup' #fafdfs > > require 'watir/dialog'#fafsfasd > > require 'watir/winClicker'#fasfsdfa > > require 'thread' > > def test_001_Login > > $batchCode="0" > > # attach a new browser window > > $ie = Watir::IE.attach(:url,"about:blank") > > > Watir::IE.attach_timeout = 10 > > $ie.goto('http://www.w3schools.com/js/tryit_view.asp? > > filename=tryjs_alert<http://www.w3schools.com/js/tryit_view.asp?filename=tryjs_alert>') > > # This website only has an alert button, you > > can test using this website. > > > $ie.button(:index,1).click_no_wait > > begin > > hwnd = $ie.enabled_popup(5) > > if(hwnd) > > popup = WinClicker.new > > popup.makeWindowActive(hwnd) #Activate the > > window. > > popup.clickWindowsButton_hwnd(hwnd,"OK") > > #Click the OK button > > end > > rescue => e > > puts e > > puts "There is no popup" > > end > > end > > > test_001_Login > > > Can you try it and see whether it can work in your computer? Thanks a > > lot. > > > On Dec 12, 10:15 pm, "pramod D" <petkar.pra...@gmail.com> wrote: > > > I am posting a sample code which i am using in my script > > > > *def test_001_Login > > > $batchCode="0" > > > # attach a new browser window > > > $ie = Watir::IE.attach(:url,"about:blank") > > > Watir::IE.attach_timeout = 10.0 > > > ....... > > > ....... > > > > $ie.frame("mains").image(:index,1).click_no_wait > > > begin > > > hwnd = $ie.enabled_popup(5) > > > if(hwnd) > > > popup = WinClicker.new > > > popup.makeWindowActive(hwnd) #Activate the > > window. > > > popup.clickWindowsButton_hwnd(hwnd,"OK") #Click > > the > > > OK button > > > end > > > rescue => e > > > puts e > > > puts "There is no popup" > > > end > > > > def test_005_logout > > > > $ie.frame("header").image(:index,5).click > > > $ie.goto("about:blank") > > > $ie.minimize() > > > end > > > > Initially i will open an blank browser manually(This is only for first > > time) > > > and then in Login method i am attaching it and continue my script, in > > logout > > > method again i am going to direct browser for balnk page. So nxt time > > when > > > you re-run the script, blank page is available and script runs smoothly. > > If > > > i directly open browser from the script it will not work. > > > > I am not sure what is the exact problem for time being i am using this > > > approach. > > > * > > > On Fri, Dec 12, 2008 at 8:49 PM, Bret Pettichord <b...@pettichord.com > > >wrote: > > > > > Your code is correct. There is something about your configuration that > > > > causes this to fail. > > > > > Bret > > > > > HAHAHA wrote: > > > > > I have tried, using this code: > > > > > > require 'watir' > > > > > > browser = Watir::IE.new > > > > > browser.goto('http://www.google.com') > > > > > browser2 = Watir::IE.attach(:title, /Google/) > > > > > browser2.text_field(:name, 'q').set('Watir') > > > > > browser2.button(:name, 'btnG').click_no_wait > > > > > > The click_no_wait still cannot run. Is the code right? > > > > > > On Dec 12, 9:58 am, "larryni...@gmail.com" <larryni...@gmail.com> > > > > > wrote: > > > > > >> Pramod, could you show us an example of your code? > > > > > >> On Dec 11, 11:01 pm, "pramod D" <petkar.pra...@gmail.com> wrote: > > > > > >>> Hi Michael, > > > > > >>> Initially i also faced same problem when i use Click_no_wait > > control > > > > was > > > > >>> going but never clicked it, To come around this initially i opened > > the > > > > IE > > > > >>> (IE7)with blank page and then, i will attach the browser at the > > start > > > > of the > > > > >>> script and continue to execute my script as usual and worked > > correctly. > > > > For > > > > >>> time being you can fallow this turn around method. > > > > > >>> Thanks, > > > > >>> Pramod > > > > >>> On Fri, Dec 12, 2008 at 1:46 AM, Michael Hwee < > > michael_h...@yahoo.com > > > > >wrote: > > > > > >>>> That is disappointing. > > > > >>>> I believe that is something like OS and/or configuration issues, > > > > rather > > > > >>>> than watir itself. > > > > > >>>> Michael > > > > > >>>> ----- Original Message ---- > > > > >>>> From: "larryni...@gmail.com" <larryni...@gmail.com> > > > > >>>> To: Watir General <watir-general@googlegroups.com> > > > > >>>> Sent: Thursday, December 11, 2008 12:00:00 PM > > > > >>>> Subject: [wtr-general] Re: button.Click_No_Wait only highlights > > the > > > > button, > > > > >>>> does not click > > > > > >>>> Sorry, Michael, your code doesn't work either. It opens the page, > > > > >>>> highlights the button yellow, and then just sits there. No popup > > is > > > > >>>> ever launched because it doesn't actually click the button. Watir > > > > >>>> doesn't report any errors, but it never completes, either. If I > > > > >>>> change click_no_wait to click!, it does launch the popup, but the > > > > >>>> handle_nextpopup command never executes - it's been sitting here > > for > > > > >>>> 90-120 seconds with the popup open not doing anything. So, again, > > to > > > > >>>> summarize: click_no_wait is incapable of firing any events, but > > click! > > > > >>>> makes the script hang.- Hide quoted text - > > > > > >> - Show quoted text -- Hide quoted text - > > > > - Show quoted text -- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---