ruby - Can mechanize work with browsers? -


i using ruby's gem mechanize automate file upload after logging in particular site.. able login using

#!/usr/bin/ruby  require 'rubygems' require 'mechanize'  #creating object mechanize class = mechanize.new { |agent| # site refreshes after login agent.follow_meta_refresh = true }  #getting page a.get('https://www.samplesite.com/') |page| puts page.title form = page.forms.first form.fields.each {|f| puts f.name} form['username'] = "username" form['password'] = "password"  # submitting form , reaching page 

now there 2 questions... a. can see happening on browser using agent or tool? b. there way keep mechanize waiting page load?

do try selenium webdriver ?
should integrates ruby program


Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -