Skip to main content

Build Status Build Status

Robot Framework BrowserMob Proxy

Introduction

BrowserMobProxyLibrary is a Robot Framework library ro interface with BrowserMob Proxy.

BrowserMob Proxy is a simple utility to capture performance data for web apps (via the HAR format), as well as manipulate browser behavior and traffic, such as whitelisting and blacklisting content, simulating network traffic and latency, and rewriting HTTP requests and responses.

More information about this library can be found in the Keyword Documentation.

Installation

Using pip

      pip install -U robotframework-browsermobproxylibrary

Manual installation

  1. Make sure you have Robot Framework installed.
  2. Download source distributions (*.tar.gz) for the library and its dependencies:
  3. Extract each source distribution to a temporary location.
  4. Go each created directory from the command line and install each project using:
      python setup.py install

Keywords

Robot Framework keyword documentation is located Here

Example

Install Robot Framework library for selenium

      pip install -U robotframework-selenium2library

Download and extract BrowserMob Proxy

Basic example:

      *** Settings ***
      Documentation               This is just a BrowserMob Proxy Library tutorial
      ...
      Metadata                    VERSION     0.1
      Library                     Selenium2Library
      Library                     Collections
      Library                     OperatingSystem
      Library                     BrowserMobProxyLibrary
      Suite Setup                 Start Browser
      Suite Teardown              Close Browsers
      
      
      *** Variables ***
      ${PAGE_URL}                 https://www.google.com
      ${BROWSER}                  Firefox
      
      *** Keywords ***
      Start Browser
          [Documentation]         Start firefox browser
          Set Selenium Implicit Wait  10
          ## Init BrowserMob Proxy
          Start Local Server      <path to browsermob-proxy>
      
          ## Create dedicated proxy on BrowserMob Proxy
          ${BrowserMob_Proxy}=    Create Proxy
      
          ## Configure Webdriver to use BrowserMob Proxy
          Create Webdriver        ${BROWSER}    proxy=${BrowserMob_Proxy}
      
      Close Browsers
          Close All Browsers
          Stop Local Server
      
      *** Test Cases ***
      Check something
          [Documentation]         Check the page title
          New Har                 google
          Go to                   ${PAGE_URL}
          Title Should Be         Google
          ${har}=                 Get Har As JSON
          create file             ${EXECDIR}${/}file.har     ${har}
          log to console          Browsermob Proxy HAR file saved as ${EXECDIR}${/}file.har

Release files for robotframework-browsermobproxylibrary 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for robotframework-browsermobproxylibrary 0.1.3
File Size Uploaded
robotframework-browsermobproxylibrary-0.1.3.tar.gz 5.5 kB Details

Release files / robotframework-browsermobproxylibrary-0.1.3.tar.gz

Download URL robotframework-browsermobproxylibrary-0.1.3.tar.gz
Size 5.5 kB
Tags Source
SHA-256 checksum
How to use checksums
cce8711d2931e994d6623afb5c0e565433ddceeb620bc1d57c8b1923235a9815
BLAKE2b-256 checksum
How to use checksums
1a88bc0c5fc6cac2200120835e9a2b50cd7b63b26a9467141368d24a7ae4cf0f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/2.7.16

Release history Release notifications | RSS feed

This release

0.1.3 This release

1 release file

0.1.2

1 release file

0.1.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page