Created
March 8, 2018 19:20
-
-
Save twalpole/a541746b354afde8e82fa89a35a9b2da 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" | |
require "selenium-webdriver" | |
Capybara.register_driver :selenium do |app| | |
Capybara::Selenium::Driver.new(app, :browser => :chrome) | |
end | |
html = DATA.read | |
app = proc { |env| [200, { "Content-Type" => "text/html" }, [html] ] } | |
sess = Capybara::Session.new(:selenium, app) | |
sess.visit("/") | |
sess.fill_in "dtl", with: "12131972\t0113p" | |
puts "value is #{sess.find_field("dtl").value}" | |
__END__ | |
<!doctype html> | |
<html lang="en"> | |
<head> | |
<title>React Id</title> | |
</head> | |
<body> | |
<input type="datetime-local" id="dtl"/> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment