Trying to set the value of an input with mechanize

406 views Asked by At

I am trying to set an input in an html page to a certain value. Using mechanize, I am writing:

form.field_with(:name => 'lic_cno[0]') == "9511681"

but when I write just after that

puts form.field_with(:name => 'lic_cno[0]').value

I get a blank space in my console. What am I doing wrong?

1

There are 1 answers

1
Srgrn On

isn't == means to test the value? shouldn't it be

form.field_with(:name => 'lic_cno[0]') = "9511681"