From 7a9a3d2caab99ef3d30fb7c9e805bdcf60ad9669 Mon Sep 17 00:00:00 2001 From: Dextroz <25749668+Dextroz@users.noreply.github.com> Date: Mon, 14 Oct 2019 19:08:52 +0100 Subject: [PATCH] Added switch SupressLogging to Start-SeFirefox. --- Selenium.psm1 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Selenium.psm1 b/Selenium.psm1 index 2249b68..28ed422 100644 --- a/Selenium.psm1 +++ b/Selenium.psm1 @@ -156,7 +156,8 @@ function Start-SeFirefox { [switch]$PrivateBrowsing, [switch]$Maximized, [switch]$Minimized, - [switch]$Fullscreen + [switch]$Fullscreen, + [switch]$SuppressLogging ) BEGIN{ @@ -199,6 +200,11 @@ function Start-SeFirefox { } } + if($SuppressLogging){ + # Sets GeckoDriver log level to Fatal. + $Firefox_Options.LogLevel = 6 + } + if($IsLinux -or $IsMacOS){ $Driver = New-Object -TypeName "OpenQA.Selenium.Firefox.FirefoxDriver" -ArgumentList $AssembliesPath,$Firefox_Options }