File tree Expand file tree Collapse file tree 8 files changed +96
-8
lines changed
docs_source_files/content/support_packages Expand file tree Collapse file tree 8 files changed +96
-8
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,18 @@ public void geoLocationTest(){
35
35
}
36
36
{{< / code-panel >}}
37
37
{{< code-panel language="python" >}}
38
- # Please raise a PR to add code sample
38
+ from selenium import webdriver
39
+ from selenium.webdriver.chrome.service import Service
40
+
41
+ def geoLocationTest():
42
+ driver = webdriver.Chrome()
43
+ Map_coordinates = dict({
44
+ "latitude": 41.8781,
45
+ "longitude": -87.6298,
46
+ "accuracy": 100
47
+ })
48
+ driver.execute_cdp_cmd("Emulation.setGeolocationOverride", Map_coordinates)
49
+ driver.get("<your site url >")
39
50
{{< / code-panel >}}
40
51
{{< code-panel language="csharp" >}}
41
52
using System.Threading.Tasks;
Original file line number Diff line number Diff line change @@ -35,7 +35,18 @@ public void geoLocationTest(){
35
35
}
36
36
{{< / code-panel >}}
37
37
{{< code-panel language="python" >}}
38
- # Please raise a PR to add code sample
38
+ from selenium import webdriver
39
+ from selenium.webdriver.chrome.service import Service
40
+
41
+ def geoLocationTest():
42
+ driver = webdriver.Chrome()
43
+ Map_coordinates = dict({
44
+ "latitude": 41.8781,
45
+ "longitude": -87.6298,
46
+ "accuracy": 100
47
+ })
48
+ driver.execute_cdp_cmd("Emulation.setGeolocationOverride", Map_coordinates)
49
+ driver.get("<your site url >")
39
50
{{< / code-panel >}}
40
51
{{< code-panel language="csharp" >}}
41
52
using System.Threading.Tasks;
Original file line number Diff line number Diff line change @@ -35,7 +35,18 @@ public void geoLocationTest(){
35
35
}
36
36
{{< / code-panel >}}
37
37
{{< code-panel language="python" >}}
38
- # Please raise a PR to add code sample
38
+ from selenium import webdriver
39
+ from selenium.webdriver.chrome.service import Service
40
+
41
+ def geoLocationTest():
42
+ driver = webdriver.Chrome()
43
+ Map_coordinates = dict({
44
+ "latitude": 41.8781,
45
+ "longitude": -87.6298,
46
+ "accuracy": 100
47
+ })
48
+ driver.execute_cdp_cmd("Emulation.setGeolocationOverride", Map_coordinates)
49
+ driver.get("<your site url >")
39
50
{{< / code-panel >}}
40
51
{{< code-panel language="csharp" >}}
41
52
using System.Threading.Tasks;
Original file line number Diff line number Diff line change @@ -39,7 +39,18 @@ public void geoLocationTest(){
39
39
}
40
40
{{< / code-panel >}}
41
41
{{< code-panel language="python" >}}
42
- # Please raise a PR to add code sample
42
+ from selenium import webdriver
43
+ from selenium.webdriver.chrome.service import Service
44
+
45
+ def geoLocationTest():
46
+ driver = webdriver.Chrome()
47
+ Map_coordinates = dict({
48
+ "latitude": 41.8781,
49
+ "longitude": -87.6298,
50
+ "accuracy": 100
51
+ })
52
+ driver.execute_cdp_cmd("Emulation.setGeolocationOverride", Map_coordinates)
53
+ driver.get("<your site url >")
43
54
{{< / code-panel >}}
44
55
{{< code-panel language="csharp" >}}
45
56
using System.Threading.Tasks;
Original file line number Diff line number Diff line change @@ -35,7 +35,18 @@ public void geoLocationTest(){
35
35
}
36
36
{{< / code-panel >}}
37
37
{{< code-panel language="python" >}}
38
- # Please raise a PR to add code sample
38
+ from selenium import webdriver
39
+ from selenium.webdriver.chrome.service import Service
40
+
41
+ def geoLocationTest():
42
+ driver = webdriver.Chrome()
43
+ Map_coordinates = dict({
44
+ "latitude": 41.8781,
45
+ "longitude": -87.6298,
46
+ "accuracy": 100
47
+ })
48
+ driver.execute_cdp_cmd("Emulation.setGeolocationOverride", Map_coordinates)
49
+ driver.get("<your site url >")
39
50
{{< / code-panel >}}
40
51
{{< code-panel language="csharp" >}}
41
52
using System.Threading.Tasks;
Original file line number Diff line number Diff line change @@ -35,7 +35,18 @@ public void geoLocationTest(){
35
35
}
36
36
{{< / code-panel >}}
37
37
{{< code-panel language="python" >}}
38
- # Please raise a PR to add code sample
38
+ from selenium import webdriver
39
+ from selenium.webdriver.chrome.service import Service
40
+
41
+ def geoLocationTest():
42
+ driver = webdriver.Chrome()
43
+ Map_coordinates = dict({
44
+ "latitude": 41.8781,
45
+ "longitude": -87.6298,
46
+ "accuracy": 100
47
+ })
48
+ driver.execute_cdp_cmd("Emulation.setGeolocationOverride", Map_coordinates)
49
+ driver.get("<your site url >")
39
50
{{< / code-panel >}}
40
51
{{< code-panel language="csharp" >}}
41
52
using System.Threading.Tasks;
Original file line number Diff line number Diff line change @@ -29,7 +29,18 @@ public void geoLocationTest(){
29
29
}
30
30
{{< / code-panel >}}
31
31
{{< code-panel language="python" >}}
32
- # Por favor inclua um PR para adicionar um exemplo de código
32
+ from selenium import webdriver
33
+ from selenium.webdriver.chrome.service import Service
34
+
35
+ def geoLocationTest():
36
+ driver = webdriver.Chrome()
37
+ Map_coordinates = dict({
38
+ "latitude": 41.8781,
39
+ "longitude": -87.6298,
40
+ "accuracy": 100
41
+ })
42
+ driver.execute_cdp_cmd("Emulation.setGeolocationOverride", Map_coordinates)
43
+ driver.get("<your site url >")
33
44
{{< / code-panel >}}
34
45
{{< code-panel language="csharp" >}}
35
46
using System.Threading.Tasks;
Original file line number Diff line number Diff line change @@ -29,7 +29,18 @@ public void geoLocationTest(){
29
29
}
30
30
{{< / code-panel >}}
31
31
{{< code-panel language="python" >}}
32
- # Please raise a PR to add code sample
32
+ from selenium import webdriver
33
+ from selenium.webdriver.chrome.service import Service
34
+
35
+ def geoLocationTest():
36
+ driver = webdriver.Chrome()
37
+ Map_coordinates = dict({
38
+ "latitude": 41.8781,
39
+ "longitude": -87.6298,
40
+ "accuracy": 100
41
+ })
42
+ driver.execute_cdp_cmd("Emulation.setGeolocationOverride", Map_coordinates)
43
+ driver.get("<your site url >")
33
44
{{< / code-panel >}}
34
45
{{< code-panel language="csharp" >}}
35
46
using System.Threading.Tasks;
You can’t perform that action at this time.
0 commit comments