1

Kann die Ausführlichkeit des Marionettentreibers nicht verwalten !!Wie wird die Ausführlichkeit des Marionettentreibers eingestellt?

Umwelt:

Gecko driver 0.17.0 
Selenium java 3.5.3 
Firefox 52.3 

Versuchte:

FirefoxOptions options = new FirefoxOptions(); 
options.addPreference("log", "{level: info}"); 
DesiredCapabilities ffCapabilities = DesiredCapabilities.firefox(); 
ffCapabilities.setCapability("moz:firefoxOptions", options); 
ffCapabilities.setCapability("marionette", true);           
driver = new FirefoxDriver(ffCapabilities); 

Log Info:

INFO: Preferring the firefox binary in these options (/Applications/Firefox.app/Contents/MacOS/firefox-bin rather than /Applications/Firefox.app/Contents/MacOS/firefox-bin) 
Sep 01, 2017 3:41:19 PM org.openqa.selenium.firefox.FirefoxOptions toCapabilities 
INFO: Preferring the firefox binary in these options (/Applications/Firefox.app/Contents/MacOS/firefox-bin rather than /Applications/Firefox.app/Contents/MacOS/firefox-bin) 
1504276879424 geckodriver  INFO Listening on 127.0.0.1:3902 
1504276879955 addons.manager DEBUG Application has been upgraded 
1504276879998 addons.manager DEBUG Loaded provider scope for resource://gre/modules/addons/XPIProvider.jsm: ["XPIProvider"] 
1504276880006 addons.manager DEBUG Loaded provider scope for resource://gre/modules/LightweightThemeManager.jsm: ["LightweightThemeManager"] 
1504276880014 addons.manager DEBUG Loaded provider scope for resource://gre/modules/addons/GMPProvider.jsm 
1504276880017 addons.manager DEBUG Loaded provider scope for resource://gre/modules/addons/PluginProvider.jsm 
1504276880018 addons.manager DEBUG Starting provider: XPIProvider 
1504276880019 addons.xpi  DEBUG startup 
1504276880019 addons.xpi  INFO SystemAddonInstallLocation directory is missing 
1504276880021 addons.xpi  INFO Mapping [email protected] to /Applications/Firefox.app/Contents/Resources/browser/features/[email protected] 
1504276880021 addons.xpi  INFO Mapping [email protected] to /Applications/Firefox.app/Contents/Resources/browser/features/[email protected] 
1504276880023 addons.xpi  INFO Mapping [email protected] to /Applications/Firefox.app/Contents/Resources/browser/features/[email protected] 
1504276880024 addons.xpi  INFO Mapping [email protected] to /Applications/Firefox.app/Contents/Resources/browser/features/[email protected] 
1504276880025 addons.xpi  INFO Mapping {972ce4c6-7e08-4474-a285-3208198ce6fd} to /Applications/Firefox.app/Contents/Resources/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}.xpi 
1504276880026 addons.xpi  DEBUG checkForChanges 
1504276880027 addons.xpi  INFO SystemAddonInstallLocation directory is missing 
1504276880029 addons.xpi  DEBUG Loaded add-on state from prefs: {} 
1504276880031 addons.xpi  DEBUG New add-on [email protected] in app-system-defaults 
1504276880034 addons.xpi  DEBUG getModTime: Recursive scan of [email protected] 
1504276880035 addons.xpi  DEBUG New add-on [email protected] in app-system-defaults 
1504276880036 addons.xpi  DEBUG getModTime: Recursive scan of [email protected] 
1504276880037 addons.xpi  DEBUG New add-on [email protected] in app-system-defaults 
1504276880038 addons.xpi  DEBUG getModTime: Recursive scan of [email protected] 
1504276880038 addons.xpi  DEBUG New add-on [email protected] in app-system-defaults 
1504276880040 addons.xpi  DEBUG getModTime: Recursive scan of [email protected] 
1504276880043 addons.xpi  DEBUG New add-on {972ce4c6-7e08-4474-a285-3208198ce6fd} in app-global 
1504276880044 addons.xpi  DEBUG getModTime: Recursive scan of {972ce4c6-7e08-4474-a285-3208198ce6fd} 
1504276880045 addons.xpi  DEBUG getInstallState changed: true, state: {"app-system-defaults":{"[email protected]":{"d":"/Applications/Firefox.app/Contents/Resources/browser/features/[email protected]","st":1504018117000},"[email protected]":{"d":"/Applications/Firefox.app/Contents/Resources/browser/features/[email protected]","st":1504018117000},"[email protected]":{"d":"/Applications/Firefox.app/Contents/Resources/browser/features/[email protected]","st":1504018117000},"[email protected]":{"d":"/Applications/Firefox.app/Contents/Resources/browser/features/[email protected]","st":1504018117000}},"app-global":{"{972ce4c6-7e08-4474-a285-3208198ce6fd}":{"d":"/Applications/Firefox.app/Contents/Resources/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}.xpi","st":1504018117000}}} 
1504276880065 addons.xpi-utils  DEBUG Opening XPI database /var/folders/6x/hw5060n54m7gfvnvd9zn_9q40000gn/T/rust_mozprofile.cnQmhI7DMu0T/extensions.json 
1504276880067 addons.xpi-utils  DEBUG New add-on [email protected] installed in app-system-defaults 
*** Blocklist::_loadBlocklistFromFile: blocklist is disabled 
1504276880091 DeferredSave.extensions.json DEBUG Save changes 
1504276880093 addons.xpi-utils  DEBUG New add-on [email protected] installed in app-system-defaults 
1504276880098 DeferredSave.extensions.json DEBUG Starting timer 
1504276880101 DeferredSave.extensions.json DEBUG Save changes 
1504276880102 addons.xpi-utils  DEBUG New add-on [email protected] installed in app-system-defaults 
1504276880118 DeferredSave.extensions.json DEBUG Save changes 
1504276880118 addons.xpi-utils  DEBUG New add-on [email protected] installed in app-system-defaults 
1504276880129 DeferredSave.extensions.json DEBUG Save changes 
1504276880131 addons.xpi-utils  DEBUG New add-on {972ce4c6-7e08-4474-a285-3208198ce6fd} installed in app-global 
1504276880136 DeferredSave.extensions.json DEBUG Save changes 
1504276880137 addons.manager DEBUG Registering startup change 'installed' for [email protected] 
1504276880160 addons.xpi  DEBUG Loading bootstrap scope from /Applications/Firefox.app/Contents/Resources/browser/features/[email protected] 
1504276880171 addons.xpi  DEBUG Calling bootstrap method install on [email protected] version 2.0 
1504276880174 addons.xpi-utils  DEBUG Make addon app-system-defaults:[email protected] visible 
1504276880176 DeferredSave.extensions.json DEBUG Save changes 
1504276880177 addons.manager DEBUG Registering startup change 'installed' for [email protected] 
1504276880179 addons.xpi  DEBUG Loading bootstrap scope from /Applications/Firefox.app/Contents/Resources/browser/features/[email protected] 
1504276880186 addons.xpi  DEBUG Calling bootstrap method install on [email protected] version 1.10 
1504276880192 addons.xpi-utils  DEBUG Make addon app-system-defaults:[email protected] visible 
1504276880201 DeferredSave.extensions.json DEBUG Save changes 
1504276880204 addons.manager DEBUG Registering startup change 'installed' for [email protected] 
1504276880209 addons.xpi  DEBUG Loading bootstrap scope from /Applications/Firefox.app/Contents/Resources/browser/features/[email protected] 
1504276880213 addons.xpi  DEBUG Calling bootstrap method install on [email protected] version 1.0.5 
1504276880213 addons.xpi-utils  DEBUG Make addon app-system-defaults:[email protected] visible 
1504276880214 DeferredSave.extensions.json DEBUG Save changes 
1504276880215 addons.manager DEBUG Registering startup change 'installed' for [email protected] 
1504276880217 addons.xpi  DEBUG Loading bootstrap scope from /Applications/Firefox.app/Contents/Resources/browser/features/[email protected] 
1504276880223 addons.xpi  DEBUG Calling bootstrap method install on [email protected] version 1.0 
1504276880225 addons.xpi-utils  DEBUG Make addon app-system-defaults:[email protected] visible 
1504276880229 DeferredSave.extensions.json DEBUG Save changes 
1504276880230 addons.xpi-utils  DEBUG Make addon app-global:{972ce4c6-7e08-4474-a285-3208198ce6fd} visible 

