For IE already raised a post. check this "Unable to Maximize the IE 8, Received error while executing the script" So i shifted to Firefox but still i need that solution as i am planning for a framework . I need that. Earlier version of watir was working fine. But not in this. May be my environment issue. but i was unable to figure it out. Any how i need the solution. Let me know.
On Jul 8, 5:37 pm, Amit Bobade <amit.sr...@gmail.com> wrote: > Hi, > > To maximize the IE browser, try this: > > require 'rubygems' > require 'Watir' > > ie = Watir::IE.new > ie.goto("http://www.google.com") > ie.maximize > > For other browsers, I am trying to find out the solutions. > > Thanks, > -Amit > > > > On Fri, Jul 8, 2011 at 5:24 PM, Aditya <vaditya2...@gmail.com> wrote: > > Thanks for the information. But what about the rest i asked for? How can i > > maximize the browser and the rest? > > > And Also i want to pass the browser as a parameter and at run i can > > verify for IE,Firefox and safari. So i planned. I worked on this > > earlier but now the solution is specific to fire fox. if you change ie > > in that you still see the firefox opening rather ie. So i need this. > > help me in this as well. > > > On Fri, Jul 8, 2011 at 11:00 AM, Amit Bobade <amit.sr...@gmail.com> wrote: > > >> hi, > > >> >browser = Watir::Browser.new :ff -> Why do we need to have FF here? > > >> You can have :chrome and : ie also. > > >> Thanks, > >> -Amit > > >> On Thu, Jul 7, 2011 at 7:43 PM, V <vaditya2...@gmail.com> wrote: > > >>> How do i maximize the FF window? > > >>> I need to replace the browser every time i execute. How? > > >>> browser = Watir::Browser.new :ff -> Why do we need to have FF here? > > >>> On Jul 7, 6:58 pm, V <vaditya2...@gmail.com> wrote: > >>> > Changed as > >>> > require "rubygems" > >>> > require 'watir' > >>> > require 'watir-webdriver' > > >>> > def defaultbrowser(br) > >>> > #~ require 'watir-webdriver' > >>> > Watir::Browser.default=br > >>> > puts "Default Browser:" +Watir::Browser.default > >>> > end > > >>> > def setdefaultbrowser(br) > > >>> > br=Watir::Browser.new > > >>> > end > > >>> > br= 'ie' #'safari', 'firefox', or 'ie' > >>> > #URL= > >>> > #~ defaultbrowser(br) > >>> > setdefaultbrowser(br) > > >>> > is occuring the following error > >>> > C:/Ruby187/lib/ruby/gems/1.8/gems/watir-webdriver-0.2.5/lib/watir- > >>> > webdriver/version.rb:2: warning: already initialized constant VERSION > >>> > C:/Ruby187/lib/ruby/gems/1.8/gems/watir-webdriver-0.2.5/lib/watir- > >>> > webdriver/exception.rb:8: superclass mismatch for class > >>> > UnknownObjectException (TypeError) > >>> > from > >>> C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: > >>> > 36:in `gem_original_require' > >>> > from > >>> C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: > >>> > 36:in `require' > >>> > from > >>> C:/Ruby187/lib/ruby/gems/1.8/gems/watir-webdriver-0.2.5/lib/ > >>> > watir-webdriver.rb:7 > >>> > from > >>> C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: > >>> > 59:in `gem_original_require' > >>> > from > >>> C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: > >>> > 59:in `require' > > >>> > Removed Watir > >>> > require "rubygems" > >>> > #require 'watir' > >>> > require 'watir-webdriver' > > >>> > def defaultbrowser(br) > >>> > #~ require 'watir-webdriver' > >>> > Watir::Browser.default=br > >>> > puts "Default Browser:" +Watir::Browser.default > >>> > end > > >>> > def setdefaultbrowser(br) > > >>> > br=Watir::Browser.new > > >>> > end > > >>> > br= 'ie' #'safari', 'firefox', or 'ie' > >>> > #URL= > >>> > #~ defaultbrowser(br) > >>> > setdefaultbrowser(br) > > >>> > Executed ... Thanks But i need to replace the browser every time i > >>> > execute. How? > > >>> > browser = Watir::Browser.new :ff -> Why do we need to have FF here? > > >>> > On Jul 7, 6:51 pm, Željko Filipin <zeljko.fili...@wa-research.ch> > >>> > wrote: > > >>> > > On Thu, Jul 7, 2011 at 3:20 PM, V <vaditya2...@gmail.com> wrote: > >>> > > > exceptions.rb:12: superclass mismatch for class > >>> UnknownObjectException > >>> > > > (TypeError) > > >>> > > You require both watir and watir-webdriver in your script. Require > >>> only > >>> > > watir-webdriver. > > >>> > > Željko > > >>> -- > >>> Before posting, please readhttp://watir.com/support. In short: search > >>> before you ask, be nice. > > >>> watir-general@googlegroups.com > >>>http://groups.google.com/group/watir-general > >>> watir-general+unsubscr...@googlegroups.com<http://groups.google.com/group/watir-generalwatir-general+unsubscribe...> > > >> -- > >> Thanks and Regards, > >> Amit > > >> -- > >> Before posting, please readhttp://watir.com/support. In short: search > >> before you ask, be nice. > > >> watir-general@googlegroups.com > >>http://groups.google.com/group/watir-general > >> watir-general+unsubscr...@googlegroups.com > > > -- > > Before posting, please readhttp://watir.com/support. In short: search > > before you ask, be nice. > > > watir-general@googlegroups.com > >http://groups.google.com/group/watir-general > > watir-general+unsubscr...@googlegroups.com > > -- > Thanks and Regards, > Amit -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com