Skip to content

Commit a8f9785

Browse files
aguspeharsha509
andauthored
[rb] Add network conditions special features examples (#1717)[deploy site]
Add network conditions special features examples Co-authored-by: aguspe <[email protected]> Co-authored-by: Sri Harsha <[email protected]>
1 parent 0851b67 commit a8f9785

File tree

5 files changed

+14
-4
lines changed

5 files changed

+14
-4
lines changed

examples/ruby/spec/browsers/chrome_spec.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,16 @@
123123
expect { @driver.stop_casting(device_name) }.not_to raise_exception
124124
end
125125
end
126+
127+
it 'gets and sets network conditions' do
128+
@driver = Selenium::WebDriver.for :chrome
129+
@driver.network_conditions = {offline: false, latency: 100, throughput: 200}
130+
expect(@driver.network_conditions).to eq(
131+
'offline' => false,
132+
'latency' => 100,
133+
'download_throughput' => 200,
134+
'upload_throughput' => 200)
135+
end
126136
end
127137

128138
def driver_finder

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ You can simulate various network conditions.
405405
{{< badge-code >}}
406406
{{< /tab >}}
407407
{{< tab header="Ruby" >}}
408-
{{< badge-code >}}
408+
{{< gh-codeblock path="/examples/ruby/spec/browsers/chrome_spec.rb#L129" >}}
409409
{{< /tab >}}
410410
{{< tab header="JavaScript" >}}
411411
{{< badge-code >}}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ please refer to the
411411
{{< badge-code >}}
412412
{{< /tab >}}
413413
{{< tab header="Ruby" >}}
414-
{{< badge-code >}}
414+
{{< gh-codeblock path="/examples/ruby/spec/browsers/chrome_spec.rb#L129" >}}
415415
{{< /tab >}}
416416
{{< tab header="JavaScript" >}}
417417
{{< badge-code >}}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ please refer to the
408408
{{< badge-code >}}
409409
{{< /tab >}}
410410
{{< tab header="Ruby" >}}
411-
{{< badge-code >}}
411+
{{< gh-codeblock path="/examples/ruby/spec/browsers/chrome_spec.rb#L129" >}}
412412
{{< /tab >}}
413413
{{< tab header="JavaScript" >}}
414414
{{< badge-code >}}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ please refer to the
407407
{{< badge-code >}}
408408
{{< /tab >}}
409409
{{< tab header="Ruby" >}}
410-
{{< badge-code >}}
410+
{{< gh-codeblock path="/examples/ruby/spec/browsers/chrome_spec.rb#L129" >}}
411411
{{< /tab >}}
412412
{{< tab header="JavaScript" >}}
413413
{{< badge-code >}}

0 commit comments

Comments
 (0)