Reputation: 71
I am automating my tests using cucumber and I have a requirement to automate the behavior of our nav bar within our mobile pages as these menu options are displayed based on screen size...for example:
480px has menu a, menu b, menu c, and menu d.
320px has menu a, menu c, and menu d.
My queston is, is this possible to automate? If so has anyone got any ideas?
Thanks in advance, Ian
Upvotes: 1
Views: 1845
Reputation: 38418
I stuck this in one of my step definitions and it worked:
if Capybara.current_driver == :selenium
window = Capybara.current_session.driver.browser.manage.window
window.resize_to(1200, 800)
end
I'm using Cucumber with Capybara.
Upvotes: 2
Reputation: 11076
Two possible options:
Upvotes: 0