fix parse input without type attribute
parent
2d6f22f8b9
commit
f3c0af6460
|
@ -8,7 +8,7 @@ WebMock.stub(:get, "example.com/check_form").to_return(body: <<-BODY
|
|||
<body>
|
||||
<form action="post_path" method="post" name="sample_form">
|
||||
<!-- fields -->
|
||||
<input type="text" name="name">
|
||||
<input name="name">
|
||||
<input type="text" name="email">
|
||||
<input type="hidden" name="userid" value="12345">
|
||||
<input type="password" id="pass" name="password">
|
||||
|
|
|
@ -65,7 +65,7 @@ class MechanizeCr::Form
|
|||
private def parse
|
||||
@node.css("input").not_nil!.each do |html_node|
|
||||
html_node = html_node.as(Lexbor::Node)
|
||||
type = (html_node["type"] || "text").downcase
|
||||
type = (html_node["type"]? || "text").downcase
|
||||
case type
|
||||
when "checkbox"
|
||||
checkboxes << FormContent::CheckBox.new(html_node, self)
|
||||
|
|
Loading…
Reference in New Issue