Adam Thompson Adam Thompson - 18 days ago 8
Ruby Question

How are Selenium logs accessed in the ruby gem?

I am using

browser.driver.manage.logs.get :browser
to get browser logs using
selenium
with
watir
.

However, when I look at the docs,
#manage
on
Selenium::WebDriver::Browser
returns an
Options
object. See here.

Selenium::WebDriver::Options
does not have a
log
method, but yet on the GitHub page there is a
log()
method, see here.

Is this experimental in the ruby gem? Where can I read more about it?

Answer

You are looking at a the documentation for gem version 0.0.28. The latest version is 3.0.1 found here. The GitHub page for the log() method that you shared is for the Java language bindings. The GitHub page for the Ruby language bindings is here

Keep in mind that logs are not available for every browser, and they are not yet defined in the W3C WebDriver Specification