Created
October 9, 2014 18:13
-
-
Save anonymous/0e848c11165829d5ff48 to your computer and use it in GitHub Desktop.
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
from selenium.webdriver.common.keys import Keys | |
from selenium.webdriver.support import expected_conditions as EC | |
from selenium.webdriver.support.ui import WebDriverWait | |
from selenium.webdriver.common.by import By | |
from browsermobproxy import Server | |
server=Server('C:\Python27\Lib\site-packages\\browsermob-proxy-2.0-beta-6\\bin\\browsermob-proxy.bat') | |
server.start() | |
proxy=server.create_proxy() | |
from selenium import webdriver | |
chrome_options = webdriver.ChromeOptions() | |
chrome_options.add_argument("--proxy-server={0}".format(proxy.proxy)) | |
browser = webdriver.Chrome(executable_path="E:\\chromedriver.exe",chrome_options = chrome_options) | |
proxy.new_har("CS") | |
browser.get("https://falcon.crowdstrike.com/") | |
har=proxy.har | |
print har |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment