Bug 1407969 - Use FirefoxDriverLogLevel for Java example. r?maja_zf
The Java client provides two setLogLevel methods in the
FirefoxOptions class. It is recommended to use the one that accepts
FirefoxDriverLogLevel, as the other one is deprecated.
DONTBUILD
Thanks-to: Alexei Barantsev <barancev@gmail.com>
MozReview-Commit-ID: Fc6p7Gxwn5X
--- a/testing/geckodriver/doc/TraceLogs.md
+++ b/testing/geckodriver/doc/TraceLogs.md
@@ -122,18 +122,19 @@ The log output is directed to stdout.
Java
----
The Selenium [Java client] also comes with
a [`org.openqa.selenium.firefox.FirefoxOptions`] helper for
constructing the [`moz:firefoxOptions`] capabilities object:
- FirefoxOptions opts = new FirefoxOptions().setLogLevel(Level.ALL);
- WebDriver driver = new FirefoxDriver(opts);
+ FirefoxOptions options = new FirefoxOptions();
+ options.setLogLevel(FirefoxDriverLogLevel.TRACE);
+ WebDriver driver = new FirefoxDriver(options);
As with C#, the log output is helpfully propagated to stdout.
[Java client]: https://seleniumhq.github.io/selenium/docs/api/java/
[`org.openqa.selenium.firefox.FirefoxOptions`]: https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/firefox/FirefoxOptions.html
Python