Bug 1407969 - Use FirefoxDriverLogLevel for Java example. r?maja_zf draft
authorAndreas Tolfsen <ato@sny.no>
Thu, 12 Oct 2017 12:56:44 +0100
changeset 679241 316dae8b721df47fa4f4a51905996401b580e57a
parent 679240 2f5df44e2006a78f0dcf63680a0be61f82418bf9
child 679242 fd0845038bc99b2fb78d913f9ebe98c8de8941ec
push id84158
push userbmo:ato@sny.no
push dateThu, 12 Oct 2017 12:02:28 +0000
reviewersmaja_zf
bugs1407969
milestone58.0a1
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
testing/geckodriver/doc/TraceLogs.md
--- 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