File tree 5 files changed +13
-4
lines changed
examples/ruby/spec/browsers
website_and_docs/content/documentation/webdriver/browsers
5 files changed +13
-4
lines changed Original file line number Diff line number Diff line change 135
135
end
136
136
end
137
137
138
+ it 'gets the browser logs' do
139
+ @driver = Selenium ::WebDriver . for :chrome
140
+ @driver . navigate . to 'https://www.selenium.dev/selenium/web/'
141
+ sleep 1
142
+ logs = @driver . logs . get ( :browser )
143
+
144
+ expect ( logs . first . message ) . to include 'Failed to load resource'
145
+ end
146
+
138
147
def driver_finder
139
148
options = Selenium ::WebDriver ::Options . chrome ( browser_version : 'stable' )
140
149
service = Selenium ::WebDriver ::Service . chrome
Original file line number Diff line number Diff line change @@ -428,7 +428,7 @@ You can simulate various network conditions.
428
428
{{< badge-code >}}
429
429
{{< /tab >}}
430
430
{{< tab header="Ruby" >}}
431
- {{< badge-code >}}
431
+ {{< gh-codeblock path="/examples/ruby/spec/browsers/chrome_spec.rb#L142" >}}
432
432
{{< /tab >}}
433
433
{{< tab header="JavaScript" >}}
434
434
{{< badge-code >}}
Original file line number Diff line number Diff line change @@ -434,7 +434,7 @@ please refer to the
434
434
{{< badge-code >}}
435
435
{{< /tab >}}
436
436
{{< tab header="Ruby" >}}
437
- {{< badge-code >}}
437
+ {{< gh-codeblock path="/examples/ruby/spec/browsers/chrome_spec.rb#L142" >}}
438
438
{{< /tab >}}
439
439
{{< tab header="JavaScript" >}}
440
440
{{< badge-code >}}
Original file line number Diff line number Diff line change @@ -431,7 +431,7 @@ please refer to the
431
431
{{< badge-code >}}
432
432
{{< /tab >}}
433
433
{{< tab header="Ruby" >}}
434
- {{< badge-code >}}
434
+ {{< gh-codeblock path="/examples/ruby/spec/browsers/chrome_spec.rb#L142" >}}
435
435
{{< /tab >}}
436
436
{{< tab header="JavaScript" >}}
437
437
{{< badge-code >}}
Original file line number Diff line number Diff line change @@ -430,7 +430,7 @@ please refer to the
430
430
{{< badge-code >}}
431
431
{{< /tab >}}
432
432
{{< tab header="Ruby" >}}
433
- {{< badge-code >}}
433
+ {{< gh-codeblock path="/examples/ruby/spec/browsers/chrome_spec.rb#L142" >}}
434
434
{{< /tab >}}
435
435
{{< tab header="JavaScript" >}}
436
436
{{< badge-code >}}
You can’t perform that action at this time.
0 commit comments