Re: [Wtr-general] how to capture text from popup window

2007-04-26 Thread SHALINI GUPTA
hi, This is my entire code... please help!!! CODE::--- ## // ## ## Watir script ## ##// require

Re: [Wtr-general] how to capture text from popup window

2007-04-26 Thread SHALINI GUPTA
hi, thanks it works... regards shalini gupta On 4/26/07, SHALINI GUPTA <[EMAIL PROTECTED]> wrote: hi, i have made all the changes told by u.. as:- in my ruby file :- def start_jsalert_clicker Thread.new{ system("ruby \"c:\\PSC\\jscriptExtraAlert.rb\"") } end # read file con

Re: [Wtr-general] how to capture text from popup window

2007-04-26 Thread SHALINI GUPTA
hi, i have made all the changes told by u.. as:- in my ruby file :- def start_jsalert_clicker Thread.new{ system("ruby \"c:\\PSC\\jscriptExtraAlert.rb\"") } end # read file contents def read_js_popup_contents file = File.open("c:\\test.txt") lines = file.readline

Re: [Wtr-general] how to capture text from popup window

2007-04-26 Thread SHALINI GUPTA
HI, YES UR RIGHT THANKS!! REGARDS SHALINI GUPTA On 4/26/07, Angrez Singh <[EMAIL PROTECTED]> wrote: Hi, Few mistakes: 1. You are adding text to file called popup.txt and reading from test.txt def push_alert_button > @autoit.WinWait "Windows Internet Explorer", "" > text =

Re: [Wtr-general] how to capture text from popup window

2007-04-26 Thread Angrez Singh
Hi, Few mistakes: 1. You are adding text to file called popup.txt and reading from test.txt def push_alert_button @autoit.WinWait "Windows Internet Explorer", "" text = @autoit.WinGetText "Windows Internet Explorer" file = File.open("c:\\popup.txt", "w") file.

Re: [Wtr-general] how to capture text from popup window

2007-04-26 Thread SHALINI GUPTA
HI, POPUP DOENT CLICK NOTHING IN NOTEPAD. WINDOWHELPER.RB:-- class WindowHelper def initialize( ) @autoit = WIN32OLE.new('AutoItX3.Control') end def push_alert_button @autoit.WinWait "Windows Internet Explorer", "" text = @autoit.WinGetText "Windows Internet Explor

Re: [Wtr-general] how to capture text from popup window

2007-04-26 Thread Angrez Singh
Hi, Few more questions: 1. Did pop up gets clicked or not? 2. If notepad or wordpad opens what are its contents? 3. Can you post the code for modified WindowHelper.rb file? Regards, Angrez On 4/26/07, SHALINI GUPTA <[EMAIL PROTECTED]> wrote: HI, YES I HAVE MODIFIED THAT REGARDS SHALINI On 4

Re: [Wtr-general] how to capture text from popup window

2007-04-26 Thread SHALINI GUPTA
HI, YES I HAVE MODIFIED THAT REGARDS SHALINI On 4/26/07, Angrez Singh <[EMAIL PROTECTED]> wrote: Hi, Did you modified WindowHelper.rb file? You need to update push_alert_button method to log the text of pop up to file c:\test.txt. Regards, Angrez On 4/26/07, SHALINI GUPTA <[EMAIL PROTECTED]

Re: [Wtr-general] how to capture text from popup window

2007-04-26 Thread Angrez Singh
Hi, Did you modified WindowHelper.rb file? You need to update push_alert_button method to log the text of pop up to file c:\test.txt. Regards, Angrez On 4/26/07, SHALINI GUPTA <[EMAIL PROTECTED]> wrote: hi, i have used ur code as.. Yes note pad opens.. but nothing is gone in to this now im

Re: [Wtr-general] how to capture text from popup window

2007-04-26 Thread SHALINI GUPTA
hi, have i used correctly or not .. Regards Shalini gupta ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general

[Wtr-general] how to capture text from popup window

2007-04-26 Thread SHALINI GUPTA
hi, i have used ur code as.. Yes note pad opens.. but nothing is gone in to this now im getting these errors:- 1) Error: test_PSCLogin(TC_PSC_userlogin): EOFError: end of file reached pop_chk.rb:45:in `readline' pop_chk.rb:45:in `read_js_popup_contents' pop_chk.rb:100:in `test_PSCLogin'

