Created
December 18, 2015 02:13
-
-
Save aldrinmartoq/4fedf6a987fc5c2822e4 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
require 'webdrone' | |
a0 = Webdrone.create browser: :firefox, timeout: 10 | |
def entrar_dga(a0) | |
a0.open.url 'http://dgasatel.mop.cl/' | |
a0.clic.on 'Ingrese Aquí' | |
a0.clic.on 'Entrar' | |
end | |
def marcar_estacion(a0, numero, nombre, temp: true, hume: true, pacu: true, phor: true) | |
a0.form.set "estacion#{numero}", nombre | |
a0.clic.css "input[name='chk_estacion#{numero}a']", n:1 if temp | |
a0.clic.css "input[name='chk_estacion#{numero}a']", n:2 if hume | |
a0.clic.css "input[name='chk_estacion#{numero}b']", n:1 if pacu | |
a0.clic.css "input[name='chk_estacion#{numero}b']", n:2 if phor | |
end | |
entrar_dga(a0) | |
marcar_estacion(a0, 1, 'Visviri') | |
marcar_estacion(a0, 2, 'Chungara', temp: false) | |
Webdrone.irb_console |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment