Skip to content

Add: Adding Http proxies initial document #281

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Mar 6, 2020
52 changes: 52 additions & 0 deletions docs_source_files/content/webdriver/http_proxies.de.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,55 @@ title: "Http proxies"
weight: 7
---

A proxy server acts as an intermediary for requests between a client and a server.
In simple, the traffic flows through the proxy server on its way to the address you
requested and back.

A proxy server for automation scripts with Selenium could be helpful for:
- Capture network traffic
- Mock backend calls made by the website
- Access the requited website under complex network topologies or strict
corporate restrictions/policies.

If you are in a corporate environment, and a browser fails to connect to
a URL, this is most likely because the environment needs a proxy to be
accessed.

Selenium WebDriver provides a way to proxy settings

{{< code-tab >}}
{{< code-panel language="java" >}}
import org.openqa.selenium.Proxy;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;

public class proxyTest {
public static void main(String[] args) {
Proxy proxy = new Proxy();
proxy.setHttpProxy("<HOST:PORT>");
ChromeOptions options = new ChromeOptions();
options.setCapability("proxy", proxy);
WebDriver driver = new ChromeDriver(options);
driver.get("https://www.google.com/");
driver.manage().window().maximize();
driver.quit();
}
}
{{< / code-panel >}}
{{< code-panel language="python" >}}
# Need PR
{{< / code-panel >}}
{{< code-panel language="csharp" >}}
// Need pr
{{< / code-panel >}}
{{< code-panel language="ruby" >}}
# Need PR
{{< / code-panel >}}
{{< code-panel language="javascript" >}}
// need PR
{{< / code-panel >}}
{{< code-panel language="kotlin" >}}
// need PR
{{< / code-panel >}}
{{< / code-tab >}}
55 changes: 55 additions & 0 deletions docs_source_files/content/webdriver/http_proxies.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,58 @@ title: "Http proxies"
weight: 7
---

A proxy server acts as an intermediary for
requests between a client and a server. In simple,
the traffic flows through the proxy server
on its way to the address you requested and back.

A proxy server for automation scripts
with Selenium could be helpful for:

* Capture network traffic
* Mock backend calls made by the website
* Access the requited website under complex network
topologies or strict corporate restrictions/policies.

If you are in a corporate environment, and a
browser fails to connect to a URL, this is most
likely because the environment needs a proxy to be accessed.

Selenium WebDriver provides a way to proxy settings

{{< code-tab >}}
{{< code-panel language="java" >}}
import org.openqa.selenium.Proxy;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;

public class proxyTest {
public static void main(String[] args) {
Proxy proxy = new Proxy();
proxy.setHttpProxy("<HOST:PORT>");
ChromeOptions options = new ChromeOptions();
options.setCapability("proxy", proxy);
WebDriver driver = new ChromeDriver(options);
driver.get("https://www.google.com/");
driver.manage().window().maximize();
driver.quit();
}
}
{{< / code-panel >}}
{{< code-panel language="python" >}}
# Need PR
{{< / code-panel >}}
{{< code-panel language="csharp" >}}
// Need pr
{{< / code-panel >}}
{{< code-panel language="ruby" >}}
# Need PR
{{< / code-panel >}}
{{< code-panel language="javascript" >}}
// need PR
{{< / code-panel >}}
{{< code-panel language="kotlin" >}}
// need PR
{{< / code-panel >}}
{{< / code-tab >}}
59 changes: 58 additions & 1 deletion docs_source_files/content/webdriver/http_proxies.es.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,61 @@ weight: 7
<i class="fas fa-language"></i> Page being translated from
English to Spanish. Do you speak Spanish? Help us to translate
it by sending us pull requests!
{{% /notice %}}
{{% /notice %}}

A proxy server acts as an intermediary for
requests between a client and a server. In simple,
the traffic flows through the proxy server
on its way to the address you requested and back.

A proxy server for automation scripts with
Selenium could be helpful for:

* Capture network traffic
* Mock backend calls made by the website
* Access the requited website under complex network
topologies or strict corporate restrictions/policies.

If you are in a corporate environment, and a
browser fails to connect to a URL, this is
most likely because the environment needs a
proxy to be accessed.

Selenium WebDriver provides a way to proxy settings

{{< code-tab >}}
{{< code-panel language="java" >}}
import org.openqa.selenium.Proxy;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;

public class proxyTest {
public static void main(String[] args) {
Proxy proxy = new Proxy();
proxy.setHttpProxy("<HOST:PORT>");
ChromeOptions options = new ChromeOptions();
options.setCapability("proxy", proxy);
WebDriver driver = new ChromeDriver(options);
driver.get("https://www.google.com/");
driver.manage().window().maximize();
driver.quit();
}
}
{{< / code-panel >}}
{{< code-panel language="python" >}}
# Need PR
{{< / code-panel >}}
{{< code-panel language="csharp" >}}
// Need pr
{{< / code-panel >}}
{{< code-panel language="ruby" >}}
# Need PR
{{< / code-panel >}}
{{< code-panel language="javascript" >}}
// need PR
{{< / code-panel >}}
{{< code-panel language="kotlin" >}}
// need PR
{{< / code-panel >}}
{{< / code-tab >}}
59 changes: 58 additions & 1 deletion docs_source_files/content/webdriver/http_proxies.fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,61 @@ weight: 7
<i class="fas fa-language"></i> Page being translated from
English to French. Do you speak French? Help us to translate
it by sending us pull requests!
{{% /notice %}}
{{% /notice %}}

