-
Open a browser
# start an instance of firefox with selenium-webdriver driver = Selenium::WebDriver.for :firefox # :chrome -> chrome # :ie -> iexplore
- Go to a specified URL
| # selenium for web driving | |
| import selenium | |
| from selenium import webdriver | |
| # time for pausing between navigation | |
| import time | |
| # Datetime for recording time of submission | |
| import datetime |
| #!/usr/bin/env python3 | |
| __author__ = 'Sushain K. Cherivirala' | |
| import argparse | |
| import cmd | |
| import collections | |
| import contextlib | |
| import copy | |
| import datetime |
| # EDIT: 2013/10/20 | |
| # google has updated its kwt UI, this script doesn't work any more! | |
| # may be I will update this script when I have time to investigate their new Interface. | |
| from selenium import webdriver | |
| from selenium.common.exceptions import TimeoutException | |
| import selenium.webdriver.support.wait | |
| selenium.webdriver.support.wait.POLL_FREQUENCY = 0.05 | |
| import re |
| import csv, time | |
| from selenium import webdriver | |
| from selenium.webdriver.support.ui import Select | |
| from selenium.webdriver.common.keys import Keys | |
| applicant_name = # your name | |
| applicant_email = # your email | |
| applicant_address = # your physical address | |
| occupation = # your occupation |
| from selenium import webdriver | |
| from selenium.webdriver.common.keys import Keys | |
| import requests | |
| import time | |
| import re | |
| import json | |
| import time | |
| def login(): | |
| options = webdriver.ChromeOptions() |
| # Install chromedriver from https://sites.google.com/a/chromium.org/chromedriver/downloads | |
| import os | |
| from optparse import OptionParser | |
| from selenium import webdriver | |
| from selenium.webdriver.chrome.options import Options | |
| CHROME_PATH = '/usr/bin/google-chrome' |
| # Import unittest module for creating unit tests | |
| import unittest | |
| # Import time module to implement | |
| import time | |
| # Import the Selenium 2 module (aka "webdriver") | |
| from selenium import webdriver | |
| # For automating data input |
| #!/usr/bin/env bash | |
| # https://developers.supportbee.com/blog/setting-up-cucumber-to-run-with-Chrome-on-Linux/ | |
| # https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c | |
| # http://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver | |
| # http://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception | |
| # http://stackoverflow.com/questions/40262682/how-to-run-selenium-3-x-with-chrome-driver-through-terminal | |
| # http://askubuntu.com/questions/760085/how-do-you-install-google-chrome-on-ubuntu-16-04 | |
| # Versions | |
| CHROME_DRIVER_VERSION=`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE` |
| from selenium import webdriver | |
| from selenium.webdriver.common.keys import Keys | |
| from bs4 import BeautifulSoup | |
| import re | |
| import pandas as pd | |
| from tabulate import tabulate | |
| import os | |
| #launch url | |
| url = "http://kanview.ks.gov/PayRates/PayRates_Agency.aspx" |