Created
November 24, 2017 17:48
-
-
Save twalpole/ec7dafc36f0654931aa8e78b066d56b9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "capybara/dsl" | |
html = DATA.read | |
app = proc { |env| [200, { "Content-Type" => "text/html" }, [html] ] } | |
sess = Capybara::Session.new(:selenium_chrome, app) | |
sess.visit("/") | |
sess.current_window.resize_to(400,300) | |
sleep 3 | |
sess.current_window.resize_to(1024, 768) | |
sleep 3 | |
sess.current_window.resize_to(400, 300) | |
sleep 3 | |
sess.current_window.resize_to(1024, 768) | |
sleep 3 | |
__END__ | |
<!doctype html> | |
<html> | |
<head> | |
<title>Some title</title> | |
</head> | |
<body> | |
<input name="test"/> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment