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-
31require 'spec_helper'
42
53RSpec . 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
617end
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
1717{{< badge-code >}}
1818{{< /tab >}}
1919{{< tab header="Ruby" >}}
20- {{< badge-code >}}
20+ {{< gh-codeblock path="examples/ruby/spec/drivers/http_client_spec.rb#L9-L10" >}}
2121{{< /tab >}}
2222{{< tab header="JavaScript" >}}
2323{{< 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
1717{{< badge-code >}}
1818{{< /tab >}}
1919{{< tab header="Ruby" >}}
20- {{< badge-code >}}
20+ {{< gh-codeblock path="examples/ruby/spec/drivers/http_client_spec.rb#L9-L10" >}}
2121{{< /tab >}}
2222{{< tab header="JavaScript" >}}
2323{{< 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
1717{{< badge-code >}}
1818{{< /tab >}}
1919{{< tab header="Ruby" >}}
20- {{< badge-code >}}
20+ {{< gh-codeblock path="examples/ruby/spec/drivers/http_client_spec.rb#L9-L10" >}}
2121{{< /tab >}}
2222{{< tab header="JavaScript" >}}
2323{{< badge-code >}}
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ weight: 3
1717{{< badge-code >}}
1818{{< /tab >}}
1919{{< tab header="Ruby" >}}
20- {{< badge-code >}}
20+ {{< gh-codeblock path="examples/ruby/spec/drivers/http_client_spec.rb#L9-L10" >}}
2121{{< /tab >}}
2222{{< tab header="JavaScript" >}}
2323{{< badge-code >}}
You can’t perform that action at this time.
0 commit comments