Antwort

1

Der Standardprotokollebene für geckodriver auf Version von Mozilla Firefox baut auf INFO Pegel gesetzt. Möglicherweise überschreibt Ihr Framework oder die von Ihnen verwendete Sprachenbindung (Java) die Standardeinstellungen.

Wir können die Protokollebene auf eine der beiden folgenden Ebenen:

  • All
  • CONFIG
  • FINE
  • FINER
  • FINEST
  • INFO
  • OFF
  • SEVERE
  • WARNING

Hier ist der Code-Block Protokollebene auf OFF einzustellen:

package demo; 

import java.util.logging.Level; 

import org.openqa.selenium.WebDriver; 
import org.openqa.selenium.firefox.FirefoxDriver; 
import org.openqa.selenium.firefox.FirefoxOptions; 

public class Gecko_TRACE_LOGS 
{ 
    public static void main(String[] args) 
    { 
     System.setProperty("webdriver.gecko.driver", "C:\\Utility\\BrowserDrivers\\geckodriver.exe"); 
     FirefoxOptions options = new FirefoxOptions(); 
     options.setLogLevel(Level.OFF); 
     WebDriver driver = new FirefoxDriver(options); 
     driver.get("https://stackoverflow.com"); 
     System.out.println("Application opened"); 
     System.out.println("Page Title is : "+driver.getTitle()); 
     driver.quit(); 
    } 
} 
+0

Dank für Ihre Antwort, was ist, wenn ich einige Firefox gewünschten Funktionen hinzufügen wollen ?? –

+0

versuchte dies; DesiredCapabilities ffCapabilities = DesiredCapabilities.firefox(); ffCapabilities.setCapability (FirefoxDriver.PROFILE, firefoxProfile()); ffCapabilities.setCapability ("moz: firefoxOptions", ffOptions); internalDriver = neuer FirefoxDriver (ffCapabilities); aber leider Firefox Optionen nicht in Betracht ziehen –

+0

@ Ranjith's Versuchen Sie die 'FirefoxOptions' Klasse, um die Ausführlichkeit einzustellen. Wenn meine Antwort auf Ihre Frage eingegangen ist, akzeptieren Sie bitte ** die Antwort ** und stellen Sie eine neue Frage gemäß Ihrer neuen Anforderung. Wir helfen Ihnen gerne weiter. – DebanjanB

Verwandte Themen