Hi Amitha,

This time you seemed to have used
ie.Button("value:=Submit").click
instead of
ie.Button("value:=Submit").click_without_blocking()

Thanks
Raghu


Amitha Shetty wrote:

> Hi Raghu,
>   Thanks for the help.
> But Watir hangs when I use win_label and display_text methods.
> I am using  0.5.3(latest)  version of WET and that has winobjects.
>  
> The following is my code:
>  
> require 'WET'
> include WET
>
> ie = nil
> ie = Browser("url:=LOGIN_URL <=LOGIN_URL>")
> sleep 2
> ie.Button("value:=Submit").click #Gives Alert window...
> dilg = ie.Dialog("title:=Microsoft Internet Explorer")
> lbl = dilg.win_label("index:=1")
> puts lbl.display_text
> It clicks on the button and alert window appears. But it hangs after that.
> I tried  include Wet::Winobjects.
> I tried with indexes 1,2,3,4.But even that didn't help
>  
>  
> Please help.
>  
> Thanks,
>  Amitha
> */Raghu Venkataramana <[EMAIL PROTECTED]>/* wrote:
>
>     Hi Amitha,
>
>     Assuming that you are using the latest version of WET (0.5.3), you
>     will
>     have wet-winobjects
>     installed on your machine. Using wet-winobjects, you will be able
>     to do
>     what you asked. For example,
>     in your case, you can do :
>
>     dlg = $ie.Dialog("title:=Microsoft Internet Explorer")
>     lbl = dlg.win_label("index:=1") # Pl. Try index of 2, 3 - one of
>     them works
>     puts lbl.display_text
>
>     will printout out
>     Do You really want to .... (The text that is displayed on the dialog)
>
>     The dlg.win_label above retrieves a handle to the first 'Static'
>     element
>     in the dialog window.
>     The display_text method of the win_label class gets the actual text
>     being displayed by the
>     label.
>
>     Hope this helps.
>
>     The wet-winobjects is a ruby gem including rdocs. The rdocs describes
>     all t! he wet-winboject
>     class API.
>
>     Cheers
>     Raghu
>
>
>     Amitha Shetty wrote:
>
>     > Hi,
>     > I am using WET to handle alert windows.I am able to dismiss the
>     > alert window by clicking on the ' OK' button using
>     > def_ok()
>     > $ie.Button("value:=Submit").click_without_blocking()
>     > $ie.Dialog("title:=Microsoft Internet
>     Explorer").Button("text:=OK").click
>     > end
>     > But I want to retrieve the text in the alert window and verify
>     if the
>     > right alert message is displayed.
>     > For Eg:An alert window saying 'Do You really want to do
>     this".How do I
>     > get the text? How can I use Label(*args) method to do this?
>     >
>     > Thanks,
>     > Amitha
>     >
>     >
>     ------------------------------------------------------------------------
>     > Enjoy this Diwali with Y! India Click here
>     >
>     >
>     >------------------------------------------------------------------------
>     >
>     >_______________________________________________
>     >Wtr-general mailing list
>     >[email protected]
>     >http://rubyforge.org/mailman/listinfo/wtr-general
>     >
>     >
>
>
>     -- 
>     Qantom Software
>
>     http://www.qantom.com
>     Ph : 91-80-26799269 Xtn. 125
>     sip : [EMAIL PROTECTED]
>     --
>
>     _______________________________________________
>     Wtr-general mailing list
>     [email protected]
>     http://rubyforge.org/mailman/listinfo/wtr-general
>
>
> ------------------------------------------------------------------------
> Enjoy this Diwali with Y! India Click here 
> <http://in.promos.yahoo.com/fabmall/index.html>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Wtr-general mailing list
>[email protected]
>http://rubyforge.org/mailman/listinfo/wtr-general
>  
>


-- 
Qantom Software

http://www.qantom.com
Ph : 91-80-26799269 Xtn. 125
sip : [EMAIL PROTECTED]
--

_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to