# ERR\_TUNNEL\_CONNECTION\_FAILED while accessing web application through Proxy in Robot Framework

**URL:** <https://forum.robotframework.org/t/err-tunnel-connection-failed-while-accessing-web-application-through-proxy-in-robot-framework/1938>\
**Category:** SeleniumLibrary\
**Created:** [14 June 2021 05:24 UTC](https://forum.robotframework.org/t/err-tunnel-connection-failed-while-accessing-web-application-through-proxy-in-robot-framework/1938 "2021-06-14T05:24:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pravin\_Shirsath](https://avatars.discourse-cdn.com/v4/letter/p/85f322/32.png) [@Pravin\_Shirsath](https://forum.robotframework.org/u/Pravin_Shirsath)\
**Post date:** [14 June 2021 05:24 UTC](https://forum.robotframework.org/t/err-tunnel-connection-failed-while-accessing-web-application-through-proxy-in-robot-framework/1938/1 "2021-06-14T05:24:56Z")

</div>

Hello community,

I was setting up proxy in robot framework using SeleniumLibrary.  
Intention was to access web application url through VPN connected. VPN was blocking the access to that web application, but it can be achieved through proxy.

**Here is the way I achieved it:**

created proxy\_chrome.py with code as:

```
from robot.libraries.BuiltIn import BuiltIn
from selenium import webdriver

def Chrome_browser_options():
    PROXY = "<ip address of proxy>:<port number>"
    chrome_options = webdriver.ChromeOptions()
    chrome_options.add_argument("--no-sandbox")
    chrome_options.add_argument("--disable-gpu")
    chrome_options.add_argument("--start-maximized")
    chrome_options.add_argument('--proxy-server=http://%s' % PROXY)
    return chrome_options

```

Then called it in my robot framework script as:

```
***Settings***
Library DatabaseLibrary
Library OperatingSystem
Library SeleniumLibrary
Library Collections
Library RequestsLibrary
Library ../Libraries/proxy_chrome.py

***Test Cases***
TestTry
    ${chrome options}= Chrome_browser_options
    Create Webdriver Chrome chrome_options=${chrome options}
    Go To <web application url>

```

**However, I got the exception as below:**

WebDriverException: Message: unknown error: net::ERR\_TUNNEL\_CONNECTION\_FAILED

Can someone help me on this.

---

<div class="post-metadata">

**Author:** ![Younesben01](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/younesben01/32/3908_2.png) [@Younesben01](https://forum.robotframework.org/u/Younesben01)\
**Post date:** [26 July 2024 16:25 UTC](https://forum.robotframework.org/t/err-tunnel-connection-failed-while-accessing-web-application-through-proxy-in-robot-framework/1938/3 "2024-07-26T16:25:45Z")

</div>

Hello @Pravin_Shirsath  
Did you solve your problem because I’m facing the same issue here ?
