スクリプトがサインインしてブラウザーの URL に移動する場所にありますが、現在の Web ページからサインアウトすると、そこに留まり、ループを再開しません。ループが完了したことを認識して再起動するにはどうすればよいですか?
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に戻ると思うでしょう。ご協力いただきありがとうございます。