I am trying to resize my IE browser using watir classic. Is there a method to
do that? Currently, the code that I have incorporated into my framework works
for FF and Chrome. Does watir-classic support resizing of IE browsers?
def init_browser
if (ENV["BROWSERWIDTH"].nil? || ENV["BROWSERWIDTH"].empty? ||
ENV["BROWSER"] == "IE" || ENV["BROWSER"] == "ipad" || ENV["BROWSER"] ==
"iphone")
if (ENV["BROWSER"] == "IE" || ENV["BROWSER"] == "ipad" ||
ENV["BROWSER"] == "iphone") && (!ENV["BROWSERWIDTH"].nil? ||
!ENV["BROWSERWIDTH"].empty?)
@logger.info "Resizing of browsers is not supported on iOS Simulator,
IE "
end
@browser = get_browser.__start(@debug_mode)
add_page_checkers
else
@browser = get_browser.__start(@debug_mode)
if ENV["BROWSERHEIGHT"].nil? || ENV["BROWSERHEIGHT"].empty?
width = ENV["BROWSERWIDTH"].to_i
@browser.window.resize_to(width,1024)
@logger.info "Browser height has not been specified. Using default
height:1024.\nYour browser has been resized to width:#{width} height:1024"
else
width = ENV["BROWSERWIDTH"].to_i
height = ENV["BROWSERHEIGHT"].to_i
@browser.window.resize_to(width,height)
@logger.info "Your browser has been resized to width:#{width}
height:#{height}"
end
add_page_checkers
end
end
def activate_ie
unless RUBY_PLATFORM =~ /win32|mingw/
raise "This platform is not supported (#{PLATFORM})"
end
@logger.step('Launching INTERNET EXPLORER...')
require 'watir-classic'
ie = Watir::IE
require 'common/assertions'
require 'core/browser_overrides/common_browser_overrides'
require 'core/browser_overrides/ie.rb'
return ie
end
class IE
def self.__start(debug_mode=false)
Watir::Browser.new(:ie)
end
end
Any help is appreciated.
---
Reply to this email directly or view it on GitHub:
https://github.com/watir/watir-classic/issues/54
_______________________________________________
Wtr-development mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-development