-
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
| import http.server | |
| import cgi | |
| import base64 | |
| import json | |
| from urllib.parse import urlparse, parse_qs | |
| class CustomServerHandler(http.server.BaseHTTPRequestHandler): | |
| def do_HEAD(self): |
| #!/usr/bin/env python | |
| ''' | |
| Simple and functional REST server for Python (2.7) using no dependencies beyond the Python standard library. | |
| Features: | |
| * Map URI patterns using regular expressions | |
| * Map any/all the HTTP VERBS (GET, PUT, DELETE, POST) | |
| * All responses and payloads are converted to/from JSON for you |
| AWSTemplateFormatVersion: '2010-09-09' | |
| Description: 'Deployment Stack' | |
| Parameters: | |
| GitHubToken: | |
| NoEcho: true | |
| Type: String | |
| Description: Secret. It might look something like 9b189a1654643522561f7b3ebd44a1531a4287af OAuthToken with access to Repo. Go to https://github.com/settings/tokens" | |
| GitHubOwner: | |
| Type: String | |
| Description: GitHub UserName |
| #!/usr/bin/env python | |
| """ | |
| mock examples | |
| """ | |
| import os | |
| import unittest | |
| import mock | |
| import functools |