File tree Expand file tree Collapse file tree 5 files changed +17
-6
lines changed
examples/ruby/spec/drivers
website_and_docs/content/documentation/webdriver/drivers Expand file tree Collapse file tree 5 files changed +17
-6
lines changed Original file line number Diff line number Diff line change 1
- # frozen_string_literal: true
2
-
3
1
require 'spec_helper'
4
2
5
3
RSpec . describe 'HTTP Client' do
4
+ let ( :url ) { 'https://www.selenium.dev/selenium/web/' }
5
+
6
+ it 'sets client configuration' do
7
+ client = Selenium ::WebDriver ::Remote ::Http ::Default . new ( open_timeout : 30 , read_timeout : 30 )
8
+ expect ( client . open_timeout ) . to eq 30
9
+ end
10
+
11
+ it 'uses the custom http client' do
12
+ client = Selenium ::WebDriver ::Remote ::Http ::Default . new
13
+ driver = Selenium ::WebDriver . for :chrome , http_client : client
14
+ driver . get ( url )
15
+ driver . quit
16
+ end
6
17
end
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ These allow you to set various parameters for the HTTP library
17
17
{{< badge-code >}}
18
18
{{< /tab >}}
19
19
{{< tab header="Ruby" >}}
20
- {{< badge-code >}}
20
+ {{< gh-codeblock path="examples/ruby/spec/drivers/http_client_spec.rb#L9-L10" >}}
21
21
{{< /tab >}}
22
22
{{< tab header="JavaScript" >}}
23
23
{{< badge-code >}}
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ These allow you to set various parameters for the HTTP library
17
17
{{< badge-code >}}
18
18
{{< /tab >}}
19
19
{{< tab header="Ruby" >}}
20
- {{< badge-code >}}
20
+ {{< gh-codeblock path="examples/ruby/spec/drivers/http_client_spec.rb#L9-L10" >}}
21
21
{{< /tab >}}
22
22
{{< tab header="JavaScript" >}}
23
23
{{< badge-code >}}
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ These allow you to set various parameters for the HTTP library
17
17
{{< badge-code >}}
18
18
{{< /tab >}}
19
19
{{< tab header="Ruby" >}}
20
- {{< badge-code >}}
20
+ {{< gh-codeblock path="examples/ruby/spec/drivers/http_client_spec.rb#L9-L10" >}}
21
21
{{< /tab >}}
22
22
{{< tab header="JavaScript" >}}
23
23
{{< badge-code >}}
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ weight: 3
17
17
{{< badge-code >}}
18
18
{{< /tab >}}
19
19
{{< tab header="Ruby" >}}
20
- {{< badge-code >}}
20
+ {{< gh-codeblock path="examples/ruby/spec/drivers/http_client_spec.rb#L9-L10" >}}
21
21
{{< /tab >}}
22
22
{{< tab header="JavaScript" >}}
23
23
{{< badge-code >}}
You can’t perform that action at this time.
0 commit comments