Re: [Wtr-general] NoMethodError: undefined method `assert_equal'
hi, I have used this as... $oPopup=Watir::autoit $oPopup.AutoItSetOption("WinTitleMatchMode", 4) 0.upto(timeout) |i| ret = $oPopup.WinWait("Microsoft Internet Explorer","",1) win_text = $oPopup.WinGetText("Microsoft Internet Explorer") if 1 == ret && !(win_text == '') then bPopupFound = true $oPopup.WinActivate("Microsoft Internet Explorer",'') win_text = $oPopup.ControlGetText(what, '', 'Static2').strip puts win_text.to_s if '' == win_text then win_text = $oPopup.ControlGetText(what, '', 'Static1').strip end break end but its is giving error:-- ruby exetry.rb c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- autoit (LoadError) from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' from exetry.rb:12 Exit code: 1 tell me for this is autoit is required i have installed that in my PC... but still it is giving that error.. when i made 'oPopup' object of WIN32OLE AS: oPopup=WIN32OLE.new("AutoItX3.Control") It was not giving that error.. that it is giving this error:- exetry.rb:139: syntax error, unexpected kEND, expecting '}' when i remove '{' this it is giving this error:- test_PSCLogin(TC_PSC_userlogin): ArgumentError: wrong number of arguments (0 for 1) exetry.rb:93:in `timeout' exetry.rb:93:in `test_PSCLogin' please help me regarding this..its very urgent.. Thanks In advance.. Regards Shalini Gupta On 4/24/07, Charley Baker <[EMAIL PROTECTED]> wrote: 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 > > Wtr-general@rubyforge.org > > http://rubyforge.org/mailman/listinfo/wtr-general > > > > > ___ > Wtr-general mailing list > Wtr-general@rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] NoMethodError: undefined method `assert_equal'
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 > Wtr-general@rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] NoMethodError: undefined method `assert_equal'
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 Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] NoMethodError: undefined method `assert_equal'
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 Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] NoMethodError: undefined method `assert_equal' for #
Hi Vamsi, Adding require 'test/unit/assertions' include Test::Unit::Assertions to the top of your script should help. Zeljko -- ZeljkoFilipin.com ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
[Wtr-general] NoMethodError: undefined method `assert_equal' for #
Hi, could anyone help me to resolve this error: NoMethodError: undefined method `assert_equal' for # Thanks in Advance. Regards Vamsi ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general