Skip to content
Documentation Developers Guides

GeoIP Testing with BrowserStack

Tracking down cross-browser issues on sites that use geoIP can be tricky! BrowserStack & WonderProxy make it easy.

BrowserStack is a fantastic multibrowser testing tool designed to help you find fiddly problems with your websites across different browsers. Code that renders properly in Firefox may look crazy in Chrome; code that works nicely in English may have sadness when translated into German or Arabic. If you're only nesting in your local region, you may be missing the fiddly issues that your users are encountering on a daily basis. By connecting BrowserStack and WonderProxy, you can test across a variety of browsers and across different geographies.

This document covers using BrowserStack's Live tool with WonderProxy; it doesn't cover BrowserStack's automation tools.


Connecting BrowserStack Live and WonderProxy

At WonderProxy, proxy tokens replace passwords in your server credentials. Proxy tokens are quick to generate and work instantly across the network. Generate one (or five), and then use them anywhere your proxy configuration asks for a password.

Proxy tokens are part of our Delegated Authentication system.

To connect BrowserStack and WonderProxy, you'll need to download the BrowserStack local testing connection tool, run it with some command line options, and use BrowserStack in a browser other than Chrome or Firefox:

  1. Download the Live Connection Tool.
  2. Download the Local Testing binary for your operation system from BrowserStack's Local Testing page. Decompress it and take note of its location on your system.

  3. Start the Live Connection Tool and connect to WonderProxy.
  4. Start the tool from the command line using the following options:

    option name example description
    key xyouxU9eJsJZwsYNjnWMY Tells BrowserStack which user this connection belongs to. Retrieve your access key from your BrowserStack Account Settings.
    proxy-host dallas.wonderproxy.com This is the full hostname for the proxy you'd like to use.
    proxy-port 10000 The port on which you'd like to access the proxy.
    proxy-user paul Your WonderProxy username.
    proxy-pass 1-0-1642104671-FPXW59bqTSOcGxfydn5DzRbyJ7... Your WonderProxy proxy token.
    force-local Instruct BrowserStack to route all traffic through your local machine, not just sites not accessible to their servers (like intranet or local folders)
    force-proxy Instruct BrowserStack to route all traffic through this local client (that uses your computer), not just sites inaccessible your local machine.

    To connect BrowserStack to WonderProxy's dallas proxy, your command might resemble:

    
    ./BrowserStackLocal --key AddYourKeyHere --proxy-host dallas.wonderproxy.com --proxy-port 10000 --proxy-user paul --proxy-pass "proxy token" --force-local --force-proxy
    
    

  5. Visit BrowserStack in a browser other than Firefox or Chrome.
  6. BrowserStack only support the Local Client in browsers for which they don't have a plugin. You'll need to use Safari, IE, Edge, or Opera.

  7. Select your browser.
  8. Verify your connection.
  9. Visit wondernetwork.com/geotest in your virtual browser and verify that:

    • The BrowserStack widget shows a green checkmark beside Local.
    • The page itself lists the proxy you've connected to.
    Browserstack connected page

  10. Get testing!

Troubleshooting

Local Client

The local client aborts if it has problems. When it starts up, the terminal should resemble the following:


./BrowserStackLocal --key AddYourKeyHere --proxy-host dallas.wonderproxy.com --proxy-port 10000 --proxy-user paul --proxy-pass pass --force-local --force-proxy
BrowserStackLocal v6.9

You can now access your local server(s) in our remote browser.

***
Please ensure your browser is configured to bypass proxy for "bs-local.com".
***

Press Ctrl-C to exit

If BrowserStack prints out an error or help text, something has gone wrong. For example, *** Error: Could not connect to www.browserstack.com! occurs if any of the proxy configuration options (username, proxy token, hostname, port) are incorrect. Check them then re-try. You can use cURL to quickly test your configuration, as in the following:


curl -vv -x http://PROXY-HOSTNAME:PROXY-PORT --proxy-user "USERNAME:PROXYTOKEN" -L https://www.google.com/

If you're having problems with your proxy configuration, reach out to us. If you're having other problems with the local client please contact BrowserStack support - they're super friendly.

Browser

The two most common browser problems are:

  • Virtual browser never starts
  • This often happens because flash isn't enabled in your browser. Install the flash plugin, or find documentation on enabling flash for BrowserStack.

  • BrowserStack uses a plugin, rather than the local client
  • BrowserStack only supports using the local client when a plugin isn't available. The browser plugins do not allow proxy configuration so you'll need to switch to a browser without a supported plugin to use WonderProxy with BrowserStack.