Class: Capybara::Playwright::Node::DateTimeInput
- Includes:
- UpdateValueJS
- Defined in:
- lib/capybara/playwright/node.rb
Instance Method Summary collapse
Methods included from UpdateValueJS
Methods inherited from Settable
Constructor Details
This class inherits a constructor from Capybara::Playwright::Node::Settable
Instance Method Details
#set(value, **options) ⇒ Object
317 318 319 320 321 322 323 |
# File 'lib/capybara/playwright/node.rb', line 317 def set(value, **) if !value.is_a?(String) && value.respond_to?(:to_time) update_value_js(@element, value.to_time.strftime('%Y-%m-%dT%H:%M')) else @element.fill(value.to_s, timeout: @timeout) end end |