diff --git a/Aquality.Selenium/src/Aquality.Selenium/Aquality.Selenium.csproj b/Aquality.Selenium/src/Aquality.Selenium/Aquality.Selenium.csproj index eda5c722..7896e84d 100644 --- a/Aquality.Selenium/src/Aquality.Selenium/Aquality.Selenium.csproj +++ b/Aquality.Selenium/src/Aquality.Selenium/Aquality.Selenium.csproj @@ -59,7 +59,7 @@ - + diff --git a/Aquality.Selenium/src/Aquality.Selenium/Browsers/Browser.cs b/Aquality.Selenium/src/Aquality.Selenium/Browsers/Browser.cs index 4e61513f..1ec74c60 100644 --- a/Aquality.Selenium/src/Aquality.Selenium/Browsers/Browser.cs +++ b/Aquality.Selenium/src/Aquality.Selenium/Browsers/Browser.cs @@ -29,8 +29,8 @@ public class Browser : IApplication public Browser(RemoteWebDriver webDriver, IServiceProvider serviceProvider) { Driver = webDriver; - Logger = serviceProvider.GetRequiredService(); - LocalizationManager = serviceProvider.GetRequiredService(); + Logger = serviceProvider.GetRequiredService(); + LocalizationManager = serviceProvider.GetRequiredService(); browserProfile = serviceProvider.GetRequiredService(); conditionalWait = serviceProvider.GetRequiredService(); var timeoutConfiguration = serviceProvider.GetRequiredService(); @@ -39,9 +39,9 @@ public Browser(RemoteWebDriver webDriver, IServiceProvider serviceProvider) SetScriptTimeout(timeoutConfiguration.Script); } - private LocalizationLogger Logger { get; } + private ILocalizedLogger Logger { get; } - private LocalizationManager LocalizationManager { get; } + private ILocalizationManager LocalizationManager { get; } /// /// Gets instance of Selenium WebDriver. diff --git a/Aquality.Selenium/src/Aquality.Selenium/Browsers/BrowserManager.cs b/Aquality.Selenium/src/Aquality.Selenium/Browsers/BrowserManager.cs index 4dc3a1d4..a7b6a4fb 100644 --- a/Aquality.Selenium/src/Aquality.Selenium/Browsers/BrowserManager.cs +++ b/Aquality.Selenium/src/Aquality.Selenium/Browsers/BrowserManager.cs @@ -17,7 +17,7 @@ namespace Aquality.Selenium.Browsers /// /// Controls browser instance creation. /// - public class BrowserManager : ApplicationManager + public class BrowserManager : ApplicationManager { private static readonly ThreadLocal BrowserFactoryContainer = new ThreadLocal(); diff --git a/Aquality.Selenium/src/Aquality.Selenium/Browsers/BrowserNavigation.cs b/Aquality.Selenium/src/Aquality.Selenium/Browsers/BrowserNavigation.cs index 5a43059f..89a2b92c 100644 --- a/Aquality.Selenium/src/Aquality.Selenium/Browsers/BrowserNavigation.cs +++ b/Aquality.Selenium/src/Aquality.Selenium/Browsers/BrowserNavigation.cs @@ -17,7 +17,7 @@ internal BrowserNavigation(RemoteWebDriver driver) this.driver = driver; } - private LocalizationLogger Logger => BrowserManager.GetRequiredService(); + private ILocalizedLogger Logger => BrowserManager.GetRequiredService(); /// /// Navigates back. diff --git a/Aquality.Selenium/src/Aquality.Selenium/Elements/Actions/CheckBoxJsActions.cs b/Aquality.Selenium/src/Aquality.Selenium/Elements/Actions/CheckBoxJsActions.cs index 5bbaae06..6106a8cc 100644 --- a/Aquality.Selenium/src/Aquality.Selenium/Elements/Actions/CheckBoxJsActions.cs +++ b/Aquality.Selenium/src/Aquality.Selenium/Elements/Actions/CheckBoxJsActions.cs @@ -10,7 +10,7 @@ namespace Aquality.Selenium.Elements.Actions /// public class CheckBoxJsActions : JsActions { - public CheckBoxJsActions(IElement element, string elementType, LocalizationLogger logger, IBrowserProfile browserProfile) + public CheckBoxJsActions(IElement element, string elementType, ILocalizedLogger logger, IBrowserProfile browserProfile) : base(element, elementType, logger, browserProfile) { } diff --git a/Aquality.Selenium/src/Aquality.Selenium/Elements/Actions/ComboBoxJsActions.cs b/Aquality.Selenium/src/Aquality.Selenium/Elements/Actions/ComboBoxJsActions.cs index fc823d0a..c3538b3f 100644 --- a/Aquality.Selenium/src/Aquality.Selenium/Elements/Actions/ComboBoxJsActions.cs +++ b/Aquality.Selenium/src/Aquality.Selenium/Elements/Actions/ComboBoxJsActions.cs @@ -12,7 +12,7 @@ namespace Aquality.Selenium.Elements.Actions /// public class ComboBoxJsActions : JsActions { - public ComboBoxJsActions(IElement element, string elementType, LocalizationLogger logger, IBrowserProfile browserProfile) + public ComboBoxJsActions(IElement element, string elementType, ILocalizedLogger logger, IBrowserProfile browserProfile) : base(element, elementType, logger, browserProfile) { } diff --git a/Aquality.Selenium/src/Aquality.Selenium/Elements/Actions/JsActions.cs b/Aquality.Selenium/src/Aquality.Selenium/Elements/Actions/JsActions.cs index df8e0965..aec04fc5 100644 --- a/Aquality.Selenium/src/Aquality.Selenium/Elements/Actions/JsActions.cs +++ b/Aquality.Selenium/src/Aquality.Selenium/Elements/Actions/JsActions.cs @@ -19,7 +19,7 @@ public class JsActions private readonly string elementType; private readonly IBrowserProfile browserProfile; - public JsActions(IElement element, string elementType, LocalizationLogger logger, IBrowserProfile browserProfile) + public JsActions(IElement element, string elementType, ILocalizedLogger logger, IBrowserProfile browserProfile) { this.element = element; this.elementType = elementType; @@ -29,7 +29,7 @@ public JsActions(IElement element, string elementType, LocalizationLogger logger private Browser Browser => BrowserManager.Browser; - protected LocalizationLogger Logger { get; } + protected ILocalizedLogger Logger { get; } /// /// Perfroms click on element and waits for page is loaded. diff --git a/Aquality.Selenium/src/Aquality.Selenium/Elements/Actions/MouseActions.cs b/Aquality.Selenium/src/Aquality.Selenium/Elements/Actions/MouseActions.cs index 70181cc4..1e3d8703 100644 --- a/Aquality.Selenium/src/Aquality.Selenium/Elements/Actions/MouseActions.cs +++ b/Aquality.Selenium/src/Aquality.Selenium/Elements/Actions/MouseActions.cs @@ -17,10 +17,10 @@ public class MouseActions { private readonly IElement element; private readonly string elementType; - private readonly LocalizationLogger logger; + private readonly ILocalizedLogger logger; private readonly ElementActionRetrier elementActionsRetrier; - public MouseActions(IElement element, string elementType, LocalizationLogger logger, ElementActionRetrier elementActionsRetrier) + public MouseActions(IElement element, string elementType, ILocalizedLogger logger, ElementActionRetrier elementActionsRetrier) { this.element = element; this.elementType = elementType; diff --git a/Aquality.Selenium/src/Aquality.Selenium/Elements/CheckBox.cs b/Aquality.Selenium/src/Aquality.Selenium/Elements/CheckBox.cs index 4c96da8e..fdd48fdd 100644 --- a/Aquality.Selenium/src/Aquality.Selenium/Elements/CheckBox.cs +++ b/Aquality.Selenium/src/Aquality.Selenium/Elements/CheckBox.cs @@ -25,7 +25,7 @@ public bool IsChecked } } - public new CheckBoxJsActions JsActions => new CheckBoxJsActions(this, ElementType, LocalizationLogger, BrowserProfile); + public new CheckBoxJsActions JsActions => new CheckBoxJsActions(this, ElementType, LocalizedLogger, BrowserProfile); public void Check() { diff --git a/Aquality.Selenium/src/Aquality.Selenium/Elements/ComboBox.cs b/Aquality.Selenium/src/Aquality.Selenium/Elements/ComboBox.cs index f785baa7..4bbdda30 100644 --- a/Aquality.Selenium/src/Aquality.Selenium/Elements/ComboBox.cs +++ b/Aquality.Selenium/src/Aquality.Selenium/Elements/ComboBox.cs @@ -41,7 +41,7 @@ public IList Values } } - public new ComboBoxJsActions JsActions => new ComboBoxJsActions(this, ElementType, LocalizationLogger, BrowserProfile); + public new ComboBoxJsActions JsActions => new ComboBoxJsActions(this, ElementType, LocalizedLogger, BrowserProfile); public void SelectByContainingText(string text) { diff --git a/Aquality.Selenium/src/Aquality.Selenium/Elements/Element.cs b/Aquality.Selenium/src/Aquality.Selenium/Elements/Element.cs index 2bf4b28e..045b4f65 100644 --- a/Aquality.Selenium/src/Aquality.Selenium/Elements/Element.cs +++ b/Aquality.Selenium/src/Aquality.Selenium/Elements/Element.cs @@ -28,9 +28,9 @@ protected Element(By locator, string name, ElementState state) : base(locator, n protected IBrowserProfile BrowserProfile => BrowserManager.GetRequiredService(); - public JsActions JsActions => new JsActions(this, ElementType, LocalizationLogger, BrowserProfile); + public JsActions JsActions => new JsActions(this, ElementType, LocalizedLogger, BrowserProfile); - public MouseActions MouseActions => new MouseActions(this, ElementType, LocalizationLogger, ActionRetrier); + public MouseActions MouseActions => new MouseActions(this, ElementType, LocalizedLogger, ActionRetrier); private Browser Browser => (Browser)Application; @@ -44,9 +44,9 @@ protected Element(By locator, string name, ElementState state) : base(locator, n protected override CoreElementFinder Finder => BrowserManager.GetRequiredService(); - protected override LocalizationLogger LocalizationLogger => BrowserManager.GetRequiredService(); + protected override ILocalizedLogger LocalizedLogger => BrowserManager.GetRequiredService(); - protected LocalizationManager LocalizationManager => BrowserManager.GetRequiredService(); + protected ILocalizationManager LocalizationManager => BrowserManager.GetRequiredService(); protected override ConditionalWait ConditionalWait => BrowserManager.GetRequiredService(); diff --git a/Aquality.Selenium/src/Aquality.Selenium/Elements/ElementFactory.cs b/Aquality.Selenium/src/Aquality.Selenium/Elements/ElementFactory.cs index ef33b5fa..db52289b 100644 --- a/Aquality.Selenium/src/Aquality.Selenium/Elements/ElementFactory.cs +++ b/Aquality.Selenium/src/Aquality.Selenium/Elements/ElementFactory.cs @@ -17,7 +17,7 @@ namespace Aquality.Selenium.Elements /// public class ElementFactory : CoreFactory, IElementFactory { - public ElementFactory(ConditionalWait conditionalWait, IElementFinder elementFinder, LocalizationManager localizationManager) + public ElementFactory(ConditionalWait conditionalWait, IElementFinder elementFinder, ILocalizationManager localizationManager) : base(conditionalWait, elementFinder, localizationManager) { } diff --git a/Aquality.Selenium/src/Aquality.Selenium/Forms/Form.cs b/Aquality.Selenium/src/Aquality.Selenium/Forms/Form.cs index 94cab104..f7b707c1 100644 --- a/Aquality.Selenium/src/Aquality.Selenium/Forms/Form.cs +++ b/Aquality.Selenium/src/Aquality.Selenium/Forms/Form.cs @@ -36,7 +36,7 @@ protected Form(By locator, string name) /// Instance of logger /// /// Logger instance. - protected LocalizationLogger Logger => BrowserManager.GetRequiredService(); + protected ILocalizedLogger Logger => BrowserManager.GetRequiredService(); /// /// Element factory diff --git a/Aquality.Selenium/tests/Aquality.Selenium.Tests/Resources/settings.json b/Aquality.Selenium/tests/Aquality.Selenium.Tests/Resources/settings.json index 4412b55e..627fe996 100644 --- a/Aquality.Selenium/tests/Aquality.Selenium.Tests/Resources/settings.json +++ b/Aquality.Selenium/tests/Aquality.Selenium.Tests/Resources/settings.json @@ -73,4 +73,4 @@ "logger": { "language": "en" } -} \ No newline at end of file +} diff --git a/Aquality.Selenium/tests/Aquality.Selenium.Tests/Resources/settings.local.json b/Aquality.Selenium/tests/Aquality.Selenium.Tests/Resources/settings.local.json index 997953f6..c647a38d 100644 --- a/Aquality.Selenium/tests/Aquality.Selenium.Tests/Resources/settings.local.json +++ b/Aquality.Selenium/tests/Aquality.Selenium.Tests/Resources/settings.local.json @@ -77,4 +77,4 @@ "logger": { "language": "en" } -} \ No newline at end of file +}