[wtr-general] Re: enabled_popup internal error

2009-03-05 Thread andrew . dahl
See this http://www.codeguru.com/forum/archive/index.php/t-359958.html GW_ENABLEDPOPUP only works on xp/2000. It also suggests an alternative. Helpful? On Mar 5, 11:39 am, andrew.d...@lthree.com wrote: > Just no luck. Still not seeing any popup. > >    roles_page.bottom_delete.click_no_wait    #

[wtr-general] Re: enabled_popup internal error

2009-03-05 Thread andrew . dahl
Just no luck. Still not seeing any popup. roles_page.bottom_delete.click_no_wait# <= no popup displayed but if I use roles_page.bottom_delete.click #<=== popup comes right up On Mar 5, 10:17 am, Jim Matthews wrote: > One thing I forgot to mention: someone else got cli

[wtr-general] Re: enabled_popup internal error

2009-03-05 Thread Jim Matthews
One thing I forgot to mention: someone else got click_no_wait to work by going into IE ->Tools -> Internet Options...->Advanced and under Security, check the box titled "Allow active content to run in files on My Computer". Jim On Mar 5, 9:32 am, Jim Matthews wrote: > Glad to know that helped.

[wtr-general] Re: enabled_popup internal error

2009-03-05 Thread Jim Matthews
Glad to know that helped. Now you are at the point I am at. There are several of us working to see if we can resolve the problem. It appears that the same Ruby / Watir combination works for some people and does not work for others as far as handling the javascript popups. Because of this, we t

[wtr-general] Re: enabled_popup internal error

2009-03-05 Thread andrew . dahl
That got me further. Now I have a question about click_no_wait. When I use just 'click', I get a popup with an OK and Cancel button. When I use click_no_wait, I am now not getting any popup. If I use sleep right after click_no_wait, does the browser keep going so I would expect to see a popup? A

[wtr-general] Re: enabled_popup internal error

2009-03-04 Thread Jim Matthews
OK, too bad you did not include this originally. I think I know what the problem is. At least I see something that is a problem. You have: hwnd = page_container.enabled_popup(waitTime) hwnd belongs to the browser, not the page, so you have to reference the borwser object like: hwnd = $ie.ena

[wtr-general] Re: enabled_popup internal error

2009-03-04 Thread andrew . dahl
Here is the code def startClicker( page_container, button , waitTime= 9, user_input=nil ) # get a handle if one exists hwnd = page_container.enabled_popup(waitTime) if (hwnd) # yes there is a popup puts 'popup found' w = WinClicker.new w.makeWindowActive(hwnd) if ( user_in

[wtr-general] Re: enabled_popup internal error

2009-03-04 Thread Jim Matthews
OK, I looked at example 4. I noticed that the example incorrectly says require 'Watir' instead of require 'watir' (the W should be lowercase). and I assume that you did the : require 'watir/contrib/enabled_popup' and I assume you have done some sort of attach of "browser" that connects it to a

[wtr-general] Re: enabled_popup internal error

2009-03-04 Thread andrew . dahl
I was basing my code on example 4. Use click_no_wait on a button I know will cause a popup, and then call enabled_popup. The call from enabled_popup never returns. I can post the entire exception trace if that helps. On Mar 4, 8:26 am, Jim Matthews wrote: > From your first post, I am not sure ho

[wtr-general] Re: enabled_popup internal error

2009-03-04 Thread Jim Matthews
>From your first post, I am not sure how you are trying to use ie.enabled_popup. I assume you are trying to something like what is described on the wiki: http://wiki.openqa.org/display/WTR/JavaScript+Pop+Ups I do not know which example you are following. If you take this one for example, requ

[wtr-general] Re: enabled_popup internal error

2009-03-04 Thread andrew . dahl
Its not my code that is throwing the error. Here is the code for enabled popup from my watir install. The line generating the error is hwnd_modal, arr = GetWindow.call(hwnd, GW_ENABLEDPOPUP) - hwnd is undefined. module Watir module PageContainer include Win32 def enabled_popup(timeout=4

[wtr-general] Re: enabled_popup internal error

2009-03-03 Thread Jim Matthews
I thought you were having the same problem I am with popups, but I think yours is different at this point. The window handle is going to be on the browser and not a part of the DOM. You have to get the hwnd off the browser and go from there. Jim On Mar 3, 1:16 pm, andrew.d...@lthree.com wrote: