gpt4 book ai didi

ruby - 尝试使用 Mechanize 设置输入的值

转载 作者:行者123 更新时间:2023-12-04 16:22:50 24 4
gpt4 key购买 nike

我正在尝试将 html 页面中的输入设置为某个值。使用 Mechanize ,我正在写:

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

但是当我在那之后写
puts form.field_with(:name => 'lic_cno[0]').value

我的控制台中有一个空白区域。我究竟做错了什么?

最佳答案

== 不是测试值吗?
不应该是

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

关于ruby - 尝试使用 Mechanize 设置输入的值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30715596/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com