Re: [Wtr-general] how to capture text from popup window

2007-04-26 Thread Angrez Singh
gt; From: SHALINI GUPTA <[EMAIL PROTECTED] > > > Date: Apr 26, 2007 1:05 PM > > Subject: Re: [Wtr-general] how to capture text from popup window > > To: wtr-general@rubyforge.org > > > > HI, > > No im not getting any exception,error.. > > but it be

Re: [Wtr-general] how to capture text from popup window

2007-04-26 Thread SHALINI GUPTA
: Apr 26, 2007 1:05 PM > Subject: Re: [Wtr-general] how to capture text from popup window > To: wtr-general@rubyforge.org > > HI, > No im not getting any exception,error.. > but it becomes silent ...like not doing any thing... > just command promt remains open.. > > nothi

Re: [Wtr-general] how to capture text from popup window

2007-04-26 Thread SHALINI GUPTA
HI, No im not getting any exception,error.. but it becomes silent ...like not doing any thing... just command promt remains open.. nothing happens.. regards shalini gupta On 4/26/07, Angrez Singh <[EMAIL PROTECTED]> wrote: Hi, Did you get any exceptions, errors etc while using the code I pro

Re: [Wtr-general] how to capture text from popup window

2007-04-26 Thread Angrez Singh
Hi, Did you get any exceptions, errors etc while using the code I provided? Regards, Angrez On 4/26/07, SHALINI GUPTA <[EMAIL PROTECTED]> wrote: hi, thanks!! i have just started using watir.I am very new to it. should i install autoit seperately...i think it is installed automatically with w

Re: [Wtr-general] how to capture text from popup window

2007-04-26 Thread SHALINI GUPTA
hi, thanks!! i have just started using watir.I am very new to it. should i install autoit seperately...i think it is installed automatically with watir.or ru talking about autoit tool.. Regards Shalini On 4/26/07, Angrez Singh <[EMAIL PROTECTED]> wrote: Hi, Simply saying its not working won'

Re: [Wtr-general] how to capture text from popup window

2007-04-26 Thread Angrez Singh
Hi, Simply saying its not working won't be of any help :). Did you get any errors, exceptions? Make sure that IE is in focus when you use the code. Is autoit installed properly? Same code works fine for me. I am able to get the text of Javascript pop up. Regards, Angrez On 4/26/07, SHALINI GUPT

Re: [Wtr-general] how to capture text from popup window

2007-04-26 Thread SHALINI GUPTA
hi, please help!! its very urgent Regards Shalini Gupta On 4/26/07, SHALINI GUPTA <[EMAIL PROTECTED]> wrote: HI, Sorry..its also not working. i have done all the things told by u.. but i think push_alert_button doesnt work. as i was using wincliker class to handle popup.. that time popup was

Re: [Wtr-general] how to capture text from popup window

2007-04-26 Thread SHALINI GUPTA
HI, Sorry..its also not working. i have done all the things told by u.. but i think push_alert_button doesnt work. as i was using wincliker class to handle popup.. that time popup was handled properly but now its not working.. my previous startClicker method is:- def startClicker( button , wait

Re: [Wtr-general] how to capture text from popup window

2007-04-25 Thread Angrez Singh
hi, this is simplest code that you can have: start_jsalert_clicker $ie.button(:name,[some_name]).click read_js_popup_contents # This only clicks ok button. Change teh path accordingly. def start_jsalert_clicker Thread.new{ system("rubyw \"d:\\installations\\ruby\\lib\\ruby\\gems\\1.8\\ge

Re: [Wtr-general] how to capture text from popup window

2007-04-25 Thread SHALINI GUPTA
hi, please some one reply.. its urgent.. Regards Shalini Gupta On 4/26/07, SHALINI GUPTA <[EMAIL PROTECTED]> wrote: Hi, my code is as... requires require 'watir' #require 'autoit' require 'test/unit' require 'test/unit/ui/console/testrunner' require 'test/unit/assertions' #require 'wa

[Wtr-general] how to capture text from popup window

2007-04-25 Thread SHALINI GUPTA
Hi, my code is as... requires require 'watir' #require 'autoit' require 'test/unit' require 'test/unit/ui/console/testrunner' require 'test/unit/assertions' #require 'watir/setFileDialog' #require 'popups_test' #require 'enabled_popup' #logger requires require 'example_logger1' require

Re: [Wtr-general] how to capture text from popup window

2007-04-25 Thread Angrez Singh
Hi Shalini, Can you post the entire code? How you are calling this text function? How you are handling the pop up? - Angrez On 4/26/07, SHALINI GUPTA <[EMAIL PROTECTED]> wrote: hi Prema, Sorry it not working.. It is printing 1 in text file. please help!! Regards Shalini Gupta On 4/25/07, P

Re: [Wtr-general] how to capture text from popup window

2007-04-25 Thread SHALINI GUPTA
hi Prema, Sorry it not working.. It is printing 1 in text file. please help!! Regards Shalini Gupta On 4/25/07, Prema Arya <[EMAIL PROTECTED]> wrote: Hi Shalini, Just try this code (modified your code a little) def text(wait_seconds = 1) # sleep 0.3 autoit = WIN32OLE.

Re: [Wtr-general] how to capture text from popup window

2007-04-25 Thread Prema Arya
Hi Shalini, Just try this code (modified your code a little) def text(wait_seconds = 1) # sleep 0.3 autoit = WIN32OLE.new("AutoItX3.Control") autoit.WinWait("Microsoft Internet Explorer", nil, wait_seconds) if wait_seconds s = autoit.WinGetText("Microso

Re: [Wtr-general] how to capture text from popup window

2007-04-25 Thread Prema Arya
Hi Shalini, Just try this code (modified your code a little) def text(wait_seconds = 1) # sleep 0.3 autoit = WIN32OLE.new("AutoItX3.Control") autoit.WinWait("Microsoft Internet Explorer", nil, wait_seconds) if wait_seconds s = autoit.WinGetText("Microso

Re: [Wtr-general] how to capture text from popup window

2007-04-24 Thread SHALINI GUPTA
hi, i have tried to write this as def text(wait_seconds = 1) # sleep 0.3 autoit = WIN32OLE.new("AutoItX3.Control") autoit.WinWait("Microsoft Internet Explorer", nil, wait_seconds) if wait_seconds s = autoit.WinGetText("Microsoft Internet Explorer")

Re: [Wtr-general] how to capture text from popup window

2007-04-24 Thread SHALINI GUPTA
hi, Thanks for quick reply... please tell me how can i write output of one method to a file my method is.. def text(wait_seconds = 1) # sleep 0.3 autoit.WinWait(WINDOW_TITLE, nil, wait_seconds) if wait_seconds s = autoit.WinGetText(WINDOW_TITLE) s

Re: [Wtr-general] how to capture text from popup window

2007-04-24 Thread Angrez Singh
Hi, As Paul said that you need to store the text in a file and then read that file in your main process. Because pop up's are handled in different process. So even if you return that value from the method it won't be visible to main process. Write this value to a file and then read the contents.

Re: [Wtr-general] how to capture text from popup window

2007-04-24 Thread SHALINI GUPTA
hi, thanks for reply!!! but i have used autoit and WinGet Text as:---(with no success) #- js_dialog.rb - require 'win32ole' require 'test/unit' require 'test/unit/ui/console/testrunner' # # Use AutoIt to read and close Javascript dialog windows # module JavascriptDialog # # Targ

Re: [Wtr-general] how to capture text from popup window

2007-04-24 Thread Paul Rogers
there is stuff in the winclicker to do it too. We've got the javascript pop up text back to the main app by saving it to a file Paul Hi, As far as I know, clicking some button on Pop up window happens in a different process (different from current process in which your script is running). Corre

Re: [Wtr-general] how to capture text from popup window

2007-04-24 Thread Angrez Singh
Hi, As far as I know, clicking some button on Pop up window happens in a different process (different from current process in which your script is running). Correct me if I am wrong here? You can get the text using AutoIt3 and WinGetText method. The only thing you need to find out is how you com

[Wtr-general] how to capture text from popup window

2007-04-24 Thread SHALINI GUPTA
HI List, Please help regarding popup. How to get the text of a popup window.. its very urgent please help. Regards Shalini gupta ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general