【发布时间】:2015-10-01 06:50:58
【问题描述】:
我在我的脚本登录并转到浏览器 url 的地方有它,但是当它退出当前网页时,它只是坐在那里,不会重新启动循环。我怎样才能让循环实现它的完成并重新启动?
x = 0
while x <= 5
File.open("yahoo_accounts.txt") do |email|
email.each do |item|
email, password = item.chomp.split(',')
emails << email
passwords << password
emails.zip(passwords) { |name, pass|
browser = Watir::Browser.new :ff
browser.goto "url"
#logs in and does what its suppose to do with the name and pass
}
end
x += 1
next
end
end
脚本完成后,它就在网页上...我正试图让它重新开始... 您会认为它会获取每个名称,传递并返回到开始的 url。 感谢您的帮助。
【问题讨论】:
标签: ruby while-loop watir-webdriver webautomation