Skip to content

Instantly share code, notes, and snippets.

@aldrinmartoq
Last active June 13, 2019 23:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aldrinmartoq/946cd18b0840efca1c82a2ceda57ed9d to your computer and use it in GitHub Desktop.
Save aldrinmartoq/946cd18b0840efca1c82a2ceda57ed9d to your computer and use it in GitHub Desktop.
# Requiere:
# 1. gem install webdrone
# 2. Tener chromedriver en tu $PATH (http://chromedriver.chromium.org)
# 3. Usa tu profile default de google chrome, la ruta está para MAC.
require 'webdrone'
Webdrone::Browser.chrome_options.add_argument "--user-data-dir=/Users/#{ENV['USER']}/Library/Application Support/Google/Chrome/"
a0 = Webdrone.create browser: :chrome, developer: false, win_w: 1.0, timeout: 5
a0.open.url 'https://www.getonbrd.com/webpros/login'
a0.clic.on 'Ingresa con Google', mark: true
# El error sucede al pinchar el link Empleos para ti y luego escribir en la barra de búsqueda
a0.clic.on 'Empleos para ti', mark: true
a0.wait.time 5 # esperemos ajax de turbolinks
a0.form.set 'search_term', "Holanda\n"
a0.conf.developer = true
a0.console
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment