I have a popup titled simply "Internet Explorer" containing the text: "When you 
send information to the Internet, it might be possible for others to see that 
information. Do you want to continue?" There are two buttons, labeled "Yes" and 
"No".

I am unable to attach to this like so: ie2 = Watir::IE.attach(:title, ‘Internet 
ExplorerÂ’), or by doing: ie2 = Watir::IE.attach(:title, /Internet/). This made 
me suspect this was a modal dialog (besides the fact that it acts like one 
functionally.)

This pops up, by the way, when I execute the script googleSearch.rb (you know, 
the pickaxe script referenced in the Watir user guide.) It happens after the 
script sends the click to the Google Search button.

So...I uninstalled Watir 1.4.1, downloaded the current 1.5 gem (currently 
watir-1.5.1.1065.gem) and installed the gem. So far so good. This was to gain 
modal dialog processing functionality.

I then inserted this statement: ie.modal_dialog.button(:text, "Yes").click
immediately after these 3 lines in the script:
=>puts "Step 3: click the 'Google Search' button"
=>ie.button(:name, "btnG").click   # "btnG" is the name of the Search button
=>puts "  Action: clicked the Google Search button."

No good. After step 2 completes (pickaxe loaded into google search field) I see:
"Step 3: click the 'Google Search' button
  Action: clicked the Google Search button.
Modal Dialog not found. Timeout = 2.0
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1065/./watir.rb:2606:in `locate'
Press ENTER to close the window..."

Now, my BELIEF is that the reason this occurs is that this dialog popup is not 
launched by Javascript from the current IE session -- but rather is triggered 
by IE security. Which since I am testing a corporate browser I cannot alter. So 
-- has anyone dealt with this before? I haven't seen any postings in this forum 
or elsewhere on the web about dealing with Browser security generated 
dialogs....

Has anyone dealt with this standard security modal dialog before? If so, what 
should I add to that simple googleSearch.rb to get past it automatically?
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=4012&messageID=11008#11008
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to