Hi,

 

The AutoIt code to check for the pop-up text is as follows:

 

Code courtesy: http://altentee.com/watir/

 

 


require 'watir'
require 'rubygems'
require 'win32ole'
autoit = WIN32OLE.new('AutoItX3.Control') 
@b.goto('http://justaddwatir.com/watir/test_html/tc_0101_0200/test_0107.html
')
@b.text_field(:name,"text1").set("This is the text in the popup")
@b.button(:name,"submit").click_no_wait
autoit.WinWaitActive("[Class:#32770]")
text = autoit.ControlGetText("[Class:#32770]", "", "Static2")
autoit.ControlClick("[Class:#32770]","","Button1")
puts text

 

 

 

Thanks,
Rohan Ojha
 Blue Star Infotech l*+91 900 4955058l * +91 22 6688 6969 l 6 +91 22 6688
6999 l *  <mailto:[email protected]> [email protected]
   <http://www.bsil.com/> www.bsil.com - Where Partnerships Are Built on
Trust 

 

 

  _____  

From: [email protected] [mailto:[email protected]]
On Behalf Of Pallavi Sharma
Sent: Wednesday, October 14, 2009 6:54 PM
To: [email protected]
Subject: [wtr-general] Re: Capturing Java Script Errors

 

Hi Jarmo

 

Can you share the code for the AutoIt if its not an issue. I would be
interested in something similar for our work.

 

 

On Fri, Oct 9, 2009 at 3:46 PM, Jarmo Pertman <[email protected]> wrote:


Hello.

We used AutoIt for opening the javascript error message window, then
make a screenshot of the error message itself and close the window,
not that IE js error messages would be useful on most of the times.
This is a little dirty hack, but it works for us sort of.

Jarmo


On Oct 9, 6:15 am, dt_nz <[email protected]> wrote:
> Hi
> I was hoping someone could point me in the right direction to get some
> help capturing java script errors.  We have a rather large number of
> tests that are executed during our regression run, and there can be a
> significant amount of page reloads etc that sometimes cause java
> script errors.  In the past we have simply turned java scripts off
> from popping up so our tests continue without stopping, and relied on
> manual testing to pick the errors up.
>
> Any help would be appreciated

 




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to [email protected]
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---

Reply via email to