From 41eabbfe89de8e2044828c6f48d49dfc2a2e6c1b Mon Sep 17 00:00:00 2001 From: "dmitry.bogatko" Date: Tue, 17 Sep 2024 23:24:28 +0300 Subject: [PATCH] [#262] added unit test to cover getting access to DriverContext --- .../src/Aquality.Selenium/Aquality.Selenium.xml | 6 +++++- .../Aquality.Selenium.Tests/Integration/BrowserTests.cs | 7 +++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Aquality.Selenium/src/Aquality.Selenium/Aquality.Selenium.xml b/Aquality.Selenium/src/Aquality.Selenium/Aquality.Selenium.xml index ad496b6..3a4a92f 100644 --- a/Aquality.Selenium/src/Aquality.Selenium/Aquality.Selenium.xml +++ b/Aquality.Selenium/src/Aquality.Selenium/Aquality.Selenium.xml @@ -70,7 +70,6 @@ Instantiate browser. - Instance of Selenium WebDriver for desired web browser. Context of the webdriver (for example: DriverService is a part of context) @@ -79,6 +78,11 @@ Instance of Selenium WebDriver for desired web browser. + + + Container of WebDriver and other objects which are involved into webdriver instantiation process + + Provides Network Handling functionality diff --git a/Aquality.Selenium/tests/Aquality.Selenium.Tests/Integration/BrowserTests.cs b/Aquality.Selenium/tests/Aquality.Selenium.Tests/Integration/BrowserTests.cs index 0e11466..329ffef 100644 --- a/Aquality.Selenium/tests/Aquality.Selenium.Tests/Integration/BrowserTests.cs +++ b/Aquality.Selenium/tests/Aquality.Selenium.Tests/Integration/BrowserTests.cs @@ -258,5 +258,12 @@ public void Should_BePossibleTo_GetDownloadDir() var downloadDir = AqualityServices.Browser.DownloadDirectory; Assert.That(downloadDir.ToLower().Contains("downloads", StringComparison.InvariantCultureIgnoreCase)); } + + [Test] + public void Should_BePossibleTo_GetAccessToDriverContext() + { + var driverProcessId = AqualityServices.Browser.DriverContext.DriverService?.ProcessId; + Assert.That(driverProcessId, Is.Not.EqualTo(0)); + } } }