Created
January 15, 2019 02:44
-
-
Save harsh183/00904e3f00c8c5a54f143f3deefe9897 to your computer and use it in GitHub Desktop.
This script uses selenium to login into uiuc's google apps login.
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
require 'watir' | |
require 'webdrivers' | |
@browser = Watir::Browser.new :firefox | |
# Standard google apps login page | |
@browser.goto("https://accounts.google.com/signin/v2/identifier?hl=en&passive=true&continue=https%3A%2F%2Fwww.google.com%2F&flowName=GlifWebSignIn&flowEntry=ServiceLogin") | |
# First pass google (google is weird, my input field selectors weren't ) | |
@browser.send_keys "[email protected]" # Can be anything that exists | |
@browser.send_keys :enter | |
# Now the shibbolet login | |
@browser.input(id: "j_username").send_keys "hdeep2" | |
@browser.input(id: "j_password").send_keys "valid_password" | |
@browser.inputs(type: "submit")[0].click | |
binding.pry |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment