ERROR: test_simpleTest (sst.runtests.TestSimpletest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/sst/runtests.py", line 270, in setUp webdriver_remote_url)
File "/usr/local/lib/python2.7/dist-packages/sst/actions.py", line 188, in start profile.set_proxy(selenium_proxy)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/firefox/firefox_profile.py", line 244, in set_proxy
self._set_manual_proxy_preference("ftp", proxy.ftp_proxy)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/firefox/firefox_profile.py", line 263, in _set_manual_proxy_preference
self.set_preference("network.proxy.%s" % key, host_details[1][2:])
IndexError: list index out of range
I can verify that the test runs *without* the proxy (so my setup isn't completely hosed), but I've yet to really get a good checklist for "this is how you set up the proxy so that your scripts can use it."
My Simple Test is straight forward - Using SST I literally just say
from sst.actions import *
go_to('http://usatoday.com')
and then it is run ussing sst-run simpleTest -x --browsermob=proxy-2.0.7/bin/browsermob-proxy
I've also tried running a standalone script like this:
from selenium import webdriver
from browsermobproxy import Server
import sys
server = Server("/Users/mhollinger/Google Drive/Code/SST/proxy-2.0.7/bin/browsermob-proxy")
server.start()
proxy = server.create_proxy()
proxy.new_har("usat")
#initialize webdriver
profile = webdriver.FirefoxProfile()
profile.set_preference("network.proxy.http", "\"localhost\"")
profile.set_preference("network.proxy.http_port", 9090)
profile.set_preference("network.proxy.type", 1)
profile.update_preferences()
profile.set_proxy(proxy.selenium_proxy())
browser = webdriver.Firefox(firefox_profile=profile)
browser.get('http://www.usatoday.com')
print browser.title
print dir(proxy.har)
print proxy.har()
print browser.page_source
browser.quit() #important, or else loaded browser will remain running as a bg proc!
display.stop()
server.stop()
Could someone either tell me how to pass this setting in my script, or, barring that, point me to some good documentation? (My code, setup, and the documentation I have are in the link above, and hey - you get points for answering!) Thanks in advance.
--
---
You received this message because you are subscribed to the Google Groups "BrowserMob Proxy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to browsermob-pro...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.