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

c# - Unity IoC Lifetime per HttpRequest for UserStore -

Change the color of an oval at click in Java AWT -

I am trying to solve the error message 'incompatible ranks 0 and 1 in assignment' in a fortran 95 program. -