Closed ryanlevell closed 9 years ago
Hi jekh,
I'm trying to load webpages, wait until they've finished loading, scroll to their bottoms, and wait for until they've finished loading. Because the load times are indeterminate, I am using browsermob-proxy to wait for traffic to stop before scrolling. I am using Python via Anaconda and Jupyter-Notebook. The following code consistently prints below my Jupyter-Notebook cell a duration of about 19,900 milliseconds, which is the difference between the wait time limit and the length of the quiet period, which I think is basically the amount of time wait_for_traffic_to_stop is allowed to wait.
# Record the present time.
start_time = time.time()
# Have the proxy server have Chrome load Google.
driver.get("https://www.google.com/")
# Wait for traffic to stop.
status_code = proxy.wait_for_traffic_to_stop(100, 20000)
# Print the time between load beginning and traffic end, or wait time limit.
duration = time.time() - start_time
print(duration)
That all being said, in Anaconda Prompt, I executed the command "pip install git+https://github.com/AutomatedTester/browsermob-proxy-py.git". Despite browsermob-proxy-py's documentation seeming to imply that my command would install browsermob-proxy 2.0, my command installed browsermob-proxy 0.8.0. Given a previous post of yours in this thread, it seems that the above time-out issue was fixed in browsermob-proxy 2. How do I install browsermob-proxy 2 or later via Anaconda Prompt?
I cloned and built beta 2.1 a few hours ago and I created a small script to try out the new BrowserMobProxy interface with WebDriver. I crammed everything into main() to make it simple to replicate.
I tested out a few large sites (Google, Yahoo, Weather, etc) and weather.com won't finish loading - the other sites complete in a few seconds.
Here are my capabilities:
The jars I am using:
I am using ChromeDriver version 2.15.322448. The same thing happened when using Firefox, but I could not rely on it as my Firefox version is 37 and I don't believe FirefoxDriver supports it yet. The page loads fine when I comment out the BrowserMob code.