A proxy server acts as an intermediary for requests between
a client and a server. In simple, the traffic flows
through the proxy server on its way to the address
you requested and back.

A proxy server for automation scripts with
Selenium could be helpful for:

* Capture network traffic
* Mock backend calls made by the website
* Access the requited website under complex network
topologies or strict corporate restrictions/policies.

If you are in a corporate environment, and a
browser fails to connect to a URL, this is
most likely because the environment needs a
proxy to be accessed.

Selenium WebDriver provides a way to proxy settings

{{< code-tab >}}
{{< code-panel language="java" >}}
import org.openqa.selenium.Proxy;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;

public class proxyTest {
public static void main(String[] args) {
Proxy proxy = new Proxy();
proxy.setHttpProxy("<HOST:PORT>");
ChromeOptions options = new ChromeOptions();
options.setCapability("proxy", proxy);
WebDriver driver = new ChromeDriver(options);
driver.get("https://www.google.com/");
driver.manage().window().maximize();
driver.quit();
}
}
{{< / code-panel >}}
{{< code-panel language="python" >}}
# Need PR
{{< / code-panel >}}
{{< code-panel language="csharp" >}}
// Need pr
{{< / code-panel >}}
{{< code-panel language="ruby" >}}
# Need PR
{{< / code-panel >}}
{{< code-panel language="javascript" >}}
// need PR
{{< / code-panel >}}
{{< code-panel language="kotlin" >}}
// need PR
{{< / code-panel >}}
{{< / code-tab >}}
57 changes: 57 additions & 0 deletions docs_source_files/content/webdriver/http_proxies.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,60 @@ weight: 7
<i class="fas fa-language"></i> ページは英語から日本語へ訳されています。
日本語は話せますか?プルリクエストをして翻訳を手伝ってください!
{{% /notice %}}

A proxy server acts as an intermediary for
requests between a client and a server. In simple,
the traffic flows through the proxy server on
its way to the address you requested and back.

A proxy server for automation scripts
with Selenium could be helpful for:

* Capture network traffic
* Mock backend calls made by the website
* Access the requited website under complex network
topologies or strict corporate restrictions/policies.

If you are in a corporate environment, and a
browser fails to connect to a URL, this is most
likely because the environment needs a proxy to be accessed.

Selenium WebDriver provides a way to proxy settings


{{< code-tab >}}
{{< code-panel language="java" >}}
import org.openqa.selenium.Proxy;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;

public class proxyTest {
public static void main(String[] args) {
Proxy proxy = new Proxy();
proxy.setHttpProxy("<HOST:PORT>");
ChromeOptions options = new ChromeOptions();
options.setCapability("proxy", proxy);
WebDriver driver = new ChromeDriver(options);
driver.get("https://www.google.com/");
driver.manage().window().maximize();
driver.quit();
}
}
{{< / code-panel >}}
{{< code-panel language="python" >}}
# Need PR
{{< / code-panel >}}
{{< code-panel language="csharp" >}}
// Need pr
{{< / code-panel >}}
{{< code-panel language="ruby" >}}
# Need PR
{{< / code-panel >}}
{{< code-panel language="javascript" >}}
// need PR
{{< / code-panel >}}
{{< code-panel language="kotlin" >}}
// need PR
{{< / code-panel >}}
{{< / code-tab >}}
56 changes: 56 additions & 0 deletions docs_source_files/content/webdriver/http_proxies.ko.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,59 @@ English to Korean. Do you speak Korean? Help us to translate
it by sending us pull requests!
{{% /notice %}}

A proxy server acts as an intermediary for
requests between a client and a server. In simple,
the traffic flows through the proxy server on
its way to the address you requested and back.

A proxy server for automation scripts
with Selenium could be helpful for:

* Capture network traffic
* Mock backend calls made by the website
* Access the requited website under complex network
topologies or strict corporate restrictions/policies.

If you are in a corporate environment, and a
browser fails to connect to a URL, this is most
likely because the environment needs a
proxy to be accessed.

Selenium WebDriver provides a way to proxy settings

{{< code-tab >}}
{{< code-panel language="java" >}}
import org.openqa.selenium.Proxy;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;

public class proxyTest {
public static void main(String[] args) {
Proxy proxy = new Proxy();
proxy.setHttpProxy("<HOST:PORT>");
ChromeOptions options = new ChromeOptions();
options.setCapability("proxy", proxy);
WebDriver driver = new ChromeDriver(options);
driver.get("https://www.google.com/");
driver.manage().window().maximize();
driver.quit();
}
}
{{< / code-panel >}}
{{< code-panel language="python" >}}
# Need PR
{{< / code-panel >}}
{{< code-panel language="csharp" >}}
// Need pr
{{< / code-panel >}}
{{< code-panel language="ruby" >}}
# Need PR
{{< / code-panel >}}
{{< code-panel language="javascript" >}}
// need PR
{{< / code-panel >}}
{{< code-panel language="kotlin" >}}
// need PR
{{< / code-panel >}}
{{< / code-tab >}}
Loading