Skip to content

Commit 9f9cf75

Browse files
nainappadiemolharsha509
authored
Added Chrome devtools features (SeleniumHQ#441)[deploy site]
* Added Chrome Devtools features * Removed emulate Network Conditions method * Removed emulate Network Conditions method * Changed the location to Support Packages Co-authored-by: Diego Molina <[email protected]> Co-authored-by: Sri Harsha <[email protected]>
1 parent ebcafc8 commit 9f9cf75

8 files changed

+425
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
title: "Chrome Devtools"
3+
weight: 10
4+
---
5+
6+
{{% notice info %}}
7+
<i class="fas fa-language"></i> Diese Seite wird von Englisch
8+
auf Deutsch übersetzt. Sprichst Du Deutsch? Hilf uns die Seite
9+
zu übersetzen indem Du uns einen Pull Reqeust schickst!
10+
{{% /notice %}}
11+
12+
Selenium 4 alpha versions have much awaited native support for Chrome Dev Protocol through "DevTools" interface. This helps us getting Chrome Development properties such as Application Cache, Fetch, Network, Performance, Profiler, Resource Timing, Security and Target CDP domains etc.
13+
14+
Chrome DevTools is a set of web developer tools built directly into the Google Chrome browser. DevTools can help you edit pages on-the-fly and diagnose problems quickly, which ultimately helps you build better websites, faster.
15+
16+
## Emulate Geo Location:
17+
18+
Some applications have different features and functionalities across different locations. Automating such applications is difficult because it is hard to emulate the geo locations in the browser using Selenium. But with the help of Devtools, we can easily emulate them. Below code snippet demonstrates that.
19+
20+
{{< code-tab >}}
21+
{{< code-panel language="java" >}}
22+
import org.openqa.selenium.chrome.ChromeDriver;
23+
import org.openqa.selenium.devtools.DevTools;
24+
25+
public void geoLocationTest(){
26+
ChromeDriver driver = new ChromeDriver();
27+
Map coordinates = new HashMap()
28+
{{
29+
put("latitude", 50.2334);
30+
put("longitude", 0.2334);
31+
put("accuracy", 1);
32+
}};
33+
driver.executeCdpCommand("Emulation.setGeolocationOverride", coordinates);
34+
driver.get("<your site url>");
35+
}
36+
{{< / code-panel >}}
37+
{{< code-panel language="python" >}}
38+
# Please raise a PR to add code sample
39+
{{< / code-panel >}}
40+
{{< code-panel language="csharp" >}}
41+
// Please raise a PR to add code sample
42+
{{< / code-panel >}}
43+
{{< code-panel language="ruby" >}}
44+
# Please raise a PR to add code sample
45+
{{< / code-panel >}}
46+
{{< code-panel language="javascript" >}}
47+
// Please raise a PR to add code sample
48+
{{< / code-panel >}}
49+
{{< code-panel language="kotlin" >}}
50+
// Please raise a PR to add code sample
51+
{{< / code-panel >}}
52+
{{< / code-tab >}}
53+
54+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
title: "Chrome Devtools"
3+
weight: 10
4+
---
5+
6+
Selenium 4 alpha versions have much awaited native support for Chrome Dev Protocol through "DevTools" interface. This helps us getting Chrome Development properties such as Application Cache, Fetch, Network, Performance, Profiler, Resource Timing, Security and Target CDP domains etc.
7+
8+
Chrome DevTools is a set of web developer tools built directly into the Google Chrome browser. DevTools can help you edit pages on-the-fly and diagnose problems quickly, which ultimately helps you build better websites, faster.
9+
10+
## Emulate Geo Location:
11+
12+
Some applications have different features and functionalities across different locations. Automating such applications is difficult because it is hard to emulate the geo locations in the browser using Selenium. But with the help of Devtools, we can easily emulate them. Below code snippet demonstrates that.
13+
14+
{{< code-tab >}}
15+
{{< code-panel language="java" >}}
16+
import org.openqa.selenium.chrome.ChromeDriver;
17+
import org.openqa.selenium.devtools.DevTools;
18+
19+
public void geoLocationTest(){
20+
ChromeDriver driver = new ChromeDriver();
21+
Map coordinates = new HashMap()
22+
{{
23+
put("latitude", 50.2334);
24+
put("longitude", 0.2334);
25+
put("accuracy", 1);
26+
}};
27+
driver.executeCdpCommand("Emulation.setGeolocationOverride", coordinates);
28+
driver.get("<your site url>");
29+
}
30+
{{< / code-panel >}}
31+
{{< code-panel language="python" >}}
32+
# Please raise a PR to add code sample
33+
{{< / code-panel >}}
34+
{{< code-panel language="csharp" >}}
35+
// Please raise a PR to add code sample
36+
{{< / code-panel >}}
37+
{{< code-panel language="ruby" >}}
38+
# Please raise a PR to add code sample
39+
{{< / code-panel >}}
40+
{{< code-panel language="javascript" >}}
41+
// Please raise a PR to add code sample
42+
{{< / code-panel >}}
43+
{{< code-panel language="kotlin" >}}
44+
// Please raise a PR to add code sample
45+
{{< / code-panel >}}
46+
{{< / code-tab >}}
47+
48+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
title: "Chrome Devtools"
3+
weight: 10
4+
---
5+
6+
{{% notice info %}}
7+
<i class="fas fa-language"></i> Page being translated from
8+
English to Spanish. Do you speak Spanish? Help us to translate
9+
it by sending us pull requests!
10+
{{% /notice %}}
11+
12+
Selenium 4 alpha versions have much awaited native support for Chrome Dev Protocol through "DevTools" interface. This helps us getting Chrome Development properties such as Application Cache, Fetch, Network, Performance, Profiler, Resource Timing, Security and Target CDP domains etc.
13+
14+
Chrome DevTools is a set of web developer tools built directly into the Google Chrome browser. DevTools can help you edit pages on-the-fly and diagnose problems quickly, which ultimately helps you build better websites, faster.
15+
16+
## Emulate Geo Location:
17+
18+
Some applications have different features and functionalities across different locations. Automating such applications is difficult because it is hard to emulate the geo locations in the browser using Selenium. But with the help of Devtools, we can easily emulate them. Below code snippet demonstrates that.
19+
20+
{{< code-tab >}}
21+
{{< code-panel language="java" >}}
22+
import org.openqa.selenium.chrome.ChromeDriver;
23+
import org.openqa.selenium.devtools.DevTools;
24+
25+
public void geoLocationTest(){
26+
ChromeDriver driver = new ChromeDriver();
27+
Map coordinates = new HashMap()
28+
{{
29+
put("latitude", 50.2334);
30+
put("longitude", 0.2334);
31+
put("accuracy", 1);
32+
}};
33+
driver.executeCdpCommand("Emulation.setGeolocationOverride", coordinates);
34+
driver.get("<your site url>");
35+
}
36+
{{< / code-panel >}}
37+
{{< code-panel language="python" >}}
38+
# Please raise a PR to add code sample
39+
{{< / code-panel >}}
40+
{{< code-panel language="csharp" >}}
41+
// Please raise a PR to add code sample
42+
{{< / code-panel >}}
43+
{{< code-panel language="ruby" >}}
44+
# Please raise a PR to add code sample
45+
{{< / code-panel >}}
46+
{{< code-panel language="javascript" >}}
47+
// Please raise a PR to add code sample
48+
{{< / code-panel >}}
49+
{{< code-panel language="kotlin" >}}
50+
// Please raise a PR to add code sample
51+
{{< / code-panel >}}
52+
{{< / code-tab >}}
53+
54+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
title: "Chrome Devtools"
3+
weight: 10
4+
---
5+
6+
{{% notice info %}}
7+
<i class="fas fa-language"></i> Page being translated from
8+
English to French. Do you speak French? Help us to translate
9+
it by sending us pull requests!
10+
{{% /notice %}}
11+
12+
Selenium 4 alpha versions have much awaited native support for Chrome Dev Protocol through "DevTools" interface. This helps us getting Chrome Development properties such as Application Cache, Fetch, Network, Performance, Profiler, Resource Timing, Security and Target CDP domains etc.
13+
14+
Chrome DevTools is a set of web developer tools built directly into the Google Chrome browser. DevTools can help you edit pages on-the-fly and diagnose problems quickly, which ultimately helps you build better websites, faster.
15+
16+
## Emulate Geo Location:
17+
18+
Some applications have different features and functionalities across different locations. Automating such applications is difficult because it is hard to emulate the geo locations in the browser using Selenium. But with the help of Devtools, we can easily emulate them. Below code snippet demonstrates that.
19+
20+
{{< code-tab >}}
21+
{{< code-panel language="java" >}}
22+
import org.openqa.selenium.chrome.ChromeDriver;
23+
import org.openqa.selenium.devtools.DevTools;
24+
25+
public void geoLocationTest(){
26+
ChromeDriver driver = new ChromeDriver();
27+
Map coordinates = new HashMap()
28+
{{
29+
put("latitude", 50.2334);
30+
put("longitude", 0.2334);
31+
put("accuracy", 1);
32+
}};
33+
driver.executeCdpCommand("Emulation.setGeolocationOverride", coordinates);
34+
driver.get("<your site url>");
35+
}
36+
{{< / code-panel >}}
37+
{{< code-panel language="python" >}}
38+
# Please raise a PR to add code sample
39+
{{< / code-panel >}}
40+
{{< code-panel language="csharp" >}}
41+
// Please raise a PR to add code sample
42+
{{< / code-panel >}}
43+
{{< code-panel language="ruby" >}}
44+
# Please raise a PR to add code sample
45+
{{< / code-panel >}}
46+
{{< code-panel language="javascript" >}}
47+
// Please raise a PR to add code sample
48+
{{< / code-panel >}}
49+
{{< code-panel language="kotlin" >}}
50+
// Please raise a PR to add code sample
51+
{{< / code-panel >}}
52+
{{< / code-tab >}}
53+
54+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
title: "Chrome Devtools"
3+
weight: 10
4+
---
5+
6+
{{% notice info %}}
7+
<i class="fas fa-language"></i> Page being translated from
8+
English to Japanese. Do you speak Japanese? Help us to translate
9+
it by sending us pull requests!
10+
{{% /notice %}}
11+
12+
Selenium 4 alpha versions have much awaited native support for Chrome Dev Protocol through "DevTools" interface. This helps us getting Chrome Development properties such as Application Cache, Fetch, Network, Performance, Profiler, Resource Timing, Security and Target CDP domains etc.
13+
14+
Chrome DevTools is a set of web developer tools built directly into the Google Chrome browser. DevTools can help you edit pages on-the-fly and diagnose problems quickly, which ultimately helps you build better websites, faster.
15+
16+
## Emulate Geo Location:
17+
18+
Some applications have different features and functionalities across different locations. Automating such applications is difficult because it is hard to emulate the geo locations in the browser using Selenium. But with the help of Devtools, we can easily emulate them. Below code snippet demonstrates that.
19+
20+
{{< code-tab >}}
21+
{{< code-panel language="java" >}}
22+
import org.openqa.selenium.chrome.ChromeDriver;
23+
import org.openqa.selenium.devtools.DevTools;
24+
25+
public void geoLocationTest(){
26+
ChromeDriver driver = new ChromeDriver();
27+
Map coordinates = new HashMap()
28+
{{
29+
put("latitude", 50.2334);
30+
put("longitude", 0.2334);
31+
put("accuracy", 1);
32+
}};
33+
driver.executeCdpCommand("Emulation.setGeolocationOverride", coordinates);
34+
driver.get("<your site url>");
35+
}
36+
{{< / code-panel >}}
37+
{{< code-panel language="python" >}}
38+
# Please raise a PR to add code sample
39+
{{< / code-panel >}}
40+
{{< code-panel language="csharp" >}}
41+
// Please raise a PR to add code sample
42+
{{< / code-panel >}}
43+
{{< code-panel language="ruby" >}}
44+
# Please raise a PR to add code sample
45+
{{< / code-panel >}}
46+
{{< code-panel language="javascript" >}}
47+
// Please raise a PR to add code sample
48+
{{< / code-panel >}}
49+
{{< code-panel language="kotlin" >}}
50+
// Please raise a PR to add code sample
51+
{{< / code-panel >}}
52+
{{< / code-tab >}}
53+
54+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
title: "Chrome Devtools"
3+
weight: 10
4+
---
5+
6+
{{% notice info %}}
7+
<i class="fas fa-language"></i> Page being translated from
8+
English to Korean. Do you speak Korean? Help us to translate
9+
it by sending us pull requests!
10+
{{% /notice %}}
11+
12+
Selenium 4 alpha versions have much awaited native support for Chrome Dev Protocol through "DevTools" interface. This helps us getting Chrome Development properties such as Application Cache, Fetch, Network, Performance, Profiler, Resource Timing, Security and Target CDP domains etc.
13+
14+
Chrome DevTools is a set of web developer tools built directly into the Google Chrome browser. DevTools can help you edit pages on-the-fly and diagnose problems quickly, which ultimately helps you build better websites, faster.
15+
16+
## Emulate Geo Location:
17+
18+
Some applications have different features and functionalities across different locations. Automating such applications is difficult because it is hard to emulate the geo locations in the browser using Selenium. But with the help of Devtools, we can easily emulate them. Below code snippet demonstrates that.
19+
20+
{{< code-tab >}}
21+
{{< code-panel language="java" >}}
22+
import org.openqa.selenium.chrome.ChromeDriver;
23+
import org.openqa.selenium.devtools.DevTools;
24+
25+
public void geoLocationTest(){
26+
ChromeDriver driver = new ChromeDriver();
27+
Map coordinates = new HashMap()
28+
{{
29+
put("latitude", 50.2334);
30+
put("longitude", 0.2334);
31+
put("accuracy", 1);
32+
}};
33+
driver.executeCdpCommand("Emulation.setGeolocationOverride", coordinates);
34+
driver.get("<your site url>");
35+
}
36+
{{< / code-panel >}}
37+
{{< code-panel language="python" >}}
38+
# Please raise a PR to add code sample
39+
{{< / code-panel >}}
40+
{{< code-panel language="csharp" >}}
41+
// Please raise a PR to add code sample
42+
{{< / code-panel >}}
43+
{{< code-panel language="ruby" >}}
44+
# Please raise a PR to add code sample
45+
{{< / code-panel >}}
46+
{{< code-panel language="javascript" >}}
47+
// Please raise a PR to add code sample
48+
{{< / code-panel >}}
49+
{{< code-panel language="kotlin" >}}
50+
// Please raise a PR to add code sample
51+
{{< / code-panel >}}
52+
{{< / code-tab >}}
53+
54+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
title: "Chrome Devtools"
3+
weight: 10
4+
---
5+
6+
{{% notice info %}}
7+
<i class="fas fa-language"></i> Page being translated from
8+
English to Dutch. Do you speak Dutch? Help us to translate
9+
it by sending us pull requests!
10+
{{% /notice %}}
11+
12+
Selenium 4 alpha versions have much awaited native support for Chrome Dev Protocol through "DevTools" interface. This helps us getting Chrome Development properties such as Application Cache, Fetch, Network, Performance, Profiler, Resource Timing, Security and Target CDP domains etc.
13+
14+
Chrome DevTools is a set of web developer tools built directly into the Google Chrome browser. DevTools can help you edit pages on-the-fly and diagnose problems quickly, which ultimately helps you build better websites, faster.
15+
16+
## Emulate Geo Location:
17+
18+
Some applications have different features and functionalities across different locations. Automating such applications is difficult because it is hard to emulate the geo locations in the browser using Selenium. But with the help of Devtools, we can easily emulate them. Below code snippet demonstrates that.
19+
20+
{{< code-tab >}}
21+
{{< code-panel language="java" >}}
22+
import org.openqa.selenium.chrome.ChromeDriver;
23+
import org.openqa.selenium.devtools.DevTools;
24+
25+
public void geoLocationTest(){
26+
ChromeDriver driver = new ChromeDriver();
27+
Map coordinates = new HashMap()
28+
{{
29+
put("latitude", 50.2334);
30+
put("longitude", 0.2334);
31+
put("accuracy", 1);
32+
}};
33+
driver.executeCdpCommand("Emulation.setGeolocationOverride", coordinates);
34+
driver.get("<your site url>");
35+
}
36+
{{< / code-panel >}}
37+
{{< code-panel language="python" >}}
38+
# Please raise a PR to add code sample
39+
{{< / code-panel >}}
40+
{{< code-panel language="csharp" >}}
41+
// Please raise a PR to add code sample
42+
{{< / code-panel >}}
43+
{{< code-panel language="ruby" >}}
44+
# Please raise a PR to add code sample
45+
{{< / code-panel >}}
46+
{{< code-panel language="javascript" >}}
47+
// Please raise a PR to add code sample
48+
{{< / code-panel >}}
49+
{{< code-panel language="kotlin" >}}
50+
// Please raise a PR to add code sample
51+
{{< / code-panel >}}
52+
{{< / code-tab >}}
53+
54+

0 commit comments

Comments
 (0)