[wtr-general] Re: how to click the open button in a microsoft window

2009-12-08 Thread orde
Take a look at this page (especially the usage for example #2):
http://wiki.openqa.org/display/WTR/File+Downloads

Use the click_no_wait method on the link that triggers the popup.

Hope that helps.

orde





On Dec 8, 10:06 am, arihan sinha  wrote:
> Can you please try this below and let me know how i will proceed further
> after that .
>
> I need to click the cancel button or open button of that window.
>
> def test_powerpointslide
>         $ie = Watir::IE.new
>         $ie.set_fast_speed
>         $ie.goto("http://content.nejm.org/";)
>          $ie.link(:text, "Sign in").click
>          $ie.text_field(:name, "username").set("arihansinha")
>         $ie.text_field(:name, "code").set("hello123")
>         $ie.button(:name, "signin").click
>         $ie.link(:text, "PAST ISSUES").click
>
>         $ie.link(:text, "2008").click
>         $ie.link(:text, "Jan 3, Vol. 358, No. 1, 1 - 100").click
>
>         $ie.link(:text, "Full Text").click
>         $ie.link(:text, "PowerPoint Slide Set").click
>
>     end
>
> if you need to run this again and again then manually click the *sign out 
> *link
> and then *yes sign me out of the nejm button*.
>
> Thanks
>
> Arihan
>
> On Tue, Dec 8, 2009 at 5:05 PM, mohe  wrote:
> > Can you try this.?
>
> > save_dialog.WinWait("File Download","",40)
> > save_dialog.WinActivate("File Download")
> > save_dialog.Send("{TAB}") 'Use this if you need to tab.
> > save_dialog.Send("{Enter}")
>
> > On Dec 8, 10:37 am, arihan sinha  wrote:
> > > I've the watir version 1.6.2 and when i added the code snippet as
>
> > > prompt_message = "Do you want to open or save this file?"
> > > window_title = "File Download"
> > > save_dialog = WIN32OLE.new("AutoItX3.Control")
> > > sleep 1
> > > save_dialog_obtained =
> > > save_dialog.WinWaitActive(window_title,prompt_message, 25)
> > > save_dialog.ControlFocus(window_title, prompt_message, "&Save")
> > > sleep 1
> > > save_dialog.Send("S")
> > > save_dialog.ControlClick(window_title, prompt_message, "&Save")
>
> > > but its not working. it stuck on that file download window at the
> > begining.
> > > not moving further.. Anything i am missing??
>
> > > thanks
>
> > > Arihan
>
> > > On Tue, Dec 8, 2009 at 4:16 PM, Željko Filipin <
>
> > > zeljko.fili...@wa-research.ch> wrote:
> > > > On Tue, Dec 8, 2009 at 5:14 PM, arihan sinha <
> > arihan.si...@googlemail.com>
> > > > wrote:
> > > > > Then I think I've to install AutoIt ...rt?
>
> > > > Autoit is installed with Watir.
>
> > > > Željko
>
> > > >  --
> > > > 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-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

-- 
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


Re: [wtr-general] Re: how to click the open button in a microsoft window

2009-12-08 Thread arihan sinha
Can you please try this below and let me know how i will proceed further
after that .

I need to click the cancel button or open button of that window.


def test_powerpointslide
$ie = Watir::IE.new
$ie.set_fast_speed
$ie.goto("http://content.nejm.org/";)
 $ie.link(:text, "Sign in").click
 $ie.text_field(:name, "username").set("arihansinha")
$ie.text_field(:name, "code").set("hello123")
$ie.button(:name, "signin").click
$ie.link(:text, "PAST ISSUES").click

$ie.link(:text, "2008").click
$ie.link(:text, "Jan 3, Vol. 358, No. 1, 1 - 100").click

$ie.link(:text, "Full Text").click
$ie.link(:text, "PowerPoint Slide Set").click


end

if you need to run this again and again then manually click the *sign out *link
and then *yes sign me out of the nejm button*.

Thanks

Arihan

On Tue, Dec 8, 2009 at 5:05 PM, mohe  wrote:

> Can you try this.?
>
> save_dialog.WinWait("File Download","",40)
> save_dialog.WinActivate("File Download")
> save_dialog.Send("{TAB}") 'Use this if you need to tab.
> save_dialog.Send("{Enter}")
>
> On Dec 8, 10:37 am, arihan sinha  wrote:
> > I've the watir version 1.6.2 and when i added the code snippet as
> >
> > prompt_message = "Do you want to open or save this file?"
> > window_title = "File Download"
> > save_dialog = WIN32OLE.new("AutoItX3.Control")
> > sleep 1
> > save_dialog_obtained =
> > save_dialog.WinWaitActive(window_title,prompt_message, 25)
> > save_dialog.ControlFocus(window_title, prompt_message, "&Save")
> > sleep 1
> > save_dialog.Send("S")
> > save_dialog.ControlClick(window_title, prompt_message, "&Save")
> >
> > but its not working. it stuck on that file download window at the
> begining.
> > not moving further.. Anything i am missing??
> >
> > thanks
> >
> > Arihan
> >
> > On Tue, Dec 8, 2009 at 4:16 PM, Željko Filipin <
> >
> >
> >
> > zeljko.fili...@wa-research.ch> wrote:
> > > On Tue, Dec 8, 2009 at 5:14 PM, arihan sinha <
> arihan.si...@googlemail.com>
> > > wrote:
> > > > Then I think I've to install AutoIt ...rt?
> >
> > > Autoit is installed with Watir.
> >
> > > Željko
> >
> > >  --
> > > 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- 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
>

-- 
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

[wtr-general] Re: how to click the open button in a microsoft window

2009-12-08 Thread mohe
Can you try this.?

save_dialog.WinWait("File Download","",40)
save_dialog.WinActivate("File Download")
save_dialog.Send("{TAB}") 'Use this if you need to tab.
save_dialog.Send("{Enter}")

On Dec 8, 10:37 am, arihan sinha  wrote:
> I've the watir version 1.6.2 and when i added the code snippet as
>
> prompt_message = "Do you want to open or save this file?"
> window_title = "File Download"
> save_dialog = WIN32OLE.new("AutoItX3.Control")
> sleep 1
> save_dialog_obtained =
> save_dialog.WinWaitActive(window_title,prompt_message, 25)
> save_dialog.ControlFocus(window_title, prompt_message, "&Save")
> sleep 1
> save_dialog.Send("S")
> save_dialog.ControlClick(window_title, prompt_message, "&Save")
>
> but its not working. it stuck on that file download window at the begining.
> not moving further.. Anything i am missing??
>
> thanks
>
> Arihan
>
> On Tue, Dec 8, 2009 at 4:16 PM, Željko Filipin <
>
>
>
> zeljko.fili...@wa-research.ch> wrote:
> > On Tue, Dec 8, 2009 at 5:14 PM, arihan sinha 
> > wrote:
> > > Then I think I've to install AutoIt ...rt?
>
> > Autoit is installed with Watir.
>
> > Željko
>
> >  --
> > 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- 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