Last active
March 11, 2016 22:06
-
-
Save xymor/e8cd6a619bdd71f94d4d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#sudo sudo apt-get install firefox xvfb | |
#gem install watir-webdriver | |
#run with xvfb-run ruby file.rb | |
require 'watir-webdriver' | |
browser = Watir::Browser.new | |
browser.goto 'https://loja.com.br/admin/login/auth' | |
browser.text_field(:name => "j_username").set "xxx" | |
browser.text_field(:name => "j_password").set "xxx" | |
browser.button(:value => "Acesse sua conta!").click | |
browser.goto 'https://loja.com.br/admin/imageImporter/index' | |
puts browser.text | |
browser.file_field(:class,"text").set("/home/ideais/images.zip") | |
browser.button(:value => "Importar").click | |
puts browser.text | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment