Out of curiosity - why you didn't want to use the "Simplest way to
stop JavaScript Pop Ups from showing when running your Watir tests"?

Jarmo

On Jan 10, 2:16 pm, Preethi <preethi.sivaku...@gmail.com> wrote:
> Thanks a ton for advising me to go for higher version of WATIR.
> I un-installed my older version and installed WATIR 1.7.1.
> The above code snippet which i shared above(startclicker) throws some
> error in my console
> --------------------------------------------------------------------------- 
> -------------------
> ..............winclicker.rb:305: [BUG] Segmentation fault ruby
> 1.8.6 .....
> this application has requested the runtime to terminate it in unusual
> way.
> --------------------------------------------------------------------------- 
> -------------------
>
> but I tried withhttp://wiki.openqa.org/display/WTR/JavaScript+Pop+Ups
> (clickPrompt solution#7)
> and it is working perfectly for me.
>
> Regards
> Preethi.
>
> On Jan 10, 2:36 pm, Jarmo Pertman <jarm...@gmail.com> wrote:
>
>
>
>
>
>
>
> > It should be working if you're using newer version of Watir than 1.6.5
> > or just use the simplest way to avoid popups at all without any need
> > to use #click_no_wait as described 
> > athttp://wiki.openqa.org/display/WTR/JavaScript+Pop+Ups
>
> > Jarmo
>
> > On Jan 10, 11:16 am, Preethi <preethi.sivaku...@gmail.com> wrote:
>
> > > There seems to be a tickethttp://jira.openqa.org/browse/WTR-320
> > > where it is mentioned that click_no_wait just flashes the button but
> > > doesn't click that!
>
> > > Is that still open? if Yes , what is the alternative for that?
>
> > > I'm desperately looking for some solution so that I can move ahead.
>
> > > Thanks
> > > Preethi.
>
> > > On Jan 10, 9:09 am, Preethi <preethi.sivaku...@gmail.com> wrote:
>
> > > > Dave,
>
> > > > Thanks for the response.
>
> > > > This is the javascript snippet which is called and produces alert
>
> > > > function validateFields(){
>
> > > > var sid=document.forms(1).ScheduleID.value;
> > > > sid=Trim(sid);
> > > > if(sid=="")
> > > > {
> > > > alert("scheduleID cant be Empty");
> > > > document.forms(1).ScheduleID.focus();
> > > > return false;}
>
> > > > else if(validateID(sid)==false){
> > > > alert("Oops! A Schedule with the same name already exists!");
> > > > document.forms(1).ScheduleID.focus();
> > > > return false;}
>
> > > > .....
> > > > .....
> > > > ......<code continues>
>
> > > > and I use IE Version 7.
>
> > > > Let me know if you can reproduce the issue or you need more info.
>
> > > > PS: Somewhere in a forum, it is said that click_no_wait doesn't work
> > > > with any version of ruby other than ruby 1.8.6-26. Is that true?
> > > > because I have version 1.8.6-p398.
>
> > > > Thanks
> > > > Preethi
>
> > > > On Jan 6, 12:41 pm, Dave McNulla <mcnu...@gmail.com> wrote:
>
> > > > > Do you have sample html code (from the web application under test)
> > > > > that people can try out? If you could please treat this like a bug
> > > > > report, you would be sure to put a way for everybody to reproduce the
> > > > > problem.
>
> > > > > You might also show the version of IE you are using.
>
> > > > > Thanks,
>
> > > > > Dave
>
> > > > > On Jan 5, 9:57 pm, Preethi <preethi.sivaku...@gmail.com> wrote:
>
> > > > > > Is this problem with Wait time which is less. I've searched 
> > > > > > everywhere
> > > > > > in the group for similar post and didn't find any.
> > > > > > Please help.
>
> > > > > > On Jan 6, 10:39 am, Preethi <preethi.sivaku...@gmail.com> wrote:
>
> > > > > > > Hello Watir Experts!
>
> > > > > > > I'm experincing some problems following solutions given 
> > > > > > > inhttp://wiki.openqa.org/display/WTR/JavaScript+Pop+Ups
>
> > > > > > > When i use Click => the code stops execution there
> > > > > > > So i usedClick_no_waitso that code proceeds further.
> > > > > > > But the problem here is that , When i useClick_no_waitmy browser
> > > > > > > doesn't show a popup at all and the startClicker method waits till
> > > > > > > wait time and produces exception
> > > > > > > I dont know where I'm wrong
> > > > > > > Please help me am struck.
>
> > > > > > > Below is code snippet
> > > > > > > ================
> > > > > > > buttonCreateSave.click_no_wait  #produces javascript alert box
> > > > > > > startClicker("OK",7,nil)
>
> > > > > > > my startClicker method is as follows
> > > > > > > ==========================
> > > > > > > def startClicker( button , waitTime= 9, user_input=nil )
> > > > > > >   hwnd = $ie.enabled_popup(waitTime)
> > > > > > >   if (hwnd)  # yes there is a popup
> > > > > > >     w = WinClicker.new
> > > > > > >     if ( user_input )
> > > > > > >       w.setTextValueForFileNameField( hwnd, "#{user_input}" )
> > > > > > >     end
> > > > > > >       w.clickWindowsButton_hwnd( hwnd, "#{button}" )
> > > > > > >       w=nil
> > > > > > >   end
> > > > > > > end- Hide quoted text -
>
> > > > > - Show quoted text -- Hide quoted text -
>
> > > > - Show quoted text -- Hide quoted text -
>
> > - Show quoted text -

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

Reply via email to