Selenium RC-windowMaximize

N

Niranjan Nir

Hi all,

I am using selenium Rc with Ruby, i need to maximize the browser window.
I have tried the selenium method- Windowmaximize, but it is not working.
Also, i have to take the screenshots of the falied steps, can anyone
tell me what is the method or tool that can be used with ruby + selenium
RC.

Thanks in advance.

regards
Niranjan
 
A

Anton Shchankin

Hi. I am using selenium-rc 1.0.3 with ruby through selenium-client
1.2.18 gem (+ cucumber :)).
window_maximize (Selenium::Client::GeneratedDriver) works fine.

def initialize(args={})
args = {
:host => "host.com", :port => 4444,
:browser => "*chrome", :branch => "trunk"
}.merge args

@sel = Selenium::Client::Driver.new \
:host => args[:host],
:port => args[:port],
:browser => args[:browser],
:url => "http://#{args[:branch]}",
:timeout_in_second => 60,
:javascript_framework => :prototype
@sel.start_new_browser_session
@sel.window_maximize
end

Also Selenium::Client::GeneratedDriver contain methods for capturing
screens.
 
N

Niranjan Nir

Thanks a lot Anton....
Window_maximize works well with selenium::seleniumDriver
But the Capture_ScreenShot doesnt work with this driver.

I need to intall the selenium-client gem to work with Selenium::Client
driver.

regards
Niranjan

Anton Shchankin wrote in post #960080:
Hi. I am using selenium-rc 1.0.3 with ruby through selenium-client
1.2.18 gem (+ cucumber :)).
window_maximize (Selenium::Client::GeneratedDriver) works fine.

def initialize(args={})
args = {
:host => "host.com", :port => 4444,
:browser => "*chrome", :branch => "trunk"
}.merge args

@sel = Selenium::Client::Driver.new \
:host => args[:host],
:port => args[:port],
:browser => args[:browser],
:url => "http://#{args[:branch]}",
:timeout_in_second => 60,
:javascript_framework => :prototype
@sel.start_new_browser_session
@sel.window_maximize
end

Also Selenium::Client::GeneratedDriver contain methods for capturing
screens.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top