You can get the text of the window using AutoIt, in javascript popups the
text is usually in the first or second static text control:
oPopup = Watir::autoit
# Change into the WinTitleMatchMode that supports classnames and
handles
oPopup.AutoItSetOption("WinTitleMatchMode", 4)
0.upto(timeout) { |i|
ret = oPopup.WinWait("Window Title","",1)
win_text = oPopup.WinGetText("Window Title")
if 1 == ret && !(win_text == '') then
bPopupFound = true
oPopup.WinActivate("Window Title",'')
win_text = oPopup.ControlGetText(what, '',
'Static2').strip
if '' == win_text then win_text =
oPopup.ControlGetText(what,
'', 'Static1').strip end
break
end
Change Window Title to match what you're looking for, js popups can be found
by classname as well: 'classname=#32770' instead of title.
-Charley
On 4/23/07, SHALINI GUPTA <[EMAIL PROTECTED]> wrote:
Hi Ajitesh,
I am Shalini gupta.Hope u'll be fine.I am also working on watir.I have
problem with java popups.i am able to handle that.but how to get text on
popup i dont know.please help me regarding this.Thanks in Advance.
Regards and Thanks
Shalini Gupta
On 4/23/07, Ajitesh Srinetra <[EMAIL PROTECTED] > wrote:
>
> Adding
>
> require 'test/unit/assertions'
> include Test::Unit::Assertions
>
> will help.A lot of examples for assertions is provided in unit tests
> examples .Please follow them in your testcases
>
> Ajitesh
>
>
>
> _______________________________________________
> Wtr-general mailing list
> [email protected]
> http://rubyforge.org/mailman/listinfo/wtr-general
>
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general