Skip to content
This repository has been archived by the owner on Mar 3, 2020. It is now read-only.

Unable to maximize the window #1078

Open
sureshpathipati opened this issue Dec 13, 2018 · 3 comments
Open

Unable to maximize the window #1078

sureshpathipati opened this issue Dec 13, 2018 · 3 comments

Comments

@sureshpathipati
Copy link

Currently I am unable to maximize the window. I tried maximum functions(resize_window, Capybara.current_window.maximize, execute_script("window.resizeTo(1024, screen.height)")) to maximize the window with no luck.

Gem version
'capybara-webkit', '~> 1.15.1'

@twalpole
Copy link
Collaborator

What do you think maximize means in a fully headless browser?

@sureshpathipati
Copy link
Author

maximize generally expands the browser to the resolution available. But I don't know if it works same for webkit.

@sureshpathipati
Copy link
Author

sureshpathipati commented Dec 18, 2018

Some how the following snippet worked for me

Before do |scenario|
  #<code>
  Capybara.page.current_window.resize_to(1600, 1600)
end

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants