Created
May 11, 2018 23:13
-
-
Save twalpole/fddb639fd928ee60cb6f76497127a00d 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 "selenium/webdriver" | |
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.find('input[name="authorization"]') | |
__END__ | |
<!doctype html> | |
<html> | |
<head> | |
<title>Some title</title> | |
</head> | |
<body> | |
<label> | |
<span> | |
<input value="false" name="authorization" type="checkbox"> | |
</span> | |
</label> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment