[wtr-general] Re: Error in handling popup

2009-04-14 Thread spike
sir, I used the method you suggested but, it is not working i've to click the popup button manually to go further testing the application. I'm putting the code i'm using for the handling popup below, please suggest me corrections that are to be made require 'Watir' require 'test/unit' require

[wtr-general] Re: Error in handling popup

2009-04-09 Thread kiran yajamanyam
Now I got the problem you are facing. I think in your code u would have used click() method just before the code to handle popup. If this is the case , script would not be coming out of click() method and go to next step. This happens in a case when when used click method and if a popup appears

[wtr-general] Re: Error in handling popup

2009-04-09 Thread spike
sorry to tel u it isnt working, ie.button(:id, ctl00_ContentPlaceHolder1_btnNext).click ie.file_field(:id, ctl00_ContentPlaceHolder1_Uploadfile).set(D:\ \BCSBI.zip) ie.file_field(:id, ctl00_ContentPlaceHolder1_btnUpload).click #this is the button when clicked popup appears. # For handling popups

[wtr-general] Re: Error in handling popup

2009-04-09 Thread Jim Matthews
spike, There is a problem with the new version of Ruby that may be contributing to your problem. I don't use autoit, I use method that Lisa described. For more information on the problem, see:

[wtr-general] Re: Error in handling popup

2009-04-09 Thread Chuck van der Linden
I many cases, the most important thing to understand when dealing with popups is to know what KIND of popup you are seeing. The tutorial for Watir covers most of the common kinds of popups, and gives some suggestions of potential ways to deal with each of them. Even if you've been through it

[wtr-general] Re: Error in handling popup

2009-04-09 Thread Anu Gangavaram
Since you are able to run the script, after clicking on the button manually, it could be a timing issue. you might want to check that as well. On Thu, Apr 9, 2009 at 2:26 PM, Chuck van der Linden sqa...@gmail.comwrote: I many cases, the most important thing to understand when dealing with

[wtr-general] Re: Error in handling popup

2009-04-08 Thread George
I grabbed this code from somebody here...this may work (you'll need to install AutoIt): # Create a file clicker.rb require 'win32ole' begin autoit = WIN32OLE.new('AutoItX3.Control') loop do autoit.ControlClick(Windows Internet Explorer, '', 'OK') autoit.ControlClick(Security

[wtr-general] Re: Error in handling popup

2009-04-08 Thread Lisa Crispin
We seem to do just this. I haven't looked at it in awhile so I'm not sure if this is everything. This is in a module. require 'watir\ie' require 'watir\contrib\enabled_popup' # Main method to click a modal dialog button. def click_modal_button(ie, type='OK', sleep_time=6, timeout=20)

[wtr-general] Re: Error in handling popup

2009-04-08 Thread spike
Thanks sir, the error which i was getting was removed but the script does not handle popups, so please suggest me a script for handling popups. On Apr 8, 8:03 pm, Jim Matthews jim_m...@swbell.net wrote: spike, The only thing I see right off is that you have: wsh

[wtr-general] Re: Error in handling popup

2009-04-08 Thread spike
Hi Thnaks for the reply but it isnt working for me. On Apr 8, 9:24 pm, George george.sand...@gmail.com wrote: I grabbed this code from somebody here...this may work (you'll need to install AutoIt): # Create a file clicker.rb require 'win32ole' begin   autoit =

[wtr-general] Re: Error in handling popup

2009-04-08 Thread kiran yajamanyam
hi, handle the popup window using autoit. install autoit software. and use the followinf code autoit = WIN32OLE.new('AutoItX3.Control') Opt(WinTitleMatchMode, 3) autoit.WinWait('Windows Internet Explorer', '', 2) autoit.WinActivate('Windows Internet Explorer') autoit.Send('{enter}') This

[wtr-general] Re: Error in handling popup

2009-04-08 Thread spike
Hi thanks for the reply, i've installed autoIT-v3 software but its not working. On Apr 9, 8:40 am, kiran yajamanyam kiranyajaman...@gmail.com wrote: hi, handle the popup window using autoit. install autoit software. and use the followinf code autoit = WIN32OLE.new('AutoItX3.Control')    

[wtr-general] Re: Error in handling popup

2009-04-08 Thread spike
I used this code but i'm getting the following error 1) Error: test_manage_resources(Manageresources): NoMethodError: undefined method `Opt' for #Manageresources:0x2b697c8 manageresource.rb:25:in `test_manage_resources' so please suggest some solution... On Apr 9, 8:40 am, kiran yajamanyam

[wtr-general] Re: Error in handling popup

2009-04-08 Thread kiran yajamanyam
missed this piece of code require 'win32ole' still if it wont work just comment out Opt(WinTitleMatchMode, 3) code and try. If still it wont work please send me the scenario u are testing i will try and give u the code. Regards, Kiran Y On Thu, Apr 9, 2009 at 9:26 AM, spike

[wtr-general] Re: Error in handling popup

2009-04-08 Thread spike
Ya it still didnt work for me Test Scenario I'm running on windows platform with IE7 I've to upload a file to the application i'm testing. to do that i'm login to the application and navigating to the respective page where i've to upload the file. I'm able to upload the file, upon successfully

[wtr-general] Re: Error in handling popup

2009-04-08 Thread kiran yajamanyam
You have to give the exact caption of the window which is appearing as popup. In your case that caption of the pop up is FILE UPLOADED SUCCESSFULLY try this code: autoit = WIN32OLE.new('AutoItX3.Control') Opt(WinTitleMatchMode, 3) autoit.WinWait('FILE UPLOADED SUCCESSFULLY', '', 2)

[wtr-general] Re: Error in handling popup

2009-04-08 Thread spike
if i'm clicking the OK button manually its going further to do rest of the operations or els its hung with the popup On Apr 9, 10:38 am, kiran yajamanyam kiranyajaman...@gmail.com wrote: You have to give the exact caption of the window which is appearing as popup. In your case that caption of

[wtr-general] Re: Error in handling popup

2009-04-08 Thread kiran yajamanyam
make sure that ur caption is same (Including caps) and if autoit.Send({'enter'}) is not working try with autoit.Send({'space'}) On Thu, Apr 9, 2009 at 11:10 AM, spike vinaykumarl...@gmail.com wrote: if i'm clicking the OK button manually its going further to do rest of the operations or els

[wtr-general] Re: Error in handling popup

2009-04-08 Thread spike
i didnt get u the popup window title is Windows Internet Explorer and the msg displayed in it is File Uploaded Successfully which one should i use inthe code.. On Apr 9, 10:38 am, kiran yajamanyam kiranyajaman...@gmail.com wrote: You have to give the exact caption of the window which is

[wtr-general] Re: Error in handling popup

2009-04-08 Thread spike
sorry chat is disabled in my company... On Apr 9, 10:38 am, kiran yajamanyam kiranyajaman...@gmail.com wrote: You have to give the exact caption of the window which is appearing as popup. In your case that caption of the pop up is FILE UPLOADED SUCCESSFULLY try this code: autoit =

[wtr-general] Re: Error in handling popup

2009-04-08 Thread kiran yajamanyam
You should use the caption only. Means Windows Internet Explorer only. Use space than enter On Thu, Apr 9, 2009 at 11:16 AM, spike vinaykumarl...@gmail.com wrote: i didnt get u the popup window title is Windows Internet Explorer and the msg displayed in it is File Uploaded Successfully

[wtr-general] Re: Error in handling popup

2009-04-08 Thread spike
use space i didnt get this..one On Apr 9, 10:48 am, kiran yajamanyam kiranyajaman...@gmail.com wrote: You should use the caption only. Means Windows Internet Explorer only. Use space than enter On Thu, Apr 9, 2009 at 11:16 AM, spike vinaykumarl...@gmail.com wrote: i didnt get u the

[wtr-general] Re: Error in handling popup

2009-04-08 Thread spike
Sorry sir even it is not working i've to click it manually to go further in my test. wat about this autoit i've installed autoit-v3 how is it related to watir..? On Apr 9, 10:43 am, kiran yajamanyam kiranyajaman...@gmail.com wrote: make sure that ur caption is same (Including caps) and if