Skip to content

Commit 4417ec5

Browse files
authored
Merge branch 'trunk' into py_selenium_manager
2 parents 729dc42 + 7b20b0f commit 4417ec5

File tree

13 files changed

+81
-44
lines changed

13 files changed

+81
-44
lines changed

examples/python/tests/browsers/test_chrome.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,3 +121,22 @@ def test_build_checks(capfd):
121121
assert expected in err
122122

123123
driver.quit()
124+
125+
126+
def test_set_network_conditions():
127+
driver = webdriver.Chrome()
128+
129+
network_conditions = {
130+
"offline": False,
131+
"latency": 20, # 20 ms of latency
132+
"download_throughput": 2000 * 1024 / 8, # 2000 kbps
133+
"upload_throughput": 2000 * 1024 / 8, # 2000 kbps
134+
}
135+
driver.set_network_conditions(**network_conditions)
136+
137+
driver.get("https://www.selenium.dev")
138+
139+
# check whether the network conditions are set
140+
assert driver.get_network_conditions() == network_conditions
141+
142+
driver.quit()

examples/python/tests/browsers/test_edge.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,3 +122,21 @@ def test_build_checks(log_path):
122122

123123
driver.quit()
124124

125+
126+
def test_set_network_conditions():
127+
driver = webdriver.Edge()
128+
129+
network_conditions = {
130+
"offline": False,
131+
"latency": 20, # 20 ms of latency
132+
"download_throughput": 2000 * 1024 / 8, # 2000 kbps
133+
"upload_throughput": 2000 * 1024 / 8, # 2000 kbps
134+
}
135+
driver.set_network_conditions(**network_conditions)
136+
137+
driver.get("https://www.selenium.dev")
138+
139+
# check whether the network conditions are set
140+
assert driver.get_network_conditions() == network_conditions
141+
142+
driver.quit()

website_and_docs/assets/scss/_links.scss

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
.selenium-link {
22
color: $primary;
3-
border-bottom: 2px solid;
43
transition: 0.3s;
54
}
65

@@ -10,7 +9,6 @@
109

1110
p > a, main a, div > a {
1211
color: $primary !important;
13-
border-bottom: 2px solid;
1412
transition: 0.3s;
1513
}
1614

website_and_docs/content/documentation/webdriver/browsers/chrome.en.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -398,9 +398,9 @@ You can simulate various network conditions.
398398
{{< tab header="Java" >}}
399399
{{< badge-code >}}
400400
{{< /tab >}}
401-
{{% tab header="Python" %}}
402-
{{< badge-code >}}
403-
{{% /tab %}}
401+
{{< tab header="Python" >}}
402+
{{< gh-codeblock path="/examples/python/tests/browsers/test_chrome.py#L129-L135" >}}
403+
{{< /tab >}}
404404
{{< tab header="CSharp" >}}
405405
{{< badge-code >}}
406406
{{< /tab >}}

website_and_docs/content/documentation/webdriver/browsers/chrome.ja.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -392,9 +392,9 @@ Chrome Castデバイスを操作することができ、タブの共有も含ま
392392
{{< tab header="Java" >}}
393393
{{< badge-code >}}
394394
{{< /tab >}}
395-
{{% tab header="Python" %}}
396-
{{< badge-code >}}
397-
{{% /tab %}}
395+
{{< tab header="Python" >}}
396+
{{< gh-codeblock path="/examples/python/tests/browsers/test_chrome.py#L129-L135" >}}
397+
{{< /tab >}}
398398
{{< tab header="CSharp" >}}
399399
{{< badge-code >}}
400400
{{< /tab >}}

website_and_docs/content/documentation/webdriver/browsers/chrome.pt-br.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -401,9 +401,9 @@ please refer to the
401401
{{< tab header="Java" >}}
402402
{{< badge-code >}}
403403
{{< /tab >}}
404-
{{% tab header="Python" %}}
405-
{{< badge-code >}}
406-
{{% /tab %}}
404+
{{< tab header="Python" >}}
405+
{{< gh-codeblock path="/examples/python/tests/browsers/test_chrome.py#L129-L135" >}}
406+
{{< /tab >}}
407407
{{< tab header="CSharp" >}}
408408
{{< badge-code >}}
409409
{{< /tab >}}

website_and_docs/content/documentation/webdriver/browsers/chrome.zh-cn.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -402,9 +402,9 @@ Chromedriver 和 Chrome 浏览器版本应该匹配, 如果它们不匹配, 驱
402402
{{< tab header="Java" >}}
403403
{{< badge-code >}}
404404
{{< /tab >}}
405-
{{% tab header="Python" %}}
406-
{{< badge-code >}}
407-
{{% /tab %}}
405+
{{< tab header="Python" >}}
406+
{{< gh-codeblock path="/examples/python/tests/browsers/test_chrome.py#L129-L135" >}}
407+
{{< /tab >}}
408408
{{< tab header="CSharp" >}}
409409
{{< badge-code >}}
410410
{{< /tab >}}

website_and_docs/content/documentation/webdriver/browsers/edge.en.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -398,9 +398,9 @@ You can simulate various network conditions.
398398
{{< tab header="Java" >}}
399399
{{< badge-code >}}
400400
{{< /tab >}}
401-
{{% tab header="Python" %}}
402-
{{< badge-code >}}
403-
{{% /tab %}}
401+
{{< tab header="Python" >}}
402+
{{< gh-codeblock path="/examples/python/tests/browsers/test_edge.py#L129-L135" >}}
403+
{{< /tab >}}
404404
{{< tab header="CSharp" >}}
405405
{{< badge-code >}}
406406
{{< /tab >}}

website_and_docs/content/documentation/webdriver/browsers/edge.ja.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -384,9 +384,9 @@ Edge を使用して Chrome Cast デバイスを操作し、タブを共有す
384384
{{< tab header="Java" >}}
385385
{{< badge-code >}}
386386
{{< /tab >}}
387-
{{% tab header="Python" %}}
388-
{{< badge-code >}}
389-
{{% /tab %}}
387+
{{< tab header="Python" >}}
388+
{{< gh-codeblock path="/examples/python/tests/browsers/test_edge.py#L129-L135" >}}
389+
{{< /tab >}}
390390
{{< tab header="CSharp" >}}
391391
{{< badge-code >}}
392392
{{< /tab >}}

website_and_docs/content/documentation/webdriver/browsers/edge.pt-br.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -400,9 +400,9 @@ You can simulate various network conditions.
400400
{{< tab header="Java" >}}
401401
{{< badge-code >}}
402402
{{< /tab >}}
403-
{{% tab header="Python" %}}
404-
{{< badge-code >}}
405-
{{% /tab %}}
403+
{{< tab header="Python" >}}
404+
{{< gh-codeblock path="/examples/python/tests/browsers/test_edge.py#L129-L135" >}}
405+
{{< /tab >}}
406406
{{< tab header="CSharp" >}}
407407
{{< badge-code >}}
408408
{{< /tab >}}

website_and_docs/content/documentation/webdriver/browsers/edge.zh-cn.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -400,9 +400,9 @@ You can simulate various network conditions.
400400
{{< tab header="Java" >}}
401401
{{< badge-code >}}
402402
{{< /tab >}}
403-
{{% tab header="Python" %}}
404-
{{< badge-code >}}
405-
{{% /tab %}}
403+
{{< tab header="Python" >}}
404+
{{< gh-codeblock path="/examples/python/tests/browsers/test_edge.py#L129-L135" >}}
405+
{{< /tab >}}
406406
{{< tab header="CSharp" >}}
407407
{{< badge-code >}}
408408
{{< /tab >}}

website_and_docs/package-lock.json

Lines changed: 18 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

website_and_docs/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
"author": "SeleniumHQ",
1010
"license": "Apache-2.0",
1111
"dependencies": {
12-
"autoprefixer": "^10.4.19",
13-
"postcss": "^8.4.40",
12+
"autoprefixer": "^10.4.20",
13+
"postcss": "^8.4.48",
1414
"postcss-cli": "^11.0.0"
1515
}
1616
}

0 commit comments

Comments
 (0)