From 7e3ba487f89ce2c391ba79923da03bc37c297385 Mon Sep 17 00:00:00 2001 From: pawelstryczek Date: Fri, 27 Jan 2023 11:13:28 +0100 Subject: [PATCH 01/25] Update Ocaramba to .net 6.0 --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index a50522c1d..bb47106fc 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ /nuget.exe /TestResults /.sonarqube/ +/UpgradeLog.htm From 56bb79ae0fd5f273211d5d9d6e614818d9044e03 Mon Sep 17 00:00:00 2001 From: pawelstryczek Date: Fri, 27 Jan 2023 11:13:52 +0100 Subject: [PATCH 02/25] Update Ocaramba to .net 6.0 --- ExecutingTestsOnDocker.ps1 | 4 +- ExecutingTestsOnLinux.ps1 | 14 +- ExecutingTestsOnWindows.ps1 | 18 +-- .../Ocaramba.Tests.Angular.csproj | 12 +- .../PageObjects/ProtractorApiPage.cs | 2 +- .../PageObjects/ProtractorHomePage.cs | 2 +- .../PageObjects/TableOfContentsPage.cs | 2 +- .../PageObjects/TutorialPage.cs | 2 +- Ocaramba.Tests.Angular/ProjectTestBase.cs | 4 +- ...mba.Tests.CloudProviderCrossBrowser.csproj | 10 +- .../ProjectTestBase.cs | 4 +- .../Ocaramba.Tests.Features.csproj | 12 +- .../TestFeatures/SmokeTests.feature.cs | 142 ++++-------------- .../Ocaramba.Tests.MsTest.csproj | 10 +- .../DataDriven/CompareFiles.cs | 2 +- .../DataDriven/DataDrivenHelper.cs | 2 +- .../Ocaramba.Tests.NUnit.csproj | 10 +- .../ProjectBaseConfiguration.cs | 14 +- Ocaramba.Tests.NUnit/ProjectTestBase.cs | 2 +- .../Tests/CompareFilesDataDrivenTests.cs | 2 +- .../Ocaramba.Tests.NUnitExtentReports.csproj | 10 +- .../Ocaramba.Tests.PageObjects.csproj | 10 +- .../PageObjects/TheInternet/BasicAuthPage.cs | 2 +- .../PageObjects/TheInternet/CheckboxesPage.cs | 2 +- .../PageObjects/TheInternet/DownloadPage.cs | 2 +- .../TheInternet/DynamicLoadingPage.cs | 2 +- .../TheInternet/FloatingMenuPage.cs | 2 +- .../TheInternet/ForgotPasswordPage.cs | 2 +- .../TheInternet/FormAuthenticationPage.cs | 2 +- .../PageObjects/TheInternet/IFramePage.cs | 2 +- .../PageObjects/TheInternet/InternetPage.cs | 2 +- .../PageObjects/TheInternet/KeyPressesPage.cs | 2 +- .../TheInternet/SecureFileDownloadPage.cs | 2 +- .../TheInternet/ShiftingContentPage.cs | 2 +- .../TheInternet/StatusCodesPage.cs | 2 +- .../PageObjects/TheInternet/UploadPage.cs | 2 +- .../Ocaramba.Tests.Xunit.csproj | 11 +- Ocaramba.Tests.Xunit/ProjectTestBase.cs | 2 +- Ocaramba.UnitTests/Ocaramba.UnitTests.csproj | 13 +- Ocaramba.UnitTests/ProjectTestBase.cs | 2 +- .../Tests/DriversCustomSettingsUnitTests.cs | 2 +- Ocaramba.UnitTests/Tests/FilesHelperTests.cs | 2 +- .../Tests/LocatorExtensionsTests.cs | 6 +- Ocaramba.UnitTests/Tests/NameHelperTests.cs | 4 +- .../Tests/TakingScreehShotsOfElementsTests.cs | 2 +- Ocaramba/Helpers/SqlHelper.cs | 2 +- Ocaramba/Ocaramba.csproj | 12 +- OcarambaLite/BaseConfiguration.cs | 109 +++++++------- OcarambaLite/DriverContext.cs | 14 +- OcarambaLite/DriverContextHelper.cs | 45 +++++- .../Extensions/WebDriverExtensions.cs | 21 ++- .../Extensions/WebElementExtensions.cs | 2 +- OcarambaLite/Helpers/FilesHelper.cs | 2 +- OcarambaLite/Helpers/NameHelper.cs | 10 +- OcarambaLite/Helpers/PerformanceHelper.cs | 2 +- .../Helpers/PrintPerformanceResultsHelper.cs | 6 +- OcarambaLite/Logger/MyEventFiringWebDriver.cs | 2 +- OcarambaLite/Logger/TestLogger.cs | 2 +- OcarambaLite/OcarambaLite.csproj | 10 +- OcarambaLite/Verify.cs | 2 +- OcarambaLite/WebElements/Select.cs | 4 +- OcarambaLite/WebElements/Table.cs | 2 +- 62 files changed, 291 insertions(+), 318 deletions(-) diff --git a/ExecutingTestsOnDocker.ps1 b/ExecutingTestsOnDocker.ps1 index 2329faac1..6e7a8cd17 100644 --- a/ExecutingTestsOnDocker.ps1 +++ b/ExecutingTestsOnDocker.ps1 @@ -13,9 +13,9 @@ docker ps -a docker exec ocaramba_selenium sed -i '/Documentation/,+5 d' Ocaramba.sln echo 'build Ocaramba.sln' docker exec ocaramba_selenium dotnet build Ocaramba.sln -docker exec ocaramba_selenium bash -c 'pwsh ./scripts/set_AppConfig_for_tests.ps1 \"./Ocaramba.Tests.NUnit/bin/Debug/netcoreapp3.1\" \"appsettings.Linux.json\" \"appSettings\" \"browser|PathToChromeDriverDirectory\" \"Chrome|/chromedriver\" -logValues -json' +docker exec ocaramba_selenium bash -c 'pwsh ./scripts/set_AppConfig_for_tests.ps1 \"./Ocaramba.Tests.NUnit/bin/Debug/net6.0\" \"appsettings.Linux.json\" \"appSettings\" \"browser|PathToChromeDriverDirectory\" \"Chrome|/chromedriver\" -logValues -json' echo 'execute Ocaramba.sln tests' -docker exec ocaramba_selenium dotnet vstest Ocaramba.Tests.NUnit/bin/Debug/netcoreapp3.1/Ocaramba.Tests.NUnit.dll /TestCaseFilter:"(TestCategory!=NotImplementedInCoreOrUploadDownload)" /Parallel --logger:"trx;LogFileName=Ocaramba.Tests.Docker.xml" +docker exec ocaramba_selenium dotnet vstest Ocaramba.Tests.NUnit/bin/Debug/net6.0/Ocaramba.Tests.NUnit.dll /TestCaseFilter:"(TestCategory!=NotImplementedInCoreOrUploadDownload)" /Parallel --logger:"trx;LogFileName=Ocaramba.Tests.Docker.xml" echo 'Downloading Ocaramba.Tests.Docker.xml' docker cp ocaramba_selenium:/Ocaramba/TestResults/Ocaramba.Tests.Docker.xml . echo 'Uploading Ocaramba.Tests.Docker.xml' diff --git a/ExecutingTestsOnLinux.ps1 b/ExecutingTestsOnLinux.ps1 index df448504b..3315a5c05 100644 --- a/ExecutingTestsOnLinux.ps1 +++ b/ExecutingTestsOnLinux.ps1 @@ -14,13 +14,13 @@ Expand-Archive $TempZipFilePath -DestinationPath $TempFileUnzipPath; echo TempFileUnzipPath: $TempFileUnzipPath dir $TempFileUnzipPath -.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.NUnit\bin\Debug\netcoreapp3.1" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$TempFileUnzipPath" -logValues -json -.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.Angular\bin\Debug\netcoreapp3.1" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$TempFileUnzipPath" -logValues -json -.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.NUnitExtentReports\bin\Debug\netcoreapp3.1" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$TempFileUnzipPath" -logValues -json -.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.Features\bin\Debug\netcoreapp3.1" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$TempFileUnzipPath" -logValues -json -.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.Xunit\bin\Debug\netcoreapp3.1" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$TempFileUnzipPath" -logValues -json -.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.MsTest\bin\Debug\netcoreapp3.1" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$TempFileUnzipPath" -logValues -json -.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.UnitTests\bin\Debug\netcoreapp3.1" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$TempFileUnzipPath" -logValues -json +.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.NUnit\bin\Debug\net6.0" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$TempFileUnzipPath" -logValues -json +.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.Angular\bin\Debug\net6.0" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$TempFileUnzipPath" -logValues -json +.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.NUnitExtentReports\bin\Debug\net6.0" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$TempFileUnzipPath" -logValues -json +.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.Features\bin\Debug\net6.0" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$TempFileUnzipPath" -logValues -json +.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.Xunit\bin\Debug\net6.0" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$TempFileUnzipPath" -logValues -json +.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.MsTest\bin\Debug\net6.0" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$TempFileUnzipPath" -logValues -json +.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.UnitTests\bin\Debug\net6.0" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$TempFileUnzipPath" -logValues -json echo '********************************************Executing tests********************************************' diff --git a/ExecutingTestsOnWindows.ps1 b/ExecutingTestsOnWindows.ps1 index 144b54067..0796c072c 100644 --- a/ExecutingTestsOnWindows.ps1 +++ b/ExecutingTestsOnWindows.ps1 @@ -15,13 +15,13 @@ $TempFileUnzipPath = $TempFilePath.Replace(".tmp", ""); Invoke-WebRequest "https://chromedriver.storage.googleapis.com/$ChromeVersion/chromedriver_win32.zip" -OutFile $TempZipFilePath; Expand-Archive $TempZipFilePath -DestinationPath $TempFileUnzipPath; -.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.NUnit\bin\Debug\netcoreapp3.1" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$TempFileUnzipPath" -logValues -json -.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.Angular\bin\Debug\netcoreapp3.1" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$TempFileUnzipPath" -logValues -json -.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.NUnitExtentReports\bin\Debug\netcoreapp3.1" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$TempFileUnzipPath" -logValues -json -.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.Features\bin\Debug\netcoreapp3.1" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$TempFileUnzipPath" -logValues -json -.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.Xunit\bin\Debug\netcoreapp3.1" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$TempFileUnzipPath" -logValues -json -.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.MsTest\bin\Debug\netcoreapp3.1" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$TempFileUnzipPath" -logValues -json -.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.UnitTests\bin\Debug\netcoreapp3.1" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$TempFileUnzipPath" -logValues -json +.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.NUnit\bin\Debug\net6.0" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$TempFileUnzipPath" -logValues -json +.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.Angular\bin\Debug\net6.0" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$TempFileUnzipPath" -logValues -json +.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.NUnitExtentReports\bin\Debug\net6.0" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$TempFileUnzipPath" -logValues -json +.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.Features\bin\Debug\net6.0" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$TempFileUnzipPath" -logValues -json +.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.Xunit\bin\Debug\net6.0" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$TempFileUnzipPath" -logValues -json +.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.MsTest\bin\Debug\net6.0" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$TempFileUnzipPath" -logValues -json +.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.UnitTests\bin\Debug\net6.0" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$TempFileUnzipPath" -logValues -json .\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.Angular\bin\Debug\net472" "Ocaramba.Tests.Angular.dll.config" "//appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$TempFileUnzipPath" -logValues .\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.NUnit\bin\Debug\net472" "Ocaramba.Tests.NUnit.dll.config" "//appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$TempFileUnzipPath" -logValues .\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.UnitTests\bin\Debug\net472" "Ocaramba.UnitTests.dll.config" "//appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$TempFileUnzipPath" -logValues @@ -83,9 +83,9 @@ echo '********************************************Specflow tests**************** #& nunit3-console.exe .\Ocaramba.Tests.CloudProviderCrossBrowser\bin\Debug\net472\Ocaramba.Tests.CloudProviderCrossBrowser.dll --workers=5 -#.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.CloudProviderCrossBrowser\bin\Debug\netcoreapp3.1" "appsettings.json" "appSettings" "RemoteWebDriverHub" "http://$($env:browserstackuser):$($env:browserstackkey)@hub-cloud.browserstack.com/wd/hub" $false $true +#.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.CloudProviderCrossBrowser\bin\Debug\net6.0" "appsettings.json" "appSettings" "RemoteWebDriverHub" "http://$($env:browserstackuser):$($env:browserstackkey)@hub-cloud.browserstack.com/wd/hub" $false $true -#.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.CloudProviderCrossBrowser\bin\Debug\netcoreapp3.1" "appsettings.json" "DriverCapabilities" "build" "Ocaramba.Tests.BrowserStackCrossBrowser$env:appveyor_build_version" $true $true +#.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.CloudProviderCrossBrowser\bin\Debug\net6.0" "appsettings.json" "DriverCapabilities" "build" "Ocaramba.Tests.BrowserStackCrossBrowser$env:appveyor_build_version" $true $true #& dotnet.exe test --configuration Debug --no-build --no-restore Ocaramba.Tests.CloudProviderCrossBrowser -maxCpuCount --test-adapter-path:. --logger:Appveyor diff --git a/Ocaramba.Tests.Angular/Ocaramba.Tests.Angular.csproj b/Ocaramba.Tests.Angular/Ocaramba.Tests.Angular.csproj index 1cba47769..f0e6c7da2 100644 --- a/Ocaramba.Tests.Angular/Ocaramba.Tests.Angular.csproj +++ b/Ocaramba.Tests.Angular/Ocaramba.Tests.Angular.csproj @@ -1,14 +1,14 @@  - netcoreapp3.1 - net472;netcoreapp3.1 + net6.0 + net472;net6.0 - + @@ -30,7 +30,7 @@ - + @@ -55,8 +55,8 @@ - - netcoreapp3_1 + + net6_0 diff --git a/Ocaramba.Tests.Angular/PageObjects/ProtractorApiPage.cs b/Ocaramba.Tests.Angular/PageObjects/ProtractorApiPage.cs index 5b8d638d5..01b3fad16 100644 --- a/Ocaramba.Tests.Angular/PageObjects/ProtractorApiPage.cs +++ b/Ocaramba.Tests.Angular/PageObjects/ProtractorApiPage.cs @@ -10,7 +10,7 @@ public class ProtractorApiPage : ProjectPageBase #if net47 private readonly NLog.Logger logger = LogManager.GetCurrentClassLogger(); #endif -#if netcoreapp3_1 +#if net6_0 private readonly NLog.Logger logger = NLog.Web.NLogBuilder.ConfigureNLog("nlog.config").GetCurrentClassLogger(); #endif diff --git a/Ocaramba.Tests.Angular/PageObjects/ProtractorHomePage.cs b/Ocaramba.Tests.Angular/PageObjects/ProtractorHomePage.cs index f7fc36fbb..fbd96c753 100644 --- a/Ocaramba.Tests.Angular/PageObjects/ProtractorHomePage.cs +++ b/Ocaramba.Tests.Angular/PageObjects/ProtractorHomePage.cs @@ -14,7 +14,7 @@ public class ProtractorHomePage : ProjectPageBase #if net47 private static readonly NLog.Logger Logger = LogManager.GetCurrentClassLogger(); #endif -#if netcoreapp3_1 +#if net6_0 private static readonly NLog.Logger Logger = NLog.Web.NLogBuilder.ConfigureNLog("nlog.config").GetCurrentClassLogger(); #endif diff --git a/Ocaramba.Tests.Angular/PageObjects/TableOfContentsPage.cs b/Ocaramba.Tests.Angular/PageObjects/TableOfContentsPage.cs index 7d3f80ca5..c1c41a452 100644 --- a/Ocaramba.Tests.Angular/PageObjects/TableOfContentsPage.cs +++ b/Ocaramba.Tests.Angular/PageObjects/TableOfContentsPage.cs @@ -12,7 +12,7 @@ public class TableOfContentsPage : ProjectPageBase #if net47 private static readonly NLog.Logger Logger = LogManager.GetCurrentClassLogger(); #endif -#if netcoreapp3_1 +#if net6_0 private static readonly NLog.Logger Logger = NLog.Web.NLogBuilder.ConfigureNLog("nlog.config").GetCurrentClassLogger(); #endif diff --git a/Ocaramba.Tests.Angular/PageObjects/TutorialPage.cs b/Ocaramba.Tests.Angular/PageObjects/TutorialPage.cs index f9825c6ba..4c00cea1f 100644 --- a/Ocaramba.Tests.Angular/PageObjects/TutorialPage.cs +++ b/Ocaramba.Tests.Angular/PageObjects/TutorialPage.cs @@ -12,7 +12,7 @@ public class TutorialPage : ProjectPageBase #if net47 private static readonly NLog.Logger Logger = LogManager.GetCurrentClassLogger(); #endif -#if netcoreapp3_1 +#if net6_0 private static readonly NLog.Logger Logger = NLog.Web.NLogBuilder.ConfigureNLog("nlog.config").GetCurrentClassLogger(); #endif diff --git a/Ocaramba.Tests.Angular/ProjectTestBase.cs b/Ocaramba.Tests.Angular/ProjectTestBase.cs index 5838abb0d..eebc24cc1 100644 --- a/Ocaramba.Tests.Angular/ProjectTestBase.cs +++ b/Ocaramba.Tests.Angular/ProjectTestBase.cs @@ -41,7 +41,7 @@ public class ProjectTestBase : TestBase #if net47 private static readonly NLog.Logger Logger = LogManager.GetCurrentClassLogger(); #endif -#if netcoreapp3_1 +#if net6_0 private static readonly NLog.Logger Logger = NLog.Web.NLogBuilder.ConfigureNLog("nlog.config").GetCurrentClassLogger(); #endif @@ -83,7 +83,7 @@ protected DriverContext DriverContext [OneTimeSetUp] public void BeforeClass() { -#if netcoreapp3_1 +#if net6_0 this.DriverContext.CurrentDirectory = Directory.GetCurrentDirectory(); #endif diff --git a/Ocaramba.Tests.CloudProviderCrossBrowser/Ocaramba.Tests.CloudProviderCrossBrowser.csproj b/Ocaramba.Tests.CloudProviderCrossBrowser/Ocaramba.Tests.CloudProviderCrossBrowser.csproj index 7eb20554c..52e8039a3 100644 --- a/Ocaramba.Tests.CloudProviderCrossBrowser/Ocaramba.Tests.CloudProviderCrossBrowser.csproj +++ b/Ocaramba.Tests.CloudProviderCrossBrowser/Ocaramba.Tests.CloudProviderCrossBrowser.csproj @@ -1,8 +1,8 @@  - netcoreapp3.1 - net472;netcoreapp3.1 + net6.0 + net472;net6.0 @@ -26,7 +26,7 @@ - + @@ -48,8 +48,8 @@ - - netcoreapp3_1 + + net6_0 diff --git a/Ocaramba.Tests.CloudProviderCrossBrowser/ProjectTestBase.cs b/Ocaramba.Tests.CloudProviderCrossBrowser/ProjectTestBase.cs index 999109b8e..aa8712d45 100644 --- a/Ocaramba.Tests.CloudProviderCrossBrowser/ProjectTestBase.cs +++ b/Ocaramba.Tests.CloudProviderCrossBrowser/ProjectTestBase.cs @@ -44,7 +44,7 @@ public class ProjectTestBase : TestBase #if net47 private static readonly NLog.Logger Logger = LogManager.GetCurrentClassLogger(); #endif -#if netcoreapp3_1 +#if net6_0 private static readonly NLog.Logger Logger = NLog.Web.NLogBuilder.ConfigureNLog("nlog.config").GetCurrentClassLogger(); #endif @@ -91,7 +91,7 @@ protected DriverContext DriverContext [OneTimeSetUp] public void BeforeClass() { -#if netcoreapp3_1 +#if net6_0 this.DriverContext.CurrentDirectory = Directory.GetCurrentDirectory(); #endif diff --git a/Ocaramba.Tests.Features/Ocaramba.Tests.Features.csproj b/Ocaramba.Tests.Features/Ocaramba.Tests.Features.csproj index d8b8208ce..0f0b7c80b 100644 --- a/Ocaramba.Tests.Features/Ocaramba.Tests.Features.csproj +++ b/Ocaramba.Tests.Features/Ocaramba.Tests.Features.csproj @@ -1,15 +1,15 @@  - netcoreapp3.1 - net472;netcoreapp3.1 + net6.0 + net472;net6.0 - + @@ -26,7 +26,7 @@ - + @@ -55,8 +55,8 @@ - - netcoreapp3_1 + + net6_0 diff --git a/Ocaramba.Tests.Features/TestFeatures/SmokeTests.feature.cs b/Ocaramba.Tests.Features/TestFeatures/SmokeTests.feature.cs index 529ebf4ec..13c62acba 100644 --- a/Ocaramba.Tests.Features/TestFeatures/SmokeTests.feature.cs +++ b/Ocaramba.Tests.Features/TestFeatures/SmokeTests.feature.cs @@ -26,7 +26,7 @@ public partial class SmokeTestsFeature private TechTalk.SpecFlow.ITestRunner testRunner; - private string[] _featureTags = ((string[])(null)); + private static string[] featureTags = ((string[])(null)); #line 1 "SmokeTests.feature" #line hidden @@ -35,7 +35,7 @@ public partial class SmokeTestsFeature public virtual void FeatureSetup() { testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner(); - TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "TestFeatures", "SmokeTests", null, ProgrammingLanguage.CSharp, ((string[])(null))); + TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "TestFeatures", "SmokeTests", null, ProgrammingLanguage.CSharp, featureTags); testRunner.OnFeatureStart(featureInfo); } @@ -47,28 +47,28 @@ public virtual void FeatureTearDown() } [NUnit.Framework.SetUpAttribute()] - public virtual void TestInitialize() + public void TestInitialize() { } [NUnit.Framework.TearDownAttribute()] - public virtual void TestTearDown() + public void TestTearDown() { testRunner.OnScenarioEnd(); } - public virtual void ScenarioInitialize(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) + public void ScenarioInitialize(TechTalk.SpecFlow.ScenarioInfo scenarioInfo) { testRunner.OnScenarioInitialize(scenarioInfo); testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(NUnit.Framework.TestContext.CurrentContext); } - public virtual void ScenarioStart() + public void ScenarioStart() { testRunner.OnScenarioStart(); } - public virtual void ScenarioCleanup() + public void ScenarioCleanup() { testRunner.CollectScenarioErrors(); } @@ -76,26 +76,16 @@ public virtual void ScenarioCleanup() [NUnit.Framework.TestAttribute()] [NUnit.Framework.DescriptionAttribute("Verify default option selected in dropdown")] [NUnit.Framework.CategoryAttribute("Dropdown")] - public virtual void VerifyDefaultOptionSelectedInDropdown() + public void VerifyDefaultOptionSelectedInDropdown() { string[] tagsOfScenario = new string[] { "Dropdown"}; System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Verify default option selected in dropdown", null, tagsOfScenario, argumentsOfScenario, this._featureTags); + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Verify default option selected in dropdown", null, tagsOfScenario, argumentsOfScenario, featureTags); #line 27 this.ScenarioInitialize(scenarioInfo); #line hidden - bool isScenarioIgnored = default(bool); - bool isFeatureIgnored = default(bool); - if ((tagsOfScenario != null)) - { - isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((this._featureTags != null)) - { - isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((isScenarioIgnored || isFeatureIgnored)) + if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) { testRunner.SkipScenario(); } @@ -124,26 +114,16 @@ public virtual void VerifyDefaultOptionSelectedInDropdown() [NUnit.Framework.TestAttribute()] [NUnit.Framework.DescriptionAttribute("Verify if dropdown option can be selected by text")] [NUnit.Framework.CategoryAttribute("Dropdown")] - public virtual void VerifyIfDropdownOptionCanBeSelectedByText() + public void VerifyIfDropdownOptionCanBeSelectedByText() { string[] tagsOfScenario = new string[] { "Dropdown"}; System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Verify if dropdown option can be selected by text", null, tagsOfScenario, argumentsOfScenario, this._featureTags); + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Verify if dropdown option can be selected by text", null, tagsOfScenario, argumentsOfScenario, featureTags); #line 35 this.ScenarioInitialize(scenarioInfo); #line hidden - bool isScenarioIgnored = default(bool); - bool isFeatureIgnored = default(bool); - if ((tagsOfScenario != null)) - { - isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((this._featureTags != null)) - { - isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((isScenarioIgnored || isFeatureIgnored)) + if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) { testRunner.SkipScenario(); } @@ -175,26 +155,16 @@ public virtual void VerifyIfDropdownOptionCanBeSelectedByText() [NUnit.Framework.TestAttribute()] [NUnit.Framework.DescriptionAttribute("Verify if dropdown option can be selected by index with custom timeout")] [NUnit.Framework.CategoryAttribute("Dropdown")] - public virtual void VerifyIfDropdownOptionCanBeSelectedByIndexWithCustomTimeout() + public void VerifyIfDropdownOptionCanBeSelectedByIndexWithCustomTimeout() { string[] tagsOfScenario = new string[] { "Dropdown"}; System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Verify if dropdown option can be selected by index with custom timeout", null, tagsOfScenario, argumentsOfScenario, this._featureTags); + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Verify if dropdown option can be selected by index with custom timeout", null, tagsOfScenario, argumentsOfScenario, featureTags); #line 44 this.ScenarioInitialize(scenarioInfo); #line hidden - bool isScenarioIgnored = default(bool); - bool isFeatureIgnored = default(bool); - if ((tagsOfScenario != null)) - { - isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((this._featureTags != null)) - { - isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((isScenarioIgnored || isFeatureIgnored)) + if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) { testRunner.SkipScenario(); } @@ -226,26 +196,16 @@ public virtual void VerifyIfDropdownOptionCanBeSelectedByIndexWithCustomTimeout( [NUnit.Framework.TestAttribute()] [NUnit.Framework.DescriptionAttribute("Verify if dropdown option can be selected by index")] [NUnit.Framework.CategoryAttribute("Dropdown")] - public virtual void VerifyIfDropdownOptionCanBeSelectedByIndex() + public void VerifyIfDropdownOptionCanBeSelectedByIndex() { string[] tagsOfScenario = new string[] { "Dropdown"}; System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Verify if dropdown option can be selected by index", null, tagsOfScenario, argumentsOfScenario, this._featureTags); + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Verify if dropdown option can be selected by index", null, tagsOfScenario, argumentsOfScenario, featureTags); #line 53 this.ScenarioInitialize(scenarioInfo); #line hidden - bool isScenarioIgnored = default(bool); - bool isFeatureIgnored = default(bool); - if ((tagsOfScenario != null)) - { - isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((this._featureTags != null)) - { - isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((isScenarioIgnored || isFeatureIgnored)) + if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) { testRunner.SkipScenario(); } @@ -277,26 +237,16 @@ public virtual void VerifyIfDropdownOptionCanBeSelectedByIndex() [NUnit.Framework.TestAttribute()] [NUnit.Framework.DescriptionAttribute("Verify if dropdown option can be selected by value")] [NUnit.Framework.CategoryAttribute("Dropdown")] - public virtual void VerifyIfDropdownOptionCanBeSelectedByValue() + public void VerifyIfDropdownOptionCanBeSelectedByValue() { string[] tagsOfScenario = new string[] { "Dropdown"}; System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Verify if dropdown option can be selected by value", null, tagsOfScenario, argumentsOfScenario, this._featureTags); + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Verify if dropdown option can be selected by value", null, tagsOfScenario, argumentsOfScenario, featureTags); #line 62 this.ScenarioInitialize(scenarioInfo); #line hidden - bool isScenarioIgnored = default(bool); - bool isFeatureIgnored = default(bool); - if ((tagsOfScenario != null)) - { - isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((this._featureTags != null)) - { - isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((isScenarioIgnored || isFeatureIgnored)) + if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) { testRunner.SkipScenario(); } @@ -328,26 +278,16 @@ public virtual void VerifyIfDropdownOptionCanBeSelectedByValue() [NUnit.Framework.TestAttribute()] [NUnit.Framework.DescriptionAttribute("Verify if dropdown option can be selected by value with custom timeout")] [NUnit.Framework.CategoryAttribute("Dropdown")] - public virtual void VerifyIfDropdownOptionCanBeSelectedByValueWithCustomTimeout() + public void VerifyIfDropdownOptionCanBeSelectedByValueWithCustomTimeout() { string[] tagsOfScenario = new string[] { "Dropdown"}; System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Verify if dropdown option can be selected by value with custom timeout", null, tagsOfScenario, argumentsOfScenario, this._featureTags); + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Verify if dropdown option can be selected by value with custom timeout", null, tagsOfScenario, argumentsOfScenario, featureTags); #line 71 this.ScenarioInitialize(scenarioInfo); #line hidden - bool isScenarioIgnored = default(bool); - bool isFeatureIgnored = default(bool); - if ((tagsOfScenario != null)) - { - isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((this._featureTags != null)) - { - isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((isScenarioIgnored || isFeatureIgnored)) + if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) { testRunner.SkipScenario(); } @@ -392,27 +332,17 @@ public virtual void VerifyIfDropdownOptionCanBeSelectedByValueWithCustomTimeout( [NUnit.Framework.TestCaseAttribute("\"DELETE\"", "\"DELETE\"", null)] [NUnit.Framework.TestCaseAttribute("\"MULTIPLY\"", "\"MULTIPLY\"", null)] [NUnit.Framework.TestCaseAttribute("\"SUBTRACT\"", "\"SUBTRACT\"", null)] - public virtual void KeyPressesTest(string key, string message, string[] exampleTags) + public void KeyPressesTest(string key, string message, string[] exampleTags) { string[] tagsOfScenario = exampleTags; System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); argumentsOfScenario.Add("key", key); argumentsOfScenario.Add("message", message); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Key Presses Test", null, tagsOfScenario, argumentsOfScenario, this._featureTags); + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Key Presses Test", null, tagsOfScenario, argumentsOfScenario, featureTags); #line 79 this.ScenarioInitialize(scenarioInfo); #line hidden - bool isScenarioIgnored = default(bool); - bool isFeatureIgnored = default(bool); - if ((tagsOfScenario != null)) - { - isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((this._featureTags != null)) - { - isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((isScenarioIgnored || isFeatureIgnored)) + if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) { testRunner.SkipScenario(); } @@ -438,26 +368,16 @@ public virtual void KeyPressesTest(string key, string message, string[] exampleT [NUnit.Framework.TestAttribute()] [NUnit.Framework.DescriptionAttribute("Do not press any key")] [NUnit.Framework.TestCaseAttribute("\"\"", null)] - public virtual void DoNotPressAnyKey(string key, string[] exampleTags) + public void DoNotPressAnyKey(string key, string[] exampleTags) { string[] tagsOfScenario = exampleTags; System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary(); argumentsOfScenario.Add("key", key); - TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Do not press any key", null, tagsOfScenario, argumentsOfScenario, this._featureTags); + TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Do not press any key", null, tagsOfScenario, argumentsOfScenario, featureTags); #line 102 this.ScenarioInitialize(scenarioInfo); #line hidden - bool isScenarioIgnored = default(bool); - bool isFeatureIgnored = default(bool); - if ((tagsOfScenario != null)) - { - isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((this._featureTags != null)) - { - isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any(); - } - if ((isScenarioIgnored || isFeatureIgnored)) + if ((TagHelper.ContainsIgnoreTag(tagsOfScenario) || TagHelper.ContainsIgnoreTag(featureTags))) { testRunner.SkipScenario(); } diff --git a/Ocaramba.Tests.MsTest/Ocaramba.Tests.MsTest.csproj b/Ocaramba.Tests.MsTest/Ocaramba.Tests.MsTest.csproj index 887aacd95..1144273f1 100644 --- a/Ocaramba.Tests.MsTest/Ocaramba.Tests.MsTest.csproj +++ b/Ocaramba.Tests.MsTest/Ocaramba.Tests.MsTest.csproj @@ -1,8 +1,8 @@  - netcoreapp3.1 - net472;netcoreapp3.1 + net6.0 + net472;net6.0 @@ -23,7 +23,7 @@ - + @@ -61,8 +61,8 @@ - - netcoreapp3_1 + + net6_0 diff --git a/Ocaramba.Tests.NUnit/DataDriven/CompareFiles.cs b/Ocaramba.Tests.NUnit/DataDriven/CompareFiles.cs index cb3155f35..5ffe825b9 100644 --- a/Ocaramba.Tests.NUnit/DataDriven/CompareFiles.cs +++ b/Ocaramba.Tests.NUnit/DataDriven/CompareFiles.cs @@ -38,7 +38,7 @@ public static class CompareFiles #if net47 private static readonly NLog.Logger Logger = LogManager.GetCurrentClassLogger(); #endif -#if netcoreapp3_1 +#if net6_0 private static readonly NLog.Logger Logger = NLog.Web.NLogBuilder.ConfigureNLog("nlog.config").GetCurrentClassLogger(); #endif diff --git a/Ocaramba.Tests.NUnit/DataDriven/DataDrivenHelper.cs b/Ocaramba.Tests.NUnit/DataDriven/DataDrivenHelper.cs index 772da9d01..6097a15ba 100644 --- a/Ocaramba.Tests.NUnit/DataDriven/DataDrivenHelper.cs +++ b/Ocaramba.Tests.NUnit/DataDriven/DataDrivenHelper.cs @@ -44,7 +44,7 @@ public static class DataDrivenHelper #if net47 private static readonly NLog.Logger Logger = LogManager.GetCurrentClassLogger(); #endif -#if netcoreapp3_1 +#if net6_0 private static readonly NLog.Logger Logger = NLog.Web.NLogBuilder.ConfigureNLog("nlog.config").GetCurrentClassLogger(); #endif diff --git a/Ocaramba.Tests.NUnit/Ocaramba.Tests.NUnit.csproj b/Ocaramba.Tests.NUnit/Ocaramba.Tests.NUnit.csproj index e85a39cec..645f79d9d 100644 --- a/Ocaramba.Tests.NUnit/Ocaramba.Tests.NUnit.csproj +++ b/Ocaramba.Tests.NUnit/Ocaramba.Tests.NUnit.csproj @@ -1,8 +1,8 @@  - netcoreapp3.1 - net472;netcoreapp3.1 + net6.0 + net472;net6.0 @@ -27,7 +27,7 @@ - + 2.2.0 @@ -73,8 +73,8 @@ - - netcoreapp3_1 + + net6_0 diff --git a/Ocaramba.Tests.NUnit/ProjectBaseConfiguration.cs b/Ocaramba.Tests.NUnit/ProjectBaseConfiguration.cs index b7a724efc..916636d61 100644 --- a/Ocaramba.Tests.NUnit/ProjectBaseConfiguration.cs +++ b/Ocaramba.Tests.NUnit/ProjectBaseConfiguration.cs @@ -31,7 +31,7 @@ namespace Ocaramba.Tests.NUnit using global::NUnit.Framework; using Ocaramba; using Ocaramba.Helpers; -#if netcoreapp3_1 +#if net6_0 using Microsoft.Extensions.Configuration; #endif @@ -40,7 +40,7 @@ namespace Ocaramba.Tests.NUnit /// public static class ProjectBaseConfiguration { -#if netcoreapp3_1 +#if net6_0 private static readonly string CurrentDirectory = Directory.GetCurrentDirectory(); #endif @@ -48,7 +48,7 @@ public static class ProjectBaseConfiguration private static readonly string CurrentDirectory = TestContext.CurrentContext.TestDirectory; private static readonly NLog.Logger Logger = LogManager.GetCurrentClassLogger(); #endif -#if netcoreapp3_1 +#if net6_0 public static readonly string Env = Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT"); /// @@ -76,7 +76,7 @@ public static string DataDrivenFile #if net47 setting = ConfigurationManager.AppSettings["DataDrivenFile"]; #endif -#if netcoreapp3_1 +#if net6_0 setting = BaseConfiguration.Builder["appSettings:DataDrivenFile"]; #endif Logger.Debug(CultureInfo.CurrentCulture, "DataDrivenFile value from settings file '{0}'", setting); @@ -103,7 +103,7 @@ public static string DataDrivenFileXlsx #if net47 setting = ConfigurationManager.AppSettings["DataDrivenFileXlsx"]; #endif -#if netcoreapp3_1 +#if net6_0 setting = BaseConfiguration.Builder["appSettings:DataDrivenFileXlsx"]; #endif Logger.Debug(CultureInfo.CurrentCulture, "DataDrivenFileXlsx value from settings file '{0}'", setting); @@ -130,7 +130,7 @@ public static string DataDrivenFileCSV #if net47 setting = ConfigurationManager.AppSettings["DataDrivenFileCSV"]; #endif -#if netcoreapp3_1 +#if net6_0 setting = BaseConfiguration.Builder["appSettings:DataDrivenFileCSV"]; #endif Logger.Debug(CultureInfo.CurrentCulture, "DataDrivenFileCSV value from settings file '{0}'", setting); @@ -154,7 +154,7 @@ public static string DownloadFolderPath #if net47 setting = ConfigurationManager.AppSettings["DownloadFolder"]; #endif -#if netcoreapp3_1 +#if net6_0 setting = BaseConfiguration.Builder["appSettings:DownloadFolder"]; #endif Logger.Debug(CultureInfo.CurrentCulture, "DownloadFolder value from settings file '{0}'", setting); diff --git a/Ocaramba.Tests.NUnit/ProjectTestBase.cs b/Ocaramba.Tests.NUnit/ProjectTestBase.cs index a847bbeb4..5a72006b0 100644 --- a/Ocaramba.Tests.NUnit/ProjectTestBase.cs +++ b/Ocaramba.Tests.NUnit/ProjectTestBase.cs @@ -70,7 +70,7 @@ protected DriverContext DriverContext [OneTimeSetUp] public void BeforeClass() { -#if netcoreapp3_1 +#if net6_0 this.DriverContext.CurrentDirectory = Directory.GetCurrentDirectory(); #endif diff --git a/Ocaramba.Tests.NUnit/Tests/CompareFilesDataDrivenTests.cs b/Ocaramba.Tests.NUnit/Tests/CompareFilesDataDrivenTests.cs index 1cc5c006c..cb1a3fb92 100644 --- a/Ocaramba.Tests.NUnit/Tests/CompareFilesDataDrivenTests.cs +++ b/Ocaramba.Tests.NUnit/Tests/CompareFilesDataDrivenTests.cs @@ -34,7 +34,7 @@ public class CompareFilesDataDrivenTests #if net47 private readonly NLog.Logger logger = LogManager.GetCurrentClassLogger(); #endif -#if netcoreapp3_1 +#if net6_0 private readonly NLog.Logger logger = NLog.Web.NLogBuilder.ConfigureNLog("nlog.config").GetCurrentClassLogger(); #endif diff --git a/Ocaramba.Tests.NUnitExtentReports/Ocaramba.Tests.NUnitExtentReports.csproj b/Ocaramba.Tests.NUnitExtentReports/Ocaramba.Tests.NUnitExtentReports.csproj index bb38e3251..84ef8c6bd 100644 --- a/Ocaramba.Tests.NUnitExtentReports/Ocaramba.Tests.NUnitExtentReports.csproj +++ b/Ocaramba.Tests.NUnitExtentReports/Ocaramba.Tests.NUnitExtentReports.csproj @@ -1,8 +1,8 @@  - netcoreapp3.1 - netcoreapp3.1 + net6.0 + net6.0 @@ -25,7 +25,7 @@ - + 4.1.0 @@ -71,8 +71,8 @@ - - netcoreapp3_1 + + net6_0 diff --git a/Ocaramba.Tests.PageObjects/Ocaramba.Tests.PageObjects.csproj b/Ocaramba.Tests.PageObjects/Ocaramba.Tests.PageObjects.csproj index 2a9a2453b..9c946315c 100644 --- a/Ocaramba.Tests.PageObjects/Ocaramba.Tests.PageObjects.csproj +++ b/Ocaramba.Tests.PageObjects/Ocaramba.Tests.PageObjects.csproj @@ -1,8 +1,8 @@  - netcoreapp3.1 - net472;netcoreapp3.1 + net6.0 + net472;net6.0 @@ -20,7 +20,7 @@ - + @@ -30,8 +30,8 @@ - - netcoreapp3_1 + + net6_0 diff --git a/Ocaramba.Tests.PageObjects/PageObjects/TheInternet/BasicAuthPage.cs b/Ocaramba.Tests.PageObjects/PageObjects/TheInternet/BasicAuthPage.cs index fde9a8f7e..ddf9ec4be 100644 --- a/Ocaramba.Tests.PageObjects/PageObjects/TheInternet/BasicAuthPage.cs +++ b/Ocaramba.Tests.PageObjects/PageObjects/TheInternet/BasicAuthPage.cs @@ -34,7 +34,7 @@ public class BasicAuthPage : ProjectPageBase #if net47 private static readonly NLog.Logger Logger = LogManager.GetCurrentClassLogger(); #endif -#if netcoreapp3_1 +#if net6_0 private static readonly NLog.Logger Logger = NLog.Web.NLogBuilder.ConfigureNLog("nlog.config").GetCurrentClassLogger(); #endif diff --git a/Ocaramba.Tests.PageObjects/PageObjects/TheInternet/CheckboxesPage.cs b/Ocaramba.Tests.PageObjects/PageObjects/TheInternet/CheckboxesPage.cs index e4a72748b..b5e1739ba 100644 --- a/Ocaramba.Tests.PageObjects/PageObjects/TheInternet/CheckboxesPage.cs +++ b/Ocaramba.Tests.PageObjects/PageObjects/TheInternet/CheckboxesPage.cs @@ -39,7 +39,7 @@ public class CheckboxesPage : ProjectPageBase #if net47 private static readonly NLog.Logger Logger = LogManager.GetCurrentClassLogger(); #endif -#if netcoreapp3_1 +#if net6_0 private static readonly NLog.Logger Logger = NLog.Web.NLogBuilder.ConfigureNLog("nlog.config").GetCurrentClassLogger(); #endif diff --git a/Ocaramba.Tests.PageObjects/PageObjects/TheInternet/DownloadPage.cs b/Ocaramba.Tests.PageObjects/PageObjects/TheInternet/DownloadPage.cs index f479fe728..77ff17fef 100644 --- a/Ocaramba.Tests.PageObjects/PageObjects/TheInternet/DownloadPage.cs +++ b/Ocaramba.Tests.PageObjects/PageObjects/TheInternet/DownloadPage.cs @@ -36,7 +36,7 @@ public class DownloadPage : ProjectPageBase #if net47 private static readonly NLog.Logger Logger = LogManager.GetCurrentClassLogger(); #endif -#if netcoreapp3_1 +#if net6_0 private static readonly NLog.Logger Logger = NLog.Web.NLogBuilder.ConfigureNLog("nlog.config").GetCurrentClassLogger(); #endif diff --git a/Ocaramba.Tests.PageObjects/PageObjects/TheInternet/DynamicLoadingPage.cs b/Ocaramba.Tests.PageObjects/PageObjects/TheInternet/DynamicLoadingPage.cs index bdfed384f..fae8254a0 100644 --- a/Ocaramba.Tests.PageObjects/PageObjects/TheInternet/DynamicLoadingPage.cs +++ b/Ocaramba.Tests.PageObjects/PageObjects/TheInternet/DynamicLoadingPage.cs @@ -32,7 +32,7 @@ public class DynamicLoadingPage : ProjectPageBase #if net47 private static readonly NLog.Logger Logger = LogManager.GetCurrentClassLogger(); #endif -#if netcoreapp3_1 +#if net6_0 private static readonly NLog.Logger Logger = NLog.Web.NLogBuilder.ConfigureNLog("nlog.config").GetCurrentClassLogger(); #endif diff --git a/Ocaramba.Tests.PageObjects/PageObjects/TheInternet/FloatingMenuPage.cs b/Ocaramba.Tests.PageObjects/PageObjects/TheInternet/FloatingMenuPage.cs index 3994c4276..e22f18342 100644 --- a/Ocaramba.Tests.PageObjects/PageObjects/TheInternet/FloatingMenuPage.cs +++ b/Ocaramba.Tests.PageObjects/PageObjects/TheInternet/FloatingMenuPage.cs @@ -33,7 +33,7 @@ public class FloatingMenuPage : ProjectPageBase #if net47 private static readonly NLog.Logger Logger = LogManager.GetCurrentClassLogger(); #endif -#if netcoreapp3_1 +#if net6_0 private static readonly NLog.Logger Logger = NLog.Web.NLogBuilder.ConfigureNLog("nlog.config").GetCurrentClassLogger(); #endif diff --git a/Ocaramba.Tests.PageObjects/PageObjects/TheInternet/ForgotPasswordPage.cs b/Ocaramba.Tests.PageObjects/PageObjects/TheInternet/ForgotPasswordPage.cs index fa64a16b6..4cd5534b8 100644 --- a/Ocaramba.Tests.PageObjects/PageObjects/TheInternet/ForgotPasswordPage.cs +++ b/Ocaramba.Tests.PageObjects/PageObjects/TheInternet/ForgotPasswordPage.cs @@ -34,7 +34,7 @@ public class ForgotPasswordPage : ProjectPageBase #if net47 private static readonly NLog.Logger Logger = LogManager.GetCurrentClassLogger(); #endif -#if netcoreapp3_1 +#if net6_0 private static readonly NLog.Logger Logger = NLog.Web.NLogBuilder.ConfigureNLog("nlog.config").GetCurrentClassLogger(); #endif diff --git a/Ocaramba.Tests.PageObjects/PageObjects/TheInternet/FormAuthenticationPage.cs b/Ocaramba.Tests.PageObjects/PageObjects/TheInternet/FormAuthenticationPage.cs index e6863d837..52653ed66 100644 --- a/Ocaramba.Tests.PageObjects/PageObjects/TheInternet/FormAuthenticationPage.cs +++ b/Ocaramba.Tests.PageObjects/PageObjects/TheInternet/FormAuthenticationPage.cs @@ -34,7 +34,7 @@ public class FormAuthenticationPage : ProjectPageBase #if net47 private static readonly NLog.Logger Logger = LogManager.GetCurrentClassLogger(); #endif -#if netcoreapp3_1 +#if net6_0 private static readonly NLog.Logger Logger = NLog.Web.NLogBuilder.ConfigureNLog("nlog.config").GetCurrentClassLogger(); #endif diff --git a/Ocaramba.Tests.PageObjects/PageObjects/TheInternet/IFramePage.cs b/Ocaramba.Tests.PageObjects/PageObjects/TheInternet/IFramePage.cs index eef768b76..813bb1c6f 100644 --- a/Ocaramba.Tests.PageObjects/PageObjects/TheInternet/IFramePage.cs +++ b/Ocaramba.Tests.PageObjects/PageObjects/TheInternet/IFramePage.cs @@ -34,7 +34,7 @@ public class IFramePage : ProjectPageBase #if net47 private static readonly NLog.Logger Logger = LogManager.GetCurrentClassLogger(); #endif -#if netcoreapp3_1 +#if net6_0 private static readonly NLog.Logger Logger = NLog.Web.NLogBuilder.ConfigureNLog("nlog.config").GetCurrentClassLogger(); #endif diff --git a/Ocaramba.Tests.PageObjects/PageObjects/TheInternet/InternetPage.cs b/Ocaramba.Tests.PageObjects/PageObjects/TheInternet/InternetPage.cs index 25d7d80d8..3fc0c442a 100644 --- a/Ocaramba.Tests.PageObjects/PageObjects/TheInternet/InternetPage.cs +++ b/Ocaramba.Tests.PageObjects/PageObjects/TheInternet/InternetPage.cs @@ -34,7 +34,7 @@ public class InternetPage : ProjectPageBase #if net47 private static readonly NLog.Logger Logger = LogManager.GetCurrentClassLogger(); #endif -#if netcoreapp3_1 +#if net6_0 private static readonly NLog.Logger Logger = NLog.Web.NLogBuilder.ConfigureNLog("nlog.config").GetCurrentClassLogger(); #endif diff --git a/Ocaramba.Tests.PageObjects/PageObjects/TheInternet/KeyPressesPage.cs b/Ocaramba.Tests.PageObjects/PageObjects/TheInternet/KeyPressesPage.cs index f317ed981..c07466d50 100644 --- a/Ocaramba.Tests.PageObjects/PageObjects/TheInternet/KeyPressesPage.cs +++ b/Ocaramba.Tests.PageObjects/PageObjects/TheInternet/KeyPressesPage.cs @@ -36,7 +36,7 @@ public class KeyPressesPage : ProjectPageBase #if net47 private static readonly NLog.Logger Logger = LogManager.GetCurrentClassLogger(); #endif -#if netcoreapp3_1 +#if net6_0 private static readonly NLog.Logger Logger = NLog.Web.NLogBuilder.ConfigureNLog("nlog.config").GetCurrentClassLogger(); #endif diff --git a/Ocaramba.Tests.PageObjects/PageObjects/TheInternet/SecureFileDownloadPage.cs b/Ocaramba.Tests.PageObjects/PageObjects/TheInternet/SecureFileDownloadPage.cs index 12d53a7fc..c6dd52c20 100644 --- a/Ocaramba.Tests.PageObjects/PageObjects/TheInternet/SecureFileDownloadPage.cs +++ b/Ocaramba.Tests.PageObjects/PageObjects/TheInternet/SecureFileDownloadPage.cs @@ -35,7 +35,7 @@ public class SecureFileDownloadPage : ProjectPageBase #if net47 private static readonly NLog.Logger Logger = LogManager.GetCurrentClassLogger(); #endif -#if netcoreapp3_1 +#if net6_0 private static readonly NLog.Logger Logger = NLog.Web.NLogBuilder.ConfigureNLog("nlog.config").GetCurrentClassLogger(); #endif diff --git a/Ocaramba.Tests.PageObjects/PageObjects/TheInternet/ShiftingContentPage.cs b/Ocaramba.Tests.PageObjects/PageObjects/TheInternet/ShiftingContentPage.cs index 08557fa38..a4679edb0 100644 --- a/Ocaramba.Tests.PageObjects/PageObjects/TheInternet/ShiftingContentPage.cs +++ b/Ocaramba.Tests.PageObjects/PageObjects/TheInternet/ShiftingContentPage.cs @@ -33,7 +33,7 @@ public class ShiftingContentPage : ProjectPageBase #if net47 private static readonly NLog.Logger Logger = LogManager.GetCurrentClassLogger(); #endif -#if netcoreapp3_1 +#if net6_0 private static readonly NLog.Logger Logger = NLog.Web.NLogBuilder.ConfigureNLog("nlog.config").GetCurrentClassLogger(); #endif diff --git a/Ocaramba.Tests.PageObjects/PageObjects/TheInternet/StatusCodesPage.cs b/Ocaramba.Tests.PageObjects/PageObjects/TheInternet/StatusCodesPage.cs index 618b025ce..24722ff61 100644 --- a/Ocaramba.Tests.PageObjects/PageObjects/TheInternet/StatusCodesPage.cs +++ b/Ocaramba.Tests.PageObjects/PageObjects/TheInternet/StatusCodesPage.cs @@ -35,7 +35,7 @@ public class StatusCodesPage : ProjectPageBase #if net47 private static readonly NLog.Logger Logger = LogManager.GetCurrentClassLogger(); #endif -#if netcoreapp3_1 +#if net6_0 private static readonly NLog.Logger Logger = NLog.Web.NLogBuilder.ConfigureNLog("nlog.config").GetCurrentClassLogger(); #endif diff --git a/Ocaramba.Tests.PageObjects/PageObjects/TheInternet/UploadPage.cs b/Ocaramba.Tests.PageObjects/PageObjects/TheInternet/UploadPage.cs index 198ab7aa6..13588742d 100644 --- a/Ocaramba.Tests.PageObjects/PageObjects/TheInternet/UploadPage.cs +++ b/Ocaramba.Tests.PageObjects/PageObjects/TheInternet/UploadPage.cs @@ -34,7 +34,7 @@ public class UploadPage : ProjectPageBase #if net47 private static readonly NLog.Logger Logger = LogManager.GetCurrentClassLogger(); #endif -#if netcoreapp3_1 +#if net6_0 private static readonly NLog.Logger Logger = NLog.Web.NLogBuilder.ConfigureNLog("nlog.config").GetCurrentClassLogger(); #endif diff --git a/Ocaramba.Tests.Xunit/Ocaramba.Tests.Xunit.csproj b/Ocaramba.Tests.Xunit/Ocaramba.Tests.Xunit.csproj index 22770dc36..281a6ac48 100644 --- a/Ocaramba.Tests.Xunit/Ocaramba.Tests.Xunit.csproj +++ b/Ocaramba.Tests.Xunit/Ocaramba.Tests.Xunit.csproj @@ -1,8 +1,8 @@  - netcoreapp3.1 - net472;netcoreapp3.1 + net6.0 + net472;net6.0 @@ -33,10 +33,9 @@ - + - @@ -56,8 +55,8 @@ - - netcoreapp3_1 + + net6_0 diff --git a/Ocaramba.Tests.Xunit/ProjectTestBase.cs b/Ocaramba.Tests.Xunit/ProjectTestBase.cs index 3787070dc..6d58bbf4f 100644 --- a/Ocaramba.Tests.Xunit/ProjectTestBase.cs +++ b/Ocaramba.Tests.Xunit/ProjectTestBase.cs @@ -37,7 +37,7 @@ public class ProjectTestBase : IDisposable, IClassFixture #if net47 private static readonly NLog.Logger Logger = LogManager.GetCurrentClassLogger(); #endif -#if netcoreapp3_1 +#if net6_0 private static readonly NLog.Logger Logger = NLog.Web.NLogBuilder.ConfigureNLog("nlog.config").GetCurrentClassLogger(); #endif diff --git a/Ocaramba.UnitTests/Ocaramba.UnitTests.csproj b/Ocaramba.UnitTests/Ocaramba.UnitTests.csproj index 0e6ccd04f..f94373046 100644 --- a/Ocaramba.UnitTests/Ocaramba.UnitTests.csproj +++ b/Ocaramba.UnitTests/Ocaramba.UnitTests.csproj @@ -1,15 +1,15 @@  -netcoreapp3.1 -net472;netcoreapp3.1 +net6.0 +net472;net6.0 - + @@ -29,10 +29,9 @@ - + - @@ -56,8 +55,8 @@ - - netcoreapp3_1 + + net6_0 diff --git a/Ocaramba.UnitTests/ProjectTestBase.cs b/Ocaramba.UnitTests/ProjectTestBase.cs index 0fd31a3f1..74a5471e2 100644 --- a/Ocaramba.UnitTests/ProjectTestBase.cs +++ b/Ocaramba.UnitTests/ProjectTestBase.cs @@ -68,7 +68,7 @@ protected DriverContext DriverContext [OneTimeSetUp] public void BeforeClass() { -#if netcoreapp3_1 +#if net6_0 this.DriverContext.CurrentDirectory = Directory.GetCurrentDirectory(); #endif diff --git a/Ocaramba.UnitTests/Tests/DriversCustomSettingsUnitTests.cs b/Ocaramba.UnitTests/Tests/DriversCustomSettingsUnitTests.cs index 590a36bad..8d1f3a7c3 100644 --- a/Ocaramba.UnitTests/Tests/DriversCustomSettingsUnitTests.cs +++ b/Ocaramba.UnitTests/Tests/DriversCustomSettingsUnitTests.cs @@ -32,7 +32,7 @@ public class DriversCustomSettingsUnitTests [Test] public void CheckSynchronizationWithAngularFuctionality() { -#if netcoreapp3_1 +#if net6_0 string folder = Directory.GetCurrentDirectory(); #endif diff --git a/Ocaramba.UnitTests/Tests/FilesHelperTests.cs b/Ocaramba.UnitTests/Tests/FilesHelperTests.cs index 91d380838..3b477c801 100644 --- a/Ocaramba.UnitTests/Tests/FilesHelperTests.cs +++ b/Ocaramba.UnitTests/Tests/FilesHelperTests.cs @@ -10,7 +10,7 @@ namespace Ocaramba.UnitTests.Tests [TestFixture, Parallelizable(ParallelScope.Self)] public class FilesHelperTests { -#if netcoreapp3_1 +#if net6_0 string folder = Directory.GetCurrentDirectory(); #endif diff --git a/Ocaramba.UnitTests/Tests/LocatorExtensionsTests.cs b/Ocaramba.UnitTests/Tests/LocatorExtensionsTests.cs index 255fd8f9e..76da6e128 100644 --- a/Ocaramba.UnitTests/Tests/LocatorExtensionsTests.cs +++ b/Ocaramba.UnitTests/Tests/LocatorExtensionsTests.cs @@ -25,7 +25,7 @@ public void ClassNameLocatorTest() var titleByClassName = new InternetPage(DriverContext) .OpenHomePage() .GoToDragAndDropPage().GetByClassName; -#if netcoreapp3_1 +#if net6_0 if (BaseConfiguration.Env == "Linux") { Assert.AreEqual("Drag and Drop\nA\nB", titleByClassName); @@ -46,7 +46,7 @@ public void CssSelectorLocatorTest() var titleByCssSelector = new InternetPage(DriverContext) .OpenHomePage() .GoToDragAndDropPage().GetByCssSelectorLocator; -#if netcoreapp3_1 +#if net6_0 if (BaseConfiguration.Env == "Linux") { Assert.AreEqual("Drag and Drop\nA\nB", titleByCssSelector); @@ -78,7 +78,7 @@ public void NameLocatorTest() .OpenHomePage() .GoToFormAuthenticationPage() .GetUsernameByNameLocator; -#if netcoreapp3_1 +#if net6_0 if (BaseConfiguration.Env == "Linux") { Assert.AreEqual("Username\nPassword\nLogin", columnA); diff --git a/Ocaramba.UnitTests/Tests/NameHelperTests.cs b/Ocaramba.UnitTests/Tests/NameHelperTests.cs index eb582ac4a..46c1cd9fd 100644 --- a/Ocaramba.UnitTests/Tests/NameHelperTests.cs +++ b/Ocaramba.UnitTests/Tests/NameHelperTests.cs @@ -9,7 +9,7 @@ namespace Ocaramba.UnitTests.Tests [TestFixture, Parallelizable(ParallelScope.Self)] public class NameHelperTests { -#if netcoreapp3_1 +#if net6_0 string folder = Directory.GetCurrentDirectory(); #endif @@ -19,7 +19,7 @@ public class NameHelperTests #if net47 private static readonly NLog.Logger Logger = LogManager.GetCurrentClassLogger(); #endif -#if netcoreapp3_1 +#if net6_0 private static readonly NLog.Logger Logger = NLog.Web.NLogBuilder.ConfigureNLog("nlog.config").GetCurrentClassLogger(); #endif [Test()] diff --git a/Ocaramba.UnitTests/Tests/TakingScreehShotsOfElementsTests.cs b/Ocaramba.UnitTests/Tests/TakingScreehShotsOfElementsTests.cs index e25ecb749..0b370833f 100644 --- a/Ocaramba.UnitTests/Tests/TakingScreehShotsOfElementsTests.cs +++ b/Ocaramba.UnitTests/Tests/TakingScreehShotsOfElementsTests.cs @@ -34,7 +34,7 @@ namespace Ocaramba.UnitTests.Tests [Category("NotImplementedInCoreOrUploadDownload")] public class TakingScreehShotsOfElementsTests : ProjectTestBase { -#if netcoreapp3_1 +#if net6_0 string folder = Directory.GetCurrentDirectory(); #endif diff --git a/Ocaramba/Helpers/SqlHelper.cs b/Ocaramba/Helpers/SqlHelper.cs index f5fe1f4b2..79bd0024c 100644 --- a/Ocaramba/Helpers/SqlHelper.cs +++ b/Ocaramba/Helpers/SqlHelper.cs @@ -40,7 +40,7 @@ public static class SqlHelper #if net47 private static readonly NLog.Logger Logger = LogManager.GetCurrentClassLogger(); #endif -#if netcoreapp3_1 +#if net6_0 private static readonly NLog.Logger Logger = NLog.Web.NLogBuilder.ConfigureNLog("nlog.config").GetCurrentClassLogger(); #endif diff --git a/Ocaramba/Ocaramba.csproj b/Ocaramba/Ocaramba.csproj index ca4bc4052..79f01b0ed 100644 --- a/Ocaramba/Ocaramba.csproj +++ b/Ocaramba/Ocaramba.csproj @@ -1,8 +1,8 @@  - netcoreapp3.1 - net472;netcoreapp3.1 + net6.0 + net472;net6.0 Framework to automate tests using Selenium WebDriver Copyright © 2015 Objectivity Bespoke Software Specialists @@ -27,7 +27,7 @@ - + @@ -41,7 +41,7 @@ - + 3.1.2 @@ -71,8 +71,8 @@ - - netcoreapp3_1 + + net6_0 diff --git a/OcarambaLite/BaseConfiguration.cs b/OcarambaLite/BaseConfiguration.cs index c671120a6..42e506e07 100644 --- a/OcarambaLite/BaseConfiguration.cs +++ b/OcarambaLite/BaseConfiguration.cs @@ -24,7 +24,7 @@ namespace Ocaramba { using System.Collections.Generic; using System.Collections.Specialized; -#if netcoreapp3_1 +#if net6_0 using Microsoft.Extensions.Configuration; #endif using System; @@ -45,7 +45,7 @@ public static class BaseConfiguration #if net47 private static readonly NLog.Logger Logger = LogManager.GetCurrentClassLogger(); #endif -#if netcoreapp3_1 +#if net6_0 public static readonly string Env = Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT"); /// @@ -74,7 +74,7 @@ public static BrowserType TestBrowser { bool supportedBrowser = false; string setting = null; -#if netcoreapp3_1 +#if net6_0 setting = Builder["appSettings:browser"]; #endif #if net47 @@ -104,7 +104,7 @@ public static BrowserType TestBrowserCapabilities #if net47 setting = ConfigurationManager.AppSettings["DriverCapabilities"]; #endif -#if netcoreapp3_1 +#if net6_0 setting = Builder["appSettings:DriverCapabilities"]; #endif @@ -130,7 +130,7 @@ public static string PathToFirefoxProfile string setting = null; #if net47 setting = ConfigurationManager.AppSettings["PathToFirefoxProfile"]; -#elif netcoreapp3_1 +#elif net6_0 setting = Builder["appSettings:PathToFirefoxProfile"]; #endif Logger.Trace(CultureInfo.CurrentCulture, "Gets the path to firefox profile from settings file '{0}'", setting); @@ -154,7 +154,7 @@ public static string Protocol #if net47 setting = ConfigurationManager.AppSettings["protocol"]; #endif -#if netcoreapp3_1 +#if net6_0 setting = Builder["appSettings:protocol"]; #endif Logger.Trace(CultureInfo.CurrentCulture, "Gets the protocol from settings file '{0}'", setting); @@ -173,7 +173,7 @@ public static string Host #if net47 setting = ConfigurationManager.AppSettings["host"]; #endif -#if netcoreapp3_1 +#if net6_0 setting = Builder["appSettings:host"]; #endif Logger.Trace(CultureInfo.CurrentCulture, "Gets the protocol from settings file '{0}'", setting); @@ -192,7 +192,7 @@ public static string Url #if net47 setting = ConfigurationManager.AppSettings["url"]; #endif -#if netcoreapp3_1 +#if net6_0 setting = Builder["appSettings:url"]; #endif Logger.Trace(CultureInfo.CurrentCulture, "Gets the url from settings file '{0}'", setting); @@ -211,7 +211,7 @@ public static string Proxy #if net47 setting = ConfigurationManager.AppSettings["proxy"]; #endif -#if netcoreapp3_1 +#if net6_0 setting = Builder["appSettings:proxy"]; #endif Logger.Trace(CultureInfo.CurrentCulture, "Gets the url from settings file '{0}'", setting); @@ -230,7 +230,7 @@ public static string HttpProxy #if net47 setting = ConfigurationManager.AppSettings["httpProxy"]; #endif -#if netcoreapp3_1 +#if net6_0 setting = Builder["appSettings:httpProxy"]; #endif Logger.Trace(CultureInfo.CurrentCulture, "Gets the httpProxy from settings file '{0}'", setting); @@ -249,7 +249,7 @@ public static string FtpProxy #if net47 setting = ConfigurationManager.AppSettings["ftpProxy"]; #endif -#if netcoreapp3_1 +#if net6_0 setting = Builder["appSettings:ftpProxy"]; #endif Logger.Trace(CultureInfo.CurrentCulture, "Gets the ftpProxy from settings file '{0}'", setting); @@ -268,7 +268,7 @@ public static string SslProxy #if net47 setting = ConfigurationManager.AppSettings["sslProxy"]; #endif -#if netcoreapp3_1 +#if net6_0 setting = Builder["appSettings:sslProxy"]; #endif Logger.Trace(CultureInfo.CurrentCulture, "Gets the sslProxy from settings file '{0}'", setting); @@ -287,7 +287,7 @@ public static string SocksProxy #if net47 setting = ConfigurationManager.AppSettings["socksproxy"]; #endif -#if netcoreapp3_1 +#if net6_0 setting = Builder["appSettings:socksproxy"]; #endif Logger.Trace(CultureInfo.CurrentCulture, "Gets the socksproxy from settings file '{0}'", setting); @@ -306,7 +306,7 @@ public static TimeSpan RemoteWebDriverTimeout #if net47 setting = int.Parse(ConfigurationManager.AppSettings["remoteTimeout"], CultureInfo.InvariantCulture); #endif -#if netcoreapp3_1 +#if net6_0 setting = int.Parse(Builder["appSettings:remoteTimeout"], CultureInfo.InvariantCulture); #endif Logger.Trace(CultureInfo.CurrentCulture, "Gets the remote timeout from settings file '{0}'", setting); @@ -325,7 +325,7 @@ public static string Username #if net47 setting = ConfigurationManager.AppSettings["username"]; #endif -#if netcoreapp3_1 +#if net6_0 setting = Builder["appSettings:username"]; #endif Logger.Trace(CultureInfo.CurrentCulture, "Gets the username from settings file '{0}'", setting); @@ -344,7 +344,7 @@ public static string Password #if net47 setting = ConfigurationManager.AppSettings["password"]; #endif -#if netcoreapp3_1 +#if net6_0 setting = Builder["appSettings:password"]; #endif Logger.Trace(CultureInfo.CurrentCulture, "Gets the password from settings file '{0}'", setting); @@ -366,8 +366,8 @@ public static double MediumTimeout #if net47 setting = Convert.ToDouble(ConfigurationManager.AppSettings["mediumTimeout"], CultureInfo.CurrentCulture); #endif -#if netcoreapp3_1 - setting = Convert.ToDouble(Builder["appSettings:mediumTimeout"]); +#if net6_0 + setting = Convert.ToDouble(Builder["appSettings:mediumTimeout"], CultureInfo.InvariantCulture); #endif Logger.Trace(CultureInfo.CurrentCulture, "Gets the mediumTimeout from settings file '{0}'", setting); return setting; @@ -388,8 +388,8 @@ public static double LongTimeout #if net47 setting = Convert.ToDouble(ConfigurationManager.AppSettings["longTimeout"], CultureInfo.CurrentCulture); #endif -#if netcoreapp3_1 - setting = Convert.ToDouble(Builder["appSettings:longTimeout"]); +#if net6_0 + setting = Convert.ToDouble(Builder["appSettings:longTimeout"], CultureInfo.InvariantCulture); #endif Logger.Trace(CultureInfo.CurrentCulture, "Gets the longTimeout from settings file '{0}'", setting); return setting; @@ -410,8 +410,8 @@ public static double ShortTimeout #if net47 setting = Convert.ToDouble(ConfigurationManager.AppSettings["shortTimeout"], CultureInfo.CurrentCulture); #endif -#if netcoreapp3_1 - setting = Convert.ToDouble(Builder["appSettings:shortTimeout"]); +#if net6_0 + setting = Convert.ToDouble(Builder["appSettings:shortTimeout"], CultureInfo.InvariantCulture); #endif Logger.Trace(CultureInfo.CurrentCulture, "Gets the shortTimeout from settings file '{0}'", setting); return setting; @@ -429,8 +429,8 @@ public static double ImplicitlyWaitMilliseconds #if net47 setting = Convert.ToDouble(ConfigurationManager.AppSettings["ImplicitlyWaitMilliseconds"], CultureInfo.CurrentCulture); #endif -#if netcoreapp3_1 - setting = Convert.ToDouble(Builder["appSettings:ImplicitlyWaitMilliseconds"]); +#if net6_0 + setting = Convert.ToDouble(Builder["appSettings:ImplicitlyWaitMilliseconds"], CultureInfo.InvariantCulture); #endif Logger.Trace(CultureInfo.CurrentCulture, "Gets the ImplicitlyWaitMilliseconds from settings file '{0}'", setting); return setting; @@ -448,7 +448,7 @@ public static string FirefoxBrowserExecutableLocation #if net47 setting = ConfigurationManager.AppSettings["FirefoxBrowserExecutableLocation"]; #endif -#if netcoreapp3_1 +#if net6_0 setting = Builder["appSettings:FirefoxBrowserExecutableLocation"]; #endif Logger.Trace(CultureInfo.CurrentCulture, "Gets the path and file name of the Firefox browser executable from settings file '{0}'", setting); @@ -472,7 +472,7 @@ public static string EdgeChromiumBrowserExecutableLocation #if net47 setting = ConfigurationManager.AppSettings["EdgeChromiumBrowserExecutableLocation"]; #endif -#if netcoreapp3_1 +#if net6_0 setting = Builder["appSettings:EdgeChromiumBrowserExecutableLocation"]; #endif Logger.Trace(CultureInfo.CurrentCulture, "Gets the path and file name of the Edge Chromium browser executable from settings file '{0}'", setting); @@ -496,7 +496,7 @@ public static string ChromeBrowserExecutableLocation #if net47 setting = ConfigurationManager.AppSettings["ChromeBrowserExecutableLocation"]; #endif -#if netcoreapp3_1 +#if net6_0 setting = Builder["appSettings:ChromeBrowserExecutableLocation"]; #endif Logger.Trace(CultureInfo.CurrentCulture, "Gets the path and file name of the Chrome browser executable from settings file '{0}'", setting); @@ -521,7 +521,7 @@ public static Uri RemoteWebDriverHub #if net47 setting = ConfigurationManager.AppSettings["RemoteWebDriverHub"]; #endif -#if netcoreapp3_1 +#if net6_0 setting = Builder["appSettings:RemoteWebDriverHub"]; #endif Logger.Trace(CultureInfo.CurrentCulture, "RemoteWebDriverHub from settings file '{0}'", setting); @@ -568,7 +568,7 @@ public static string PathToChromeDriverLog #if net47 setting = ConfigurationManager.AppSettings["PathToChromeDriverLog"]; #endif -#if netcoreapp3_1 +#if net6_0 setting = Builder["appSettings:PathToChromeDriverLog"]; #endif Logger.Trace(CultureInfo.CurrentCulture, "Gets the PathToChromeDriverLog from settings file '{0}'", setting); @@ -592,7 +592,7 @@ public static bool EnableVerboseLoggingChrome #if net47 setting = ConfigurationManager.AppSettings["EnableVerboseLoggingChrome"]; #endif -#if netcoreapp3_1 +#if net6_0 setting = Builder["appSettings:EnableVerboseLoggingChrome"]; #endif Logger.Trace(CultureInfo.CurrentCulture, "Verbose logging for Chrome value from settings file '{0}'", setting); @@ -601,7 +601,7 @@ public static bool EnableVerboseLoggingChrome return false; } - if (setting.ToLower(CultureInfo.CurrentCulture).Equals("true")) + if (setting.ToLower(CultureInfo.CurrentCulture).Equals("true", StringComparison.Ordinal)) { return true; } @@ -621,7 +621,7 @@ public static string PathToInternetExplorerDriverDirectory #if net47 setting = ConfigurationManager.AppSettings["PathToInternetExplorerDriverDirectory"]; #endif -#if netcoreapp3_1 +#if net6_0 setting = Builder["appSettings:PathToInternetExplorerDriverDirectory"]; #endif Logger.Trace(CultureInfo.CurrentCulture, "Gets the PathToInternetExplorerDriverDirectory from settings file '{0}'", setting); @@ -645,7 +645,7 @@ public static string PathToEdgeChromiumDriverDirectory #if net47 setting = ConfigurationManager.AppSettings["PathToEdgeChromiumDriverDirectory"]; #endif -#if netcoreapp3_1 +#if net6_0 setting = Builder["appSettings:PathToEdgeChromiumDriverDirectory"]; #endif Logger.Trace(CultureInfo.CurrentCulture, "Gets the PathToEdgeChromiumDriverDirectory from settings file '{0}'", setting); @@ -664,7 +664,7 @@ public static string PathToChromeDriverDirectory #if net47 setting = ConfigurationManager.AppSettings["PathToChromeDriverDirectory"]; #endif -#if netcoreapp3_1 +#if net6_0 setting = Builder["appSettings:PathToChromeDriverDirectory"]; #endif @@ -689,7 +689,7 @@ public static string PathToFirefoxDriverDirectory #if net47 setting = ConfigurationManager.AppSettings["PathToFirefoxDriverDirectory"]; #endif -#if netcoreapp3_1 +#if net6_0 setting = Builder["appSettings:PathToFirefoxDriverDirectory"]; #endif Logger.Trace(CultureInfo.CurrentCulture, "Path to the directory containing Firefox Driver from settings file '{0}'", setting); @@ -713,7 +713,7 @@ public static bool JavaScriptErrorLogging #if net47 setting = ConfigurationManager.AppSettings["JavaScriptErrorLogging"]; #endif -#if netcoreapp3_1 +#if net6_0 setting = Builder["appSettings:JavaScriptErrorLogging"]; #endif Logger.Trace(CultureInfo.CurrentCulture, "JavaScript error logging value from settings file '{0}'", setting); @@ -722,7 +722,7 @@ public static bool JavaScriptErrorLogging return false; } - if (setting.ToLower(CultureInfo.CurrentCulture).Equals("true")) + if (setting.ToLower(CultureInfo.CurrentCulture).Equals("true", StringComparison.Ordinal)) { return true; } @@ -742,7 +742,7 @@ public static Collection JavaScriptErrorTypes #if net47 setting = ConfigurationManager.AppSettings["JavaScriptErrorTypes"]; #endif -#if netcoreapp3_1 +#if net6_0 setting = Builder["appSettings:JavaScriptErrorTypes"]; #endif Logger.Trace(CultureInfo.CurrentCulture, "JavaScript error logging value from settings file '{0}'", setting); @@ -777,7 +777,7 @@ public static bool SeleniumScreenShotEnabled #if net47 setting = ConfigurationManager.AppSettings["SeleniumScreenShotEnabled"]; #endif -#if netcoreapp3_1 +#if net6_0 setting = Builder["appSettings:SeleniumScreenShotEnabled"]; #endif Logger.Trace(CultureInfo.CurrentCulture, "Selenium Screen Shot Enabled value from settings file '{0}'", setting); @@ -786,7 +786,7 @@ public static bool SeleniumScreenShotEnabled return true; } - if (setting.ToLower(CultureInfo.CurrentCulture).Equals("true")) + if (setting.ToLower(CultureInfo.CurrentCulture).Equals("true", StringComparison.Ordinal)) { return true; } @@ -806,7 +806,7 @@ public static bool EnableEventFiringWebDriver #if net47 setting = ConfigurationManager.AppSettings["EnableEventFiringWebDriver"]; #endif -#if netcoreapp3_1 +#if net6_0 setting = Builder["appSettings:EnableEventFiringWebDriver"]; #endif Logger.Trace(CultureInfo.CurrentCulture, "Enable EventFiringWebDriver from settings file '{0}'", setting); @@ -815,7 +815,7 @@ public static bool EnableEventFiringWebDriver return false; } - if (setting.ToLower(CultureInfo.CurrentCulture).Equals("true")) + if (setting.ToLower(CultureInfo.CurrentCulture).Equals("true", StringComparison.Ordinal)) { return true; } @@ -835,7 +835,7 @@ public static bool UseCurrentDirectory #if net47 setting = ConfigurationManager.AppSettings["UseCurrentDirectory"]; #endif -#if netcoreapp3_1 +#if net6_0 setting = Builder["appSettings:UseCurrentDirectory"]; #endif Logger.Trace(CultureInfo.CurrentCulture, "Use Current Directory value from settings file '{0}'", setting); @@ -844,7 +844,7 @@ public static bool UseCurrentDirectory return false; } - if (setting.ToLower(CultureInfo.CurrentCulture).Equals("true")) + if (setting.ToLower(CultureInfo.CurrentCulture).Equals("true", StringComparison.Ordinal)) { return true; } @@ -867,7 +867,7 @@ public static bool GetPageSourceEnabled #if net47 setting = ConfigurationManager.AppSettings["GetPageSourceEnabled"]; #endif -#if netcoreapp3_1 +#if net6_0 setting = Builder["appSettings:GetPageSourceEnabled"]; #endif Logger.Trace(CultureInfo.CurrentCulture, "Get Page Source Enabled value from settings file '{0}'", setting); @@ -876,12 +876,7 @@ public static bool GetPageSourceEnabled return true; } - if (setting.ToLower(CultureInfo.CurrentCulture).Equals("true")) - { - return true; - } - - return false; + return setting.ToLower(CultureInfo.CurrentCulture).Equals("true", StringComparison.Ordinal); } } @@ -896,7 +891,7 @@ public static string DownloadFolder #if net47 setting = ConfigurationManager.AppSettings["DownloadFolder"]; #endif -#if netcoreapp3_1 +#if net6_0 setting = Builder["appSettings:DownloadFolder"]; #endif Logger.Trace(CultureInfo.CurrentCulture, "Get DownloadFolder value from settings file '{0}'", setting); @@ -915,7 +910,7 @@ public static string ScreenShotFolder #if net47 setting = ConfigurationManager.AppSettings["ScreenShotFolder"]; #endif -#if netcoreapp3_1 +#if net6_0 setting = Builder["appSettings:ScreenShotFolder"]; #endif Logger.Trace(CultureInfo.CurrentCulture, "Get ScreenShotFolder value from settings file '{0}'", setting); @@ -934,7 +929,7 @@ public static string PageSourceFolder #if net47 setting = ConfigurationManager.AppSettings["PageSourceFolder"]; #endif -#if netcoreapp3_1 +#if net6_0 setting = Builder["appSettings:PageSourceFolder"]; #endif Logger.Trace(CultureInfo.CurrentCulture, "Get PageSourceFolder value from settings file '{0}'", setting); @@ -990,7 +985,7 @@ public static bool SynchronizationWithAngularEnabled #if net47 setting = ConfigurationManager.AppSettings["SynchronizationWithAngularEnabled"]; #endif -#if netcoreapp3_1 +#if net6_0 setting = Builder["appSettings:SynchronizationWithAngularEnabled"]; #endif Logger.Trace(CultureInfo.CurrentCulture, "Angular synchronization Enabled value from settings file '{0}'", setting); @@ -999,7 +994,7 @@ public static bool SynchronizationWithAngularEnabled return false; } - if (setting.ToLower(CultureInfo.CurrentCulture).Equals("true")) + if (setting.ToLower(CultureInfo.CurrentCulture).Equals("true", StringComparison.Ordinal)) { return true; } @@ -1007,7 +1002,7 @@ public static bool SynchronizationWithAngularEnabled return false; } } -#if netcoreapp3_1 +#if net6_0 /// /// Converting settings from appsettings.json into the NameValueCollection, key - value pairs. diff --git a/OcarambaLite/DriverContext.cs b/OcarambaLite/DriverContext.cs index f539418d1..9fa755f13 100644 --- a/OcarambaLite/DriverContext.cs +++ b/OcarambaLite/DriverContext.cs @@ -51,7 +51,7 @@ public partial class DriverContext #if net47 private static readonly NLog.Logger Logger = LogManager.GetCurrentClassLogger(); #endif -#if netcoreapp3_1 +#if net6_0 private static readonly NLog.Logger Logger = NLog.Web.NLogBuilder.ConfigureNLog("nlog.config").GetCurrentClassLogger(); #endif private readonly Collection verifyMessages = new Collection(); @@ -209,7 +209,7 @@ private FirefoxOptions FirefoxOptions firefoxPreferences = ConfigurationManager.GetSection("FirefoxPreferences") as NameValueCollection; firefoxExtensions = ConfigurationManager.GetSection("FirefoxExtensions") as NameValueCollection; #endif -#if netcoreapp3_1 +#if net6_0 firefoxPreferences = BaseConfiguration.GetNameValueCollectionFromAppsettings("FirefoxPreferences"); firefoxExtensions = BaseConfiguration.GetNameValueCollectionFromAppsettings("FirefoxExtensions"); #endif @@ -316,7 +316,7 @@ private ChromeOptions ChromeOptions chromeExtensions = ConfigurationManager.GetSection("ChromeExtensions") as NameValueCollection; chromeArguments = ConfigurationManager.GetSection("ChromeArguments") as NameValueCollection; #endif -#if netcoreapp3_1 +#if net6_0 chromePreferences = BaseConfiguration.GetNameValueCollectionFromAppsettings("ChromePreferences"); chromeExtensions = BaseConfiguration.GetNameValueCollectionFromAppsettings("ChromeExtensions"); chromeArguments = BaseConfiguration.GetNameValueCollectionFromAppsettings("chromeArguments"); @@ -417,7 +417,7 @@ private InternetExplorerOptions InternetExplorerOptions #if net47 internetExplorerPreferences = ConfigurationManager.GetSection("InternetExplorerPreferences") as NameValueCollection; #endif -#if netcoreapp3_1 +#if net6_0 internetExplorerPreferences = BaseConfiguration.GetNameValueCollectionFromAppsettings("InternetExplorerPreferences"); #endif var options = new InternetExplorerOptions @@ -460,7 +460,7 @@ private OpenQA.Selenium.Edge.EdgeOptions EdgeOptions edgeChromiumExtensions = ConfigurationManager.GetSection("EdgeChromiumExtensions") as NameValueCollection; edgeChromiumArguments = ConfigurationManager.GetSection("EdgeChromiumArguments") as NameValueCollection; #endif -#if netcoreapp3_1 +#if net6_0 edgeChromiumPreferences = BaseConfiguration.GetNameValueCollectionFromAppsettings("EdgeChromiumPreferences"); edgeChromiumExtensions = BaseConfiguration.GetNameValueCollectionFromAppsettings("EdgeChromiumExtensions"); edgeChromiumArguments = BaseConfiguration.GetNameValueCollectionFromAppsettings("EdgeChromiumArguments"); @@ -602,7 +602,7 @@ public void Start() { this.FirefoxOptions.BrowserExecutableLocation = BaseConfiguration.FirefoxBrowserExecutableLocation; } -#if netcoreapp3_1 +#if net6_0 FirefoxDriverService serviceFirefox = FirefoxDriverService.CreateDefaultService(); serviceFirefox.Host = "::1"; this.driver = string.IsNullOrEmpty(BaseConfiguration.PathToFirefoxDriverDirectory) ? new FirefoxDriver(serviceFirefox, this.SetDriverOptions(this.FirefoxOptions)) : new FirefoxDriver(BaseConfiguration.PathToFirefoxDriverDirectory, this.SetDriverOptions(this.FirefoxOptions)); @@ -699,7 +699,7 @@ private void SetupRemoteWebDriver() driverCapabilitiesConf = ConfigurationManager.GetSection("DriverCapabilities") as NameValueCollection; settings = ConfigurationManager.GetSection("environments/" + this.CrossBrowserEnvironment) as NameValueCollection; #endif -#if netcoreapp3_1 +#if net6_0 driverCapabilitiesConf = BaseConfiguration.GetNameValueCollectionFromAppsettings("DriverCapabilities"); settings = BaseConfiguration.GetNameValueCollectionFromAppsettings("environments:" + this.CrossBrowserEnvironment); #endif diff --git a/OcarambaLite/DriverContextHelper.cs b/OcarambaLite/DriverContextHelper.cs index 98010dd26..5f40bfa81 100644 --- a/OcarambaLite/DriverContextHelper.cs +++ b/OcarambaLite/DriverContextHelper.cs @@ -54,7 +54,12 @@ public partial class DriverContext public string SaveScreenshot(ErrorDetail errorDetail, string folder, string title) { var fileName = string.Format(CultureInfo.CurrentCulture, "{0}_{1}_{2}.png", title, errorDetail.DateTime.ToString("yyyy-MM-dd HH-mm-ss-fff", CultureInfo.CurrentCulture), "browser"); +#if net47 var correctFileName = Path.GetInvalidFileNameChars().Aggregate(fileName, (current, c) => current.Replace(c.ToString(CultureInfo.CurrentCulture), string.Empty)); +#endif +#if net6_0 + var correctFileName = Path.GetInvalidFileNameChars().Aggregate(fileName, (current, c) => current.Replace(c.ToString(CultureInfo.CurrentCulture), string.Empty, StringComparison.InvariantCultureIgnoreCase)); +#endif correctFileName = Regex.Replace(correctFileName, "[^0-9a-zA-Z._]+", "_"); correctFileName = NameHelper.ShortenFileName(folder, correctFileName, "_", 255); @@ -95,7 +100,12 @@ public string SavePageSource(string fileName) } var pageSource = this.driver.PageSource; +#if net47 pageSource = pageSource.Replace("", string.Format(CultureInfo.CurrentCulture, "", BaseConfiguration.Host)); +#endif +#if net6_0 + pageSource = pageSource.Replace("", string.Format(CultureInfo.CurrentCulture, "", BaseConfiguration.Host), StringComparison.InvariantCultureIgnoreCase); +#endif File.WriteAllText(path, pageSource); FilesHelper.WaitForFileOfGivenName(BaseConfiguration.LongTimeout, fileNameWithExtension, this.PageSourceFolder); Logger.Error(CultureInfo.CurrentCulture, "Test failed: page Source saved to {0}.", path); @@ -147,7 +157,12 @@ public bool LogJavaScriptErrors() jsErrors = this.driver.Manage() .Logs.GetLog(LogType.Browser) - .Where(x => BaseConfiguration.JavaScriptErrorTypes.Any(e => x.Message.Contains(e))); +#if net47 + .Where(x => BaseConfiguration.JavaScriptErrorTypes.Any(predicate: e => x.Message.Contains(e))); +#endif +#if net6_0 + .Where(x => BaseConfiguration.JavaScriptErrorTypes.Any(predicate: e => x.Message.Contains(e, StringComparison.InvariantCultureIgnoreCase))); +#endif } catch (NullReferenceException) { @@ -208,7 +223,7 @@ private FirefoxOptions AddFirefoxArguments(FirefoxOptions option) #if net47 firefoxArguments = ConfigurationManager.GetSection("FirefoxArguments") as NameValueCollection; #endif -#if netcoreapp3_1 +#if net6_0 firefoxArguments = BaseConfiguration.GetNameValueCollectionFromAppsettings("FirefoxArguments"); #endif @@ -289,11 +304,21 @@ private BrowserType GetBrowserTypeForRemoteDriver(NameValueCollection settings) if (!supportedBrowser) { +#if net47 if (this.CrossBrowserEnvironment.ToLower(CultureInfo.CurrentCulture).Contains(BrowserType.Android.ToString().ToLower(CultureInfo.CurrentCulture))) +#endif +#if net6_0 + if (this.CrossBrowserEnvironment.ToLower(CultureInfo.CurrentCulture).Contains(BrowserType.Android.ToString().ToLower(CultureInfo.CurrentCulture), StringComparison.InvariantCultureIgnoreCase)) +#endif { browserType = BrowserType.Chrome; } +#if net47 else if (this.CrossBrowserEnvironment.ToLower(CultureInfo.CurrentCulture).Contains(BrowserType.Iphone.ToString().ToLower(CultureInfo.CurrentCulture))) +#endif +#if net6_0 + else if (this.CrossBrowserEnvironment.ToLower(CultureInfo.CurrentCulture).Contains(BrowserType.Iphone.ToString().ToLower(CultureInfo.CurrentCulture), StringComparison.InvariantCultureIgnoreCase)) +#endif { browserType = BrowserType.Safari; } @@ -347,16 +372,30 @@ private void SetRemoteDriverBrowserOptions(NameValueCollection driverCapabilitie { capabilities.Add("sessionName", this.TestTitle); } - +#if net47 if (BaseConfiguration.RemoteWebDriverHub.ToString().ToLower().Contains("browserstack")) +#endif +#if net6_0 + if (BaseConfiguration.RemoteWebDriverHub.ToString().ToLower(CultureInfo.CurrentCulture).Contains("browserstack", StringComparison.InvariantCultureIgnoreCase)) +#endif { browserOptions.AddAdditionalOption("bstack:options", capabilities); } +#if net47 else if (BaseConfiguration.RemoteWebDriverHub.ToString().ToLower().Contains("saucelabs")) +#endif +#if net6_0 + else if (BaseConfiguration.RemoteWebDriverHub.ToString().ToLower(CultureInfo.CurrentCulture).Contains("saucelabs", StringComparison.InvariantCultureIgnoreCase)) +#endif { browserOptions.AddAdditionalOption("sauce:options", capabilities); } +#if net47 else if (BaseConfiguration.RemoteWebDriverHub.ToString().ToLower().Contains("testingbot")) +#endif +#if net6_0 + else if (BaseConfiguration.RemoteWebDriverHub.ToString().ToLower(CultureInfo.CurrentCulture).Contains("testingbot", StringComparison.InvariantCultureIgnoreCase)) +#endif { browserOptions.AddAdditionalOption("tb:options", capabilities); } diff --git a/OcarambaLite/Extensions/WebDriverExtensions.cs b/OcarambaLite/Extensions/WebDriverExtensions.cs index 020fa1776..5f46dfb2c 100644 --- a/OcarambaLite/Extensions/WebDriverExtensions.cs +++ b/OcarambaLite/Extensions/WebDriverExtensions.cs @@ -40,7 +40,7 @@ public static class WebDriverExtensions #if net47 private static readonly NLog.Logger Logger = LogManager.GetCurrentClassLogger(); #endif -#if netcoreapp3_1 +#if net6_0 private static readonly NLog.Logger Logger = NLog.Web.NLogBuilder.ConfigureNLog("nlog.config").GetCurrentClassLogger(); #endif @@ -190,7 +190,7 @@ public static void SwitchToWindowUsingUrl(this IWebDriver webDriver, Uri url, do foreach (var handle in webDriver.WindowHandles) { webDriver.SwitchTo().Window(handle); - if (driver.Url.Equals(url.ToString())) + if (driver.Url.Equals(url.ToString(), StringComparison.Ordinal)) { return true; } @@ -242,11 +242,23 @@ public static bool PageSourceContainsCase(this IWebDriver webDriver, string text if (isCaseSensitive) { +#if net47 condition = drv => drv.PageSource.Contains(text); +#endif +#if net6_0 + condition = drv => drv.PageSource.Contains(text, StringComparison.InvariantCultureIgnoreCase); +#endif + } else { +#if net47 condition = drv => drv.PageSource.ToUpperInvariant().Contains(text.ToUpperInvariant()); +#endif +#if net6_0 + condition = drv => drv.PageSource.ToUpperInvariant().Contains(text.ToUpperInvariant(), StringComparison.InvariantCultureIgnoreCase); +#endif + } if (timeoutInSeconds > 0) @@ -366,7 +378,12 @@ public static void DragAndDropJs(this IWebDriver webDriver, IWebElement source, /// The web driver. private static void ApproveCertificateForInternetExplorer(this IWebDriver webDriver) { +#if net47 if ((BaseConfiguration.TestBrowser.Equals(BrowserType.InternetExplorer) || BaseConfiguration.TestBrowser.Equals(BrowserType.IE)) && webDriver.Title.Contains("Certificate")) +#endif +#if net6_0 + if ((BaseConfiguration.TestBrowser.Equals(BrowserType.InternetExplorer) || BaseConfiguration.TestBrowser.Equals(BrowserType.IE)) && webDriver.Title.Contains("Certificate", StringComparison.InvariantCultureIgnoreCase)) +#endif { webDriver.FindElement(By.Id("overridelink")).JavaScriptClick(); } diff --git a/OcarambaLite/Extensions/WebElementExtensions.cs b/OcarambaLite/Extensions/WebElementExtensions.cs index 40a5beddb..78323d739 100644 --- a/OcarambaLite/Extensions/WebElementExtensions.cs +++ b/OcarambaLite/Extensions/WebElementExtensions.cs @@ -40,7 +40,7 @@ public static class WebElementExtensions /// public static bool IsElementTextEqualsToExpected(this IWebElement webElement, string text) { - return webElement.Text.Equals(text); + return webElement.Text.Equals(text, StringComparison.Ordinal); } /// diff --git a/OcarambaLite/Helpers/FilesHelper.cs b/OcarambaLite/Helpers/FilesHelper.cs index aee9b54f1..a32e5ec5b 100644 --- a/OcarambaLite/Helpers/FilesHelper.cs +++ b/OcarambaLite/Helpers/FilesHelper.cs @@ -44,7 +44,7 @@ public static class FilesHelper #if net47 private static readonly NLog.Logger Logger = LogManager.GetCurrentClassLogger(); #endif -#if netcoreapp3_1 +#if net6_0 private static readonly NLog.Logger Logger = NLog.Web.NLogBuilder.ConfigureNLog("nlog.config").GetCurrentClassLogger(); #endif diff --git a/OcarambaLite/Helpers/NameHelper.cs b/OcarambaLite/Helpers/NameHelper.cs index 44001e367..84546093d 100644 --- a/OcarambaLite/Helpers/NameHelper.cs +++ b/OcarambaLite/Helpers/NameHelper.cs @@ -39,7 +39,7 @@ public static class NameHelper #if net47 private static readonly NLog.Logger Logger = LogManager.GetCurrentClassLogger(); #endif -#if netcoreapp3_1 +#if net6_0 private static readonly NLog.Logger Logger = NLog.Web.NLogBuilder.ConfigureNLog("nlog.config").GetCurrentClassLogger(); #endif @@ -77,8 +77,12 @@ public static string RandomName(int length) public static string ShortenFileName(string folder, string fileName, string pattern, int maxLength) { Logger.Debug(CultureInfo.CurrentCulture, "Length of the file full name is {0} characters", (folder + fileName).Length); - - while (((folder + fileName).Length > maxLength) && fileName.Contains(pattern)) +#if net47 + while (!((folder + fileName).Length <= maxLength || !fileName.Contains(pattern))) +#endif +#if net6_0 + while (!((folder + fileName).Length <= maxLength || !fileName.Contains(pattern, StringComparison.InvariantCultureIgnoreCase))) +#endif { Logger.Trace(CultureInfo.CurrentCulture, "Length of the file full name is over {0} characters removing first occurrence of {1}", maxLength, pattern); Regex rgx = new Regex(pattern); diff --git a/OcarambaLite/Helpers/PerformanceHelper.cs b/OcarambaLite/Helpers/PerformanceHelper.cs index ac1ecd587..6d583f6ea 100644 --- a/OcarambaLite/Helpers/PerformanceHelper.cs +++ b/OcarambaLite/Helpers/PerformanceHelper.cs @@ -38,7 +38,7 @@ public class PerformanceHelper #if net47 private static readonly NLog.Logger Logger = LogManager.GetCurrentClassLogger(); #endif -#if netcoreapp3_1 +#if net6_0 private static readonly NLog.Logger Logger = NLog.Web.NLogBuilder.ConfigureNLog("nlog.config").GetCurrentClassLogger(); #endif diff --git a/OcarambaLite/Helpers/PrintPerformanceResultsHelper.cs b/OcarambaLite/Helpers/PrintPerformanceResultsHelper.cs index 1c5999ea2..217ec6ebb 100644 --- a/OcarambaLite/Helpers/PrintPerformanceResultsHelper.cs +++ b/OcarambaLite/Helpers/PrintPerformanceResultsHelper.cs @@ -25,7 +25,7 @@ namespace Ocaramba.Helpers using System.ComponentModel; using System.Diagnostics; using System.Linq; -#if netcoreapp3_1 +#if net6_0 using System.Management.Automation; #endif using NLog; @@ -38,7 +38,7 @@ public static class PrintPerformanceResultsHelper #if net47 private static readonly NLog.Logger Logger = LogManager.GetCurrentClassLogger(); #endif -#if netcoreapp3_1 +#if net6_0 private static readonly NLog.Logger Logger = NLog.Web.NLogBuilder.ConfigureNLog("nlog.config").GetCurrentClassLogger(); #endif @@ -150,7 +150,7 @@ public static void PrintResultsInAppVeyor(IOrderedEnumerable measuresToP } #endif -#if netcoreapp3_1 +#if net6_0 text = "Add-AppveyorTest -Name " + measuresToPrint.ElementAt(i); using (var ps = PowerShell.Create()) { diff --git a/OcarambaLite/Logger/MyEventFiringWebDriver.cs b/OcarambaLite/Logger/MyEventFiringWebDriver.cs index 659ca58a3..91034e9d6 100644 --- a/OcarambaLite/Logger/MyEventFiringWebDriver.cs +++ b/OcarambaLite/Logger/MyEventFiringWebDriver.cs @@ -35,7 +35,7 @@ public class MyEventFiringWebDriver : EventFiringWebDriver #if net47 private static readonly NLog.Logger Logger = LogManager.GetCurrentClassLogger(); #endif -#if netcoreapp3_1 +#if net6_0 private static readonly NLog.Logger Logger = NLog.Web.NLogBuilder.ConfigureNLog("nlog.config").GetCurrentClassLogger(); #endif diff --git a/OcarambaLite/Logger/TestLogger.cs b/OcarambaLite/Logger/TestLogger.cs index a5c3c4255..31b3dbb17 100644 --- a/OcarambaLite/Logger/TestLogger.cs +++ b/OcarambaLite/Logger/TestLogger.cs @@ -38,7 +38,7 @@ public class TestLogger #if net47 private static readonly NLog.Logger Logger = LogManager.GetCurrentClassLogger(); #endif -#if netcoreapp3_1 +#if net6_0 private static readonly NLog.Logger Logger = NLog.Web.NLogBuilder.ConfigureNLog("nlog.config").GetCurrentClassLogger(); #endif diff --git a/OcarambaLite/OcarambaLite.csproj b/OcarambaLite/OcarambaLite.csproj index eefc383d7..b9a4112ba 100644 --- a/OcarambaLite/OcarambaLite.csproj +++ b/OcarambaLite/OcarambaLite.csproj @@ -1,8 +1,8 @@  - netcoreapp3.1 - net472;netcoreapp3.1 + net472;netcoreapp6 + net472;net6.0 Framework to automate tests using Selenium WebDriver (lighten version without selenium drivers) Copyright © 2015 Objectivity Bespoke Software Specialists @@ -38,7 +38,7 @@ - + 3.1.2 @@ -68,8 +68,8 @@ - - netcoreapp3_1 + + net6_0 diff --git a/OcarambaLite/Verify.cs b/OcarambaLite/Verify.cs index daf697fb3..f5af59836 100644 --- a/OcarambaLite/Verify.cs +++ b/OcarambaLite/Verify.cs @@ -37,7 +37,7 @@ public static class Verify #if net47 private static readonly NLog.Logger Logger = LogManager.GetCurrentClassLogger(); #endif -#if netcoreapp3_1 +#if net6_0 private static readonly NLog.Logger Logger = NLog.Web.NLogBuilder.ConfigureNLog("nlog.config").GetCurrentClassLogger(); #endif diff --git a/OcarambaLite/WebElements/Select.cs b/OcarambaLite/WebElements/Select.cs index 8dedfe1a7..0a07368f4 100644 --- a/OcarambaLite/WebElements/Select.cs +++ b/OcarambaLite/WebElements/Select.cs @@ -39,7 +39,7 @@ public class Select : WebElement #if net47 private static readonly NLog.Logger Logger = LogManager.GetCurrentClassLogger(); #endif -#if netcoreapp3_1 +#if net6_0 private static readonly NLog.Logger Logger = NLog.Web.NLogBuilder.ConfigureNLog("nlog.config").GetCurrentClassLogger(); #endif @@ -190,7 +190,7 @@ public bool IsSelectOptionAvailable(string option, double timeout) var element = this.WaitUntilDropdownIsPopulated(timeout); var selectElement = new SelectElement(element); - return selectElement.Options.Any(el => el.Text.Equals(option)); + return selectElement.Options.Any(el => el.Text.Equals(option, StringComparison.Ordinal)); } /// diff --git a/OcarambaLite/WebElements/Table.cs b/OcarambaLite/WebElements/Table.cs index c4a1c4bfb..01b1f4f59 100644 --- a/OcarambaLite/WebElements/Table.cs +++ b/OcarambaLite/WebElements/Table.cs @@ -36,7 +36,7 @@ public class Table : WebElement #if net47 private static readonly NLog.Logger Logger = LogManager.GetCurrentClassLogger(); #endif -#if netcoreapp3_1 +#if net6_0 private static readonly NLog.Logger Logger = NLog.Web.NLogBuilder.ConfigureNLog("nlog.config").GetCurrentClassLogger(); #endif From 0734b47ab6b1164e8e374725309bc1aab205079c Mon Sep 17 00:00:00 2001 From: pawelstryczek Date: Fri, 27 Jan 2023 15:54:56 +0100 Subject: [PATCH 03/25] Update from .net core 3.1 to .net6.0 --- ExecutingTestsOnWindowsAzure1.ps1 | 14 +++++++------- ExecutingTestsOnWindowsAzure2.ps1 | 22 +++++++++++----------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/ExecutingTestsOnWindowsAzure1.ps1 b/ExecutingTestsOnWindowsAzure1.ps1 index 8d9fe97fd..dfb00b85a 100644 --- a/ExecutingTestsOnWindowsAzure1.ps1 +++ b/ExecutingTestsOnWindowsAzure1.ps1 @@ -1,14 +1,14 @@ echo '********************************************Executing tests********************************************' -echo '********************************************netcoreapp3 tests********************************************' +echo '********************************************net6.0 tests********************************************' -.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.NUnit\bin\Release\netcoreapp3.1" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$($env:CHROMEWEBDRIVER)" -logValues -json -.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.Angular\bin\Release\netcoreapp3.1" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$($env:CHROMEWEBDRIVER)" -logValues -json -.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.NUnitExtentReports\bin\Release\netcoreapp3.1" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$($env:CHROMEWEBDRIVER)" -logValues -json +.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.NUnit\bin\Release\net6.0" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$($env:CHROMEWEBDRIVER)" -logValues -json +.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.Angular\bin\Release\net6.0" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$($env:CHROMEWEBDRIVER)" -logValues -json +.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.NUnitExtentReports\bin\Release\net6.0" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$($env:CHROMEWEBDRIVER)" -logValues -json -dotnet vstest .\Ocaramba.Tests.Angular\bin\Release\netcoreapp3.1\Ocaramba.Tests.Angular.dll ` - .\Ocaramba.Tests.NUnit\bin\Release\netcoreapp3.1\Ocaramba.Tests.NUnit.dll ` - .\Ocaramba.Tests.NUnitExtentReports\bin\Release\netcoreapp3.1\Ocaramba.Tests.NUnitExtentReports.dll ` +dotnet vstest .\Ocaramba.Tests.Angular\bin\Release\net6.0\Ocaramba.Tests.Angular.dll ` + .\Ocaramba.Tests.NUnit\bin\Release\net6.0\Ocaramba.Tests.NUnit.dll ` + .\Ocaramba.Tests.NUnitExtentReports\bin\Release\net6.0\Ocaramba.Tests.NUnitExtentReports.dll ` /TestCaseFilter:"(TestCategory!=TakingScreehShots)" /Parallel ` --logger:"trx;LogFileName=Ocaramba.Tests.netcoreapp.trx" diff --git a/ExecutingTestsOnWindowsAzure2.ps1 b/ExecutingTestsOnWindowsAzure2.ps1 index 954f5f26f..853e962ee 100644 --- a/ExecutingTestsOnWindowsAzure2.ps1 +++ b/ExecutingTestsOnWindowsAzure2.ps1 @@ -1,26 +1,26 @@ echo '********************************************Executing tests********************************************' -echo '********************************************netcoreapp3 tests********************************************' +echo '********************************************net6.0 tests********************************************' -.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.Features\bin\Release\netcoreapp3.1" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$($env:CHROMEWEBDRIVER)" -logValues -json -.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.Xunit\bin\Release\netcoreapp3.1" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$($env:CHROMEWEBDRIVER)" -logValues -json -.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.MsTest\bin\Release\netcoreapp3.1" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$($env:CHROMEWEBDRIVER)" -logValues -json -.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.UnitTests\bin\Release\netcoreapp3.1" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$($env:CHROMEWEBDRIVER)" -logValues -json +.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.Features\bin\Release\net6.0" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$($env:CHROMEWEBDRIVER)" -logValues -json +.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.Xunit\bin\Release\net6.0" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$($env:CHROMEWEBDRIVER)" -logValues -json +.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.MsTest\bin\Release\net6.0" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$($env:CHROMEWEBDRIVER)" -logValues -json +.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.UnitTests\bin\Release\net6.0" "appsettings.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$($env:CHROMEWEBDRIVER)" -logValues -json -dotnet vstest .\Ocaramba.Tests.Features\bin\Release\netcoreapp3.1\Ocaramba.Tests.Features.dll ` - .\Ocaramba.Tests.Xunit\bin\Release\netcoreapp3.1\Ocaramba.Tests.Xunit.dll ` - .\Ocaramba.Tests.MsTest\bin\Release\netcoreapp3.1\Ocaramba.Tests.MsTest.dll ` - .\Ocaramba.UnitTests\bin\Release\netcoreapp3.1\Ocaramba.UnitTests.dll ` +dotnet vstest .\Ocaramba.Tests.Features\bin\Release\net6.0\Ocaramba.Tests.Features.dll ` + .\Ocaramba.Tests.Xunit\bin\Release\net6.0\Ocaramba.Tests.Xunit.dll ` + .\Ocaramba.Tests.MsTest\bin\Release\net6.0\Ocaramba.Tests.MsTest.dll ` + .\Ocaramba.UnitTests\bin\Release\net6.0\Ocaramba.UnitTests.dll ` /TestCaseFilter:"(TestCategory!=TakingScreehShots)" /Parallel ` --logger:"trx;LogFileName=Ocaramba.Tests.netcoreapp.xml" echo '********************************************EdgeChrominum tests********************************************' -.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.NUnit\bin\Release\netcoreapp3.1" "appsettings.json" "appSettings" "browser|PathToEdgeChromiumDriverDirectory" "EdgeChromium|$($env:EDGEWEBDRIVER)" -logValues -json +.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.NUnit\bin\Release\net6.0" "appsettings.json" "appSettings" "browser|PathToEdgeChromiumDriverDirectory" "EdgeChromium|$($env:EDGEWEBDRIVER)" -logValues -json -dotnet vstest .\Ocaramba.Tests.NUnit\bin\Release\netcoreapp3.1\Ocaramba.Tests.NUnit.dll ` +dotnet vstest .\Ocaramba.Tests.NUnit\bin\Release\net6.0\Ocaramba.Tests.NUnit.dll ` /TestCaseFilter:"(TestCategory=Grid)" /Parallel ` --logger:"trx;LogFileName=Ocaramba.Tests.EdgeChrominum.xml" From 735a6c3982480047d224106eaf1daddb2a239497 Mon Sep 17 00:00:00 2001 From: pawelstryczek Date: Fri, 27 Jan 2023 17:43:58 +0100 Subject: [PATCH 04/25] Fix in DriverContextHelper.cs --- Ocaramba.sln | 4 +-- OcarambaLite/DriverContextHelper.cs | 48 +++++++++++++++++------------ 2 files changed, 30 insertions(+), 22 deletions(-) diff --git a/Ocaramba.sln b/Ocaramba.sln index 951da014e..34f1bc60e 100644 --- a/Ocaramba.sln +++ b/Ocaramba.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.29728.190 +# Visual Studio Version 17 +VisualStudioVersion = 17.4.33213.308 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ocaramba", "Ocaramba\Ocaramba.csproj", "{A357D58B-61BF-4E84-94FF-39DE8D2B7834}" EndProject diff --git a/OcarambaLite/DriverContextHelper.cs b/OcarambaLite/DriverContextHelper.cs index 5f40bfa81..68a44a45b 100644 --- a/OcarambaLite/DriverContextHelper.cs +++ b/OcarambaLite/DriverContextHelper.cs @@ -154,13 +154,16 @@ public bool LogJavaScriptErrors() Logger.Debug(CultureInfo.CurrentCulture, "Checking JavaScript error(s) in browser"); try { +#if net47 jsErrors = this.driver.Manage() .Logs.GetLog(LogType.Browser) -#if net47 .Where(x => BaseConfiguration.JavaScriptErrorTypes.Any(predicate: e => x.Message.Contains(e))); #endif #if net6_0 + jsErrors = + this.driver.Manage() + .Logs.GetLog(LogType.Browser) .Where(x => BaseConfiguration.JavaScriptErrorTypes.Any(predicate: e => x.Message.Contains(e, StringComparison.InvariantCultureIgnoreCase))); #endif } @@ -302,28 +305,32 @@ private BrowserType GetBrowserTypeForRemoteDriver(NameValueCollection settings) Logger.Info(CultureInfo.CurrentCulture, "supportedBrowser {0} : {1}", supportedBrowser, browserType); } +#if net47 if (!supportedBrowser) { -#if net47 if (this.CrossBrowserEnvironment.ToLower(CultureInfo.CurrentCulture).Contains(BrowserType.Android.ToString().ToLower(CultureInfo.CurrentCulture))) -#endif -#if net6_0 - if (this.CrossBrowserEnvironment.ToLower(CultureInfo.CurrentCulture).Contains(BrowserType.Android.ToString().ToLower(CultureInfo.CurrentCulture), StringComparison.InvariantCultureIgnoreCase)) -#endif { browserType = BrowserType.Chrome; } -#if net47 else if (this.CrossBrowserEnvironment.ToLower(CultureInfo.CurrentCulture).Contains(BrowserType.Iphone.ToString().ToLower(CultureInfo.CurrentCulture))) + { + browserType = BrowserType.Safari; + } + } #endif #if net6_0 + if (!supportedBrowser) + { + if (this.CrossBrowserEnvironment.ToLower(CultureInfo.CurrentCulture).Contains(BrowserType.Android.ToString().ToLower(CultureInfo.CurrentCulture), StringComparison.InvariantCultureIgnoreCase)) + { + browserType = BrowserType.Chrome; + } else if (this.CrossBrowserEnvironment.ToLower(CultureInfo.CurrentCulture).Contains(BrowserType.Iphone.ToString().ToLower(CultureInfo.CurrentCulture), StringComparison.InvariantCultureIgnoreCase)) -#endif { browserType = BrowserType.Safari; } } - +#endif return browserType; } @@ -374,31 +381,32 @@ private void SetRemoteDriverBrowserOptions(NameValueCollection driverCapabilitie } #if net47 if (BaseConfiguration.RemoteWebDriverHub.ToString().ToLower().Contains("browserstack")) -#endif -#if net6_0 - if (BaseConfiguration.RemoteWebDriverHub.ToString().ToLower(CultureInfo.CurrentCulture).Contains("browserstack", StringComparison.InvariantCultureIgnoreCase)) -#endif { browserOptions.AddAdditionalOption("bstack:options", capabilities); } -#if net47 else if (BaseConfiguration.RemoteWebDriverHub.ToString().ToLower().Contains("saucelabs")) -#endif -#if net6_0 - else if (BaseConfiguration.RemoteWebDriverHub.ToString().ToLower(CultureInfo.CurrentCulture).Contains("saucelabs", StringComparison.InvariantCultureIgnoreCase)) -#endif { browserOptions.AddAdditionalOption("sauce:options", capabilities); } -#if net47 else if (BaseConfiguration.RemoteWebDriverHub.ToString().ToLower().Contains("testingbot")) + { + browserOptions.AddAdditionalOption("tb:options", capabilities); + } #endif #if net6_0 + if (BaseConfiguration.RemoteWebDriverHub.ToString().ToLower(CultureInfo.CurrentCulture).Contains("browserstack", StringComparison.InvariantCultureIgnoreCase)) + { + browserOptions.AddAdditionalOption("bstack:options", capabilities); + } + else if (BaseConfiguration.RemoteWebDriverHub.ToString().ToLower(CultureInfo.CurrentCulture).Contains("saucelabs", StringComparison.InvariantCultureIgnoreCase)) + { + browserOptions.AddAdditionalOption("sauce:options", capabilities); + } else if (BaseConfiguration.RemoteWebDriverHub.ToString().ToLower(CultureInfo.CurrentCulture).Contains("testingbot", StringComparison.InvariantCultureIgnoreCase)) -#endif { browserOptions.AddAdditionalOption("tb:options", capabilities); } +#endif } [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity", Justification = "Loop through all internetExplorerPreferences")] From caf4bc6dea0b688c4a15cf0712d2531fa14fd99c Mon Sep 17 00:00:00 2001 From: pawelstryczek Date: Fri, 27 Jan 2023 19:04:41 +0100 Subject: [PATCH 05/25] Additional update related to migrate to .net 6 --- .../Ocaramba.Tests.CloudProviderCrossBrowser.csproj | 2 +- Ocaramba.Tests.MsTest/Ocaramba.Tests.MsTest.csproj | 2 +- Ocaramba.Tests.NUnit/Ocaramba.Tests.NUnit.csproj | 2 +- .../Ocaramba.Tests.NUnitExtentReports.csproj | 2 +- .../Ocaramba.Tests.PageObjects.csproj | 2 +- Ocaramba.Tests.Xunit/Ocaramba.Tests.Xunit.csproj | 2 +- Ocaramba/Ocaramba.csproj | 6 +++--- OcarambaLite/Logger/MyEventFiringWebDriver.cs | 2 +- OcarambaLite/OcarambaLite.csproj | 10 +++++----- 9 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Ocaramba.Tests.CloudProviderCrossBrowser/Ocaramba.Tests.CloudProviderCrossBrowser.csproj b/Ocaramba.Tests.CloudProviderCrossBrowser/Ocaramba.Tests.CloudProviderCrossBrowser.csproj index 52e8039a3..39bad70a9 100644 --- a/Ocaramba.Tests.CloudProviderCrossBrowser/Ocaramba.Tests.CloudProviderCrossBrowser.csproj +++ b/Ocaramba.Tests.CloudProviderCrossBrowser/Ocaramba.Tests.CloudProviderCrossBrowser.csproj @@ -17,7 +17,7 @@ - + diff --git a/Ocaramba.Tests.MsTest/Ocaramba.Tests.MsTest.csproj b/Ocaramba.Tests.MsTest/Ocaramba.Tests.MsTest.csproj index 1144273f1..b9453a373 100644 --- a/Ocaramba.Tests.MsTest/Ocaramba.Tests.MsTest.csproj +++ b/Ocaramba.Tests.MsTest/Ocaramba.Tests.MsTest.csproj @@ -13,7 +13,7 @@ - + diff --git a/Ocaramba.Tests.NUnit/Ocaramba.Tests.NUnit.csproj b/Ocaramba.Tests.NUnit/Ocaramba.Tests.NUnit.csproj index 645f79d9d..b34fee349 100644 --- a/Ocaramba.Tests.NUnit/Ocaramba.Tests.NUnit.csproj +++ b/Ocaramba.Tests.NUnit/Ocaramba.Tests.NUnit.csproj @@ -8,7 +8,7 @@ - + diff --git a/Ocaramba.Tests.NUnitExtentReports/Ocaramba.Tests.NUnitExtentReports.csproj b/Ocaramba.Tests.NUnitExtentReports/Ocaramba.Tests.NUnitExtentReports.csproj index 84ef8c6bd..c3702b469 100644 --- a/Ocaramba.Tests.NUnitExtentReports/Ocaramba.Tests.NUnitExtentReports.csproj +++ b/Ocaramba.Tests.NUnitExtentReports/Ocaramba.Tests.NUnitExtentReports.csproj @@ -7,7 +7,7 @@ - + diff --git a/Ocaramba.Tests.PageObjects/Ocaramba.Tests.PageObjects.csproj b/Ocaramba.Tests.PageObjects/Ocaramba.Tests.PageObjects.csproj index 9c946315c..f70c24ff8 100644 --- a/Ocaramba.Tests.PageObjects/Ocaramba.Tests.PageObjects.csproj +++ b/Ocaramba.Tests.PageObjects/Ocaramba.Tests.PageObjects.csproj @@ -11,7 +11,7 @@ - + diff --git a/Ocaramba.Tests.Xunit/Ocaramba.Tests.Xunit.csproj b/Ocaramba.Tests.Xunit/Ocaramba.Tests.Xunit.csproj index 281a6ac48..8e78f6e35 100644 --- a/Ocaramba.Tests.Xunit/Ocaramba.Tests.Xunit.csproj +++ b/Ocaramba.Tests.Xunit/Ocaramba.Tests.Xunit.csproj @@ -11,7 +11,7 @@ - + diff --git a/Ocaramba/Ocaramba.csproj b/Ocaramba/Ocaramba.csproj index 79f01b0ed..208b7b0b7 100644 --- a/Ocaramba/Ocaramba.csproj +++ b/Ocaramba/Ocaramba.csproj @@ -43,13 +43,13 @@ - 3.1.2 + 7.0.0 - 3.1.2 + 7.0.0 - 6.2.1 + 7.0.0 6.2.1 diff --git a/OcarambaLite/Logger/MyEventFiringWebDriver.cs b/OcarambaLite/Logger/MyEventFiringWebDriver.cs index 91034e9d6..d9363ce29 100644 --- a/OcarambaLite/Logger/MyEventFiringWebDriver.cs +++ b/OcarambaLite/Logger/MyEventFiringWebDriver.cs @@ -36,7 +36,7 @@ public class MyEventFiringWebDriver : EventFiringWebDriver private static readonly NLog.Logger Logger = LogManager.GetCurrentClassLogger(); #endif #if net6_0 - private static readonly NLog.Logger Logger = NLog.Web.NLogBuilder.ConfigureNLog("nlog.config").GetCurrentClassLogger(); + private static readonly Logger Logger = NLog.Web.NLogBuilder.ConfigureNLog("nlog.config").GetCurrentClassLogger(); #endif /// diff --git a/OcarambaLite/OcarambaLite.csproj b/OcarambaLite/OcarambaLite.csproj index b9a4112ba..bbcd72928 100644 --- a/OcarambaLite/OcarambaLite.csproj +++ b/OcarambaLite/OcarambaLite.csproj @@ -1,7 +1,7 @@  - net472;netcoreapp6 + net472;net6.0 net472;net6.0 Framework to automate tests using Selenium WebDriver (lighten version without selenium drivers) Copyright © 2015 @@ -27,7 +27,7 @@ - + all @@ -40,13 +40,13 @@ - 3.1.2 + 7.0.0 - 3.1.2 + 7.0.0 - 6.2.1 + 7.0.0 6.2.1 From 9985a24b24bf4b9f48301bfd631b5270b8122f51 Mon Sep 17 00:00:00 2001 From: pawelstryczek Date: Fri, 27 Jan 2023 19:28:09 +0100 Subject: [PATCH 06/25] Fix folder name to net6.0 convention --- ExecutingTestsOnDockerAzure.ps1 | 4 ++-- ExecutingTestsOnLinuxAzure.ps1 | 6 +++--- ExecutingTestsOnLinuxBrowserStackAzure.ps1 | 8 ++++---- Ocaramba/Ocaramba.csproj | 9 +++++++++ azure-pipelines.yml | 2 +- 5 files changed, 19 insertions(+), 10 deletions(-) diff --git a/ExecutingTestsOnDockerAzure.ps1 b/ExecutingTestsOnDockerAzure.ps1 index 306e605ad..e7e55c474 100644 --- a/ExecutingTestsOnDockerAzure.ps1 +++ b/ExecutingTestsOnDockerAzure.ps1 @@ -2,8 +2,8 @@ docker info docker ps -a docker exec ocaramba_selenium bash -c "ls ; sed -i '/Documentation/,+5 d' ./Ocaramba.sln ; dotnet build ./Ocaramba.sln" -docker exec ocaramba_selenium bash -c 'pwsh ./scripts/set_AppConfig_for_tests.ps1 \"./Ocaramba.Tests.NUnit/bin/Debug/netcoreapp3.1\" \"appsettings.Linux.json\" \"appSettings\" \"browser|PathToChromeDriverDirectory\" \"Chrome|/chromedriver\" -logValues -json' -docker exec ocaramba_selenium bash -c 'dotnet vstest ./Ocaramba.Tests.NUnit/bin/Debug/netcoreapp3.1/Ocaramba.Tests.NUnit.dll /TestCaseFilter:\"(TestCategory!=NotImplementedInCoreOrUploadDownload)\" /Parallel --logger:\"trx;LogFileName=Ocaramba.Tests.Docker.xml\"' +docker exec ocaramba_selenium bash -c 'pwsh ./scripts/set_AppConfig_for_tests.ps1 \"./Ocaramba.Tests.NUnit/bin/Debug/net6.0\" \"appsettings.Linux.json\" \"appSettings\" \"browser|PathToChromeDriverDirectory\" \"Chrome|/chromedriver\" -logValues -json' +docker exec ocaramba_selenium bash -c 'dotnet vstest ./Ocaramba.Tests.NUnit/bin/Debug/net6.0/Ocaramba.Tests.NUnit.dll /TestCaseFilter:\"(TestCategory!=NotImplementedInCoreOrUploadDownload)\" /Parallel --logger:\"trx;LogFileName=Ocaramba.Tests.Docker.xml\"' docker cp ocaramba_selenium:/Ocaramba/TestResults/Ocaramba.Tests.Docker.xml . diff --git a/ExecutingTestsOnLinuxAzure.ps1 b/ExecutingTestsOnLinuxAzure.ps1 index 367f72a01..07f17fb56 100644 --- a/ExecutingTestsOnLinuxAzure.ps1 +++ b/ExecutingTestsOnLinuxAzure.ps1 @@ -1,13 +1,13 @@ echo '********************************************Executing tests********************************************' -echo '********************************************netcoreapp3 tests********************************************' +echo '********************************************net6.0 tests********************************************' $Env:ASPNETCORE_ENVIRONMENT="Linux" echo $Env:ASPNETCORE_ENVIRONMENT -.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.NUnit\bin\Release\netcoreapp3.1" "appsettings.Linux.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$($env:CHROMEWEBDRIVER)" -logValues -json +.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.NUnit\bin\Release\net6.0" "appsettings.Linux.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$($env:CHROMEWEBDRIVER)" -logValues -json -dotnet vstest ./Ocaramba.Tests.NUnit/bin/Release/netcoreapp3.1/Ocaramba.Tests.NUnit.dll ` +dotnet vstest ./Ocaramba.Tests.NUnit/bin/Release/net6.0/Ocaramba.Tests.NUnit.dll ` /TestCaseFilter:"(TestCategory!=NotImplementedInCoreOrUploadDownload)" /Parallel ` --logger:"trx;LogFileName=Ocaramba.Tests.netcoreapp.xml" diff --git a/ExecutingTestsOnLinuxBrowserStackAzure.ps1 b/ExecutingTestsOnLinuxBrowserStackAzure.ps1 index d4ea88835..1939002ba 100644 --- a/ExecutingTestsOnLinuxBrowserStackAzure.ps1 +++ b/ExecutingTestsOnLinuxBrowserStackAzure.ps1 @@ -5,13 +5,13 @@ $Env:ASPNETCORE_ENVIRONMENT="Linux" echo $Env:ASPNETCORE_ENVIRONMENT -.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.CloudProviderCrossBrowser\bin\Release\netcoreapp3.1" "appsettings.Linux.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$($env:CHROMEWEBDRIVER)" -logValues -json +.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.CloudProviderCrossBrowser\bin\Release\net6.0" "appsettings.Linux.json" "appSettings" "browser|PathToChromeDriverDirectory" "Chrome|$($env:CHROMEWEBDRIVER)" -logValues -json -.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.CloudProviderCrossBrowser\bin\Release\netcoreapp3.1" "appsettings.Linux.json" "appSettings" "RemoteWebDriverHub" "https://$($env:MAPPED_ENV_BROWSERSTACKUSER):$($env:MAPPED_ENV_BROWSERSTACKKEY)@hub-cloud.browserstack.com/wd/hub" -json +.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.CloudProviderCrossBrowser\bin\Release\net6.0" "appsettings.Linux.json" "appSettings" "RemoteWebDriverHub" "https://$($env:MAPPED_ENV_BROWSERSTACKUSER):$($env:MAPPED_ENV_BROWSERSTACKKEY)@hub-cloud.browserstack.com/wd/hub" -json -.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.CloudProviderCrossBrowser\bin\Release\netcoreapp3.1" "appsettings.Linux.json" "DriverCapabilities" "buildName" "Ocaramba.Tests.BrowserStackCrossBrowser$($env:BuildVersion)" -logValues -json +.\scripts\set_AppConfig_for_tests.ps1 ".\Ocaramba.Tests.CloudProviderCrossBrowser\bin\Release\net6.0" "appsettings.Linux.json" "DriverCapabilities" "buildName" "Ocaramba.Tests.BrowserStackCrossBrowser$($env:BuildVersion)" -logValues -json -dotnet vstest ./Ocaramba.Tests.CloudProviderCrossBrowser/bin/Release/netcoreapp3.1/Ocaramba.Tests.CloudProviderCrossBrowser.dll ` +dotnet vstest ./Ocaramba.Tests.CloudProviderCrossBrowser/bin/Release/net6.0/Ocaramba.Tests.CloudProviderCrossBrowser.dll ` --logger:"trx;LogFileName=Ocaramba.Tests.BrowserStacknetcoreapp.xml" if($lastexitcode -ne 0) diff --git a/Ocaramba/Ocaramba.csproj b/Ocaramba/Ocaramba.csproj index 208b7b0b7..67050d283 100644 --- a/Ocaramba/Ocaramba.csproj +++ b/Ocaramba/Ocaramba.csproj @@ -81,6 +81,15 @@ true + disable + + 6 + + + + 6 + + diff --git a/azure-pipelines.yml b/azure-pipelines.yml index e9c0e1767..81a2d9fc0 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -241,7 +241,7 @@ stages: - task: ArchiveFiles@2 condition: always() inputs: - rootFolderOrFile: '$(System.DefaultWorkingDirectory)/Ocaramba.Tests.NUnitExtentReports/bin/Release/netcoreapp3.1/TestOutput' + rootFolderOrFile: '$(System.DefaultWorkingDirectory)/Ocaramba.Tests.NUnitExtentReports/bin/Release/net6.0/TestOutput' includeRootFolder: true archiveType: 'zip' archiveFile: '$(Build.ArtifactStagingDirectory)/ExtentReports_$(Build.BuildId).zip' From 5fe28ff430eb524a31950a9125089aa2cf710d45 Mon Sep 17 00:00:00 2001 From: pawelstryczek Date: Fri, 27 Jan 2023 20:38:02 +0100 Subject: [PATCH 07/25] Update readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7aa2f73ad..fa41f75bd 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ Project API documentation can be found here: http://objectivityltd.github.io/Oca **It provides the following features:** -- .NET Frameworks 4.7.2 and .NET Core 3.1 supported +- .NET Frameworks 4.7.2 and .NET 6.0 supported - Cross-Platform Windows, Linux and macOS systems supported - Supports continuous integration tools like Azure DevOps, Teamcity, Jenkins and others. - Ready for parallel tests execution, more details [here](https://github.com/ObjectivityLtd/Ocaramba/wiki/Selenium%20Parallel%20tests%20execution) From 40d2f6cb337d45e3dc288dbe8d2a77c0c8bc7fa2 Mon Sep 17 00:00:00 2001 From: pawelstryczek Date: Sat, 28 Jan 2023 13:30:28 +0100 Subject: [PATCH 08/25] Update WaitHelper method --- OcarambaLite/Helpers/WaitHelper.cs | 44 +++++++++++++----------------- 1 file changed, 19 insertions(+), 25 deletions(-) diff --git a/OcarambaLite/Helpers/WaitHelper.cs b/OcarambaLite/Helpers/WaitHelper.cs index 694aa6bf9..79175fddf 100644 --- a/OcarambaLite/Helpers/WaitHelper.cs +++ b/OcarambaLite/Helpers/WaitHelper.cs @@ -84,39 +84,33 @@ public static void Wait(Func condition, TimeSpan timeout, TimeSpan sleepIn /// public static bool Wait(Func condition, TimeSpan timeout, TimeSpan sleepInterval) { - var result = false; - var start = DateTime.Now; - var canceller = new CancellationTokenSource(); - var task = Task.Factory.StartNew(condition, canceller.Token); + var taskConditionCheck = Task.Run(async () => + { + while (!condition()) + { + await Task.Delay(sleepInterval); + } + }); + + var taskTimeoutCheck = Task.Run(async () => + { + await Task.Delay(timeout); + }); - while ((DateTime.Now - start).TotalSeconds < timeout.TotalSeconds) + while (true) { - if (task.IsCompleted) + if (taskConditionCheck.IsCompleted) { - if (task.Result) - { - result = true; - canceller.Cancel(); - break; - } + return true; + } - task = Task.Factory.StartNew( - () => - { - using (canceller.Token.Register(Thread.CurrentThread.Abort)) - { - return condition(); - } - }, - canceller.Token); + if (taskTimeoutCheck.IsCompleted) + { + return false; } Thread.Sleep(sleepInterval); } - - canceller.Cancel(); - canceller.Dispose(); - return result; } } } From b985abcc943dff3e4f0d903bd2a910616a62102f Mon Sep 17 00:00:00 2001 From: pawelstryczek Date: Sat, 28 Jan 2023 15:42:34 +0100 Subject: [PATCH 09/25] Update ExecutingTestsOnLinux.ps1 --- ExecutingTestsOnLinux.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ExecutingTestsOnLinux.ps1 b/ExecutingTestsOnLinux.ps1 index 3315a5c05..46dd235e2 100644 --- a/ExecutingTestsOnLinux.ps1 +++ b/ExecutingTestsOnLinux.ps1 @@ -25,12 +25,12 @@ dir $TempFileUnzipPath echo '********************************************Executing tests********************************************' echo '********************************************NUnit tests********************************************' +dotnet test --configuration Debug --filter TestCategory!=NotImplementedInCoreOrUploadDownload --no-build --no-restore Ocaramba.UnitTests -maxCpuCount --test-adapter-path:. --logger:Appveyor + dotnet test --configuration Debug --no-build --no-restore Ocaramba.Tests.Angular -maxCpuCount --test-adapter-path:. --logger:Appveyor dotnet test --configuration Debug --filter TestCategory!=NotImplementedInCoreOrUploadDownload --no-build --no-restore Ocaramba.Tests.NUnit -maxCpuCount --test-adapter-path:. --logger:Appveyor -dotnet test --configuration Debug --filter TestCategory!=NotImplementedInCoreOrUploadDownload --no-build --no-restore Ocaramba.UnitTests -maxCpuCount --test-adapter-path:. --logger:Appveyor - echo '********************************************XUnit tests********************************************' dotnet test --configuration Debug --no-build --no-restore Ocaramba.Tests.Xunit -maxCpuCount --test-adapter-path:. --logger:Appveyor From 3324d700f5c408e979faca5beee23d78c89eeada Mon Sep 17 00:00:00 2001 From: pawelstryczek Date: Sat, 28 Jan 2023 16:10:27 +0100 Subject: [PATCH 10/25] Nunit update --- Ocaramba.Tests.NUnit/Ocaramba.Tests.NUnit.csproj | 8 ++++---- Ocaramba.UnitTests/Ocaramba.UnitTests.csproj | 6 +++--- Ocaramba/Ocaramba.csproj | 3 +-- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/Ocaramba.Tests.NUnit/Ocaramba.Tests.NUnit.csproj b/Ocaramba.Tests.NUnit/Ocaramba.Tests.NUnit.csproj index b34fee349..b12c4a72b 100644 --- a/Ocaramba.Tests.NUnit/Ocaramba.Tests.NUnit.csproj +++ b/Ocaramba.Tests.NUnit/Ocaramba.Tests.NUnit.csproj @@ -11,9 +11,9 @@ - - - + + + all runtime; build; native; contentfiles; analyzers; buildtransitive @@ -31,7 +31,7 @@ 2.2.0 - + diff --git a/Ocaramba.UnitTests/Ocaramba.UnitTests.csproj b/Ocaramba.UnitTests/Ocaramba.UnitTests.csproj index f94373046..9079b7de1 100644 --- a/Ocaramba.UnitTests/Ocaramba.UnitTests.csproj +++ b/Ocaramba.UnitTests/Ocaramba.UnitTests.csproj @@ -13,8 +13,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive @@ -30,7 +30,7 @@ - + diff --git a/Ocaramba/Ocaramba.csproj b/Ocaramba/Ocaramba.csproj index 67050d283..bdaa763ca 100644 --- a/Ocaramba/Ocaramba.csproj +++ b/Ocaramba/Ocaramba.csproj @@ -69,8 +69,7 @@ - - + net6_0 From a0f5b17b8e397c72f87940d88d24ff2760393e63 Mon Sep 17 00:00:00 2001 From: pawelstryczek Date: Sat, 28 Jan 2023 16:57:20 +0100 Subject: [PATCH 11/25] NUnit.Runners version update --- Ocaramba.Tests.NUnit/Ocaramba.Tests.NUnit.csproj | 6 +++--- Ocaramba.UnitTests/Ocaramba.UnitTests.csproj | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Ocaramba.Tests.NUnit/Ocaramba.Tests.NUnit.csproj b/Ocaramba.Tests.NUnit/Ocaramba.Tests.NUnit.csproj index b12c4a72b..833cdb6f7 100644 --- a/Ocaramba.Tests.NUnit/Ocaramba.Tests.NUnit.csproj +++ b/Ocaramba.Tests.NUnit/Ocaramba.Tests.NUnit.csproj @@ -7,12 +7,12 @@ - + - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/Ocaramba.UnitTests/Ocaramba.UnitTests.csproj b/Ocaramba.UnitTests/Ocaramba.UnitTests.csproj index 9079b7de1..b150f9c9c 100644 --- a/Ocaramba.UnitTests/Ocaramba.UnitTests.csproj +++ b/Ocaramba.UnitTests/Ocaramba.UnitTests.csproj @@ -13,7 +13,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive From ac94cdfab20501d571eeb9bffcbcbefc4ef73083 Mon Sep 17 00:00:00 2001 From: pawelstryczek Date: Sat, 28 Jan 2023 18:40:31 +0100 Subject: [PATCH 12/25] Update Microsoft.NET.Test.Sdk version --- Ocaramba.Tests.Angular/Ocaramba.Tests.Angular.csproj | 2 +- .../Ocaramba.Tests.CloudProviderCrossBrowser.csproj | 2 +- Ocaramba.Tests.Features/Ocaramba.Tests.Features.csproj | 2 +- Ocaramba.Tests.MsTest/Ocaramba.Tests.MsTest.csproj | 2 +- .../Ocaramba.Tests.NUnitExtentReports.csproj | 2 +- Ocaramba.Tests.PageObjects/Ocaramba.Tests.PageObjects.csproj | 2 +- Ocaramba.Tests.Xunit/Ocaramba.Tests.Xunit.csproj | 2 +- Ocaramba/Ocaramba.csproj | 3 ++- 8 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Ocaramba.Tests.Angular/Ocaramba.Tests.Angular.csproj b/Ocaramba.Tests.Angular/Ocaramba.Tests.Angular.csproj index f0e6c7da2..c817cb0a2 100644 --- a/Ocaramba.Tests.Angular/Ocaramba.Tests.Angular.csproj +++ b/Ocaramba.Tests.Angular/Ocaramba.Tests.Angular.csproj @@ -31,7 +31,7 @@ - + diff --git a/Ocaramba.Tests.CloudProviderCrossBrowser/Ocaramba.Tests.CloudProviderCrossBrowser.csproj b/Ocaramba.Tests.CloudProviderCrossBrowser/Ocaramba.Tests.CloudProviderCrossBrowser.csproj index 39bad70a9..541f04e65 100644 --- a/Ocaramba.Tests.CloudProviderCrossBrowser/Ocaramba.Tests.CloudProviderCrossBrowser.csproj +++ b/Ocaramba.Tests.CloudProviderCrossBrowser/Ocaramba.Tests.CloudProviderCrossBrowser.csproj @@ -27,7 +27,7 @@ - + diff --git a/Ocaramba.Tests.Features/Ocaramba.Tests.Features.csproj b/Ocaramba.Tests.Features/Ocaramba.Tests.Features.csproj index 0f0b7c80b..d1b7b2ed7 100644 --- a/Ocaramba.Tests.Features/Ocaramba.Tests.Features.csproj +++ b/Ocaramba.Tests.Features/Ocaramba.Tests.Features.csproj @@ -27,7 +27,7 @@ - + diff --git a/Ocaramba.Tests.MsTest/Ocaramba.Tests.MsTest.csproj b/Ocaramba.Tests.MsTest/Ocaramba.Tests.MsTest.csproj index b9453a373..b7bd238f2 100644 --- a/Ocaramba.Tests.MsTest/Ocaramba.Tests.MsTest.csproj +++ b/Ocaramba.Tests.MsTest/Ocaramba.Tests.MsTest.csproj @@ -24,7 +24,7 @@ - + diff --git a/Ocaramba.Tests.NUnitExtentReports/Ocaramba.Tests.NUnitExtentReports.csproj b/Ocaramba.Tests.NUnitExtentReports/Ocaramba.Tests.NUnitExtentReports.csproj index c3702b469..67c6ba540 100644 --- a/Ocaramba.Tests.NUnitExtentReports/Ocaramba.Tests.NUnitExtentReports.csproj +++ b/Ocaramba.Tests.NUnitExtentReports/Ocaramba.Tests.NUnitExtentReports.csproj @@ -6,7 +6,7 @@ - + diff --git a/Ocaramba.Tests.PageObjects/Ocaramba.Tests.PageObjects.csproj b/Ocaramba.Tests.PageObjects/Ocaramba.Tests.PageObjects.csproj index f70c24ff8..3ae7ec4f1 100644 --- a/Ocaramba.Tests.PageObjects/Ocaramba.Tests.PageObjects.csproj +++ b/Ocaramba.Tests.PageObjects/Ocaramba.Tests.PageObjects.csproj @@ -21,7 +21,7 @@ - + diff --git a/Ocaramba.Tests.Xunit/Ocaramba.Tests.Xunit.csproj b/Ocaramba.Tests.Xunit/Ocaramba.Tests.Xunit.csproj index 8e78f6e35..4dd38d62c 100644 --- a/Ocaramba.Tests.Xunit/Ocaramba.Tests.Xunit.csproj +++ b/Ocaramba.Tests.Xunit/Ocaramba.Tests.Xunit.csproj @@ -34,7 +34,7 @@ - + diff --git a/Ocaramba/Ocaramba.csproj b/Ocaramba/Ocaramba.csproj index bdaa763ca..67050d283 100644 --- a/Ocaramba/Ocaramba.csproj +++ b/Ocaramba/Ocaramba.csproj @@ -69,7 +69,8 @@ - + + net6_0 From 314d208e7da74bb4fc4d7d70c08d79ce05e05e5c Mon Sep 17 00:00:00 2001 From: pawelstryczek Date: Sat, 28 Jan 2023 18:59:32 +0100 Subject: [PATCH 13/25] Fix in ProjectTestBase --- Ocaramba.Tests.NUnit/ProjectTestBase.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Ocaramba.Tests.NUnit/ProjectTestBase.cs b/Ocaramba.Tests.NUnit/ProjectTestBase.cs index 5a72006b0..12bbe2f0b 100644 --- a/Ocaramba.Tests.NUnit/ProjectTestBase.cs +++ b/Ocaramba.Tests.NUnit/ProjectTestBase.cs @@ -86,11 +86,11 @@ public void BeforeClass() [OneTimeTearDown] public void AfterClass() { - PrintPerformanceResultsHelper.PrintAverageDurationMillisecondsInAppVeyor(this.DriverContext.PerformanceMeasures); - PrintPerformanceResultsHelper.PrintPercentiles90DurationMillisecondsInAppVeyor(this.DriverContext.PerformanceMeasures); + this.DriverContext.Stop(); + //PrintPerformanceResultsHelper.PrintAverageDurationMillisecondsInAppVeyor(this.DriverContext.PerformanceMeasures); + //PrintPerformanceResultsHelper.PrintPercentiles90DurationMillisecondsInAppVeyor(this.DriverContext.PerformanceMeasures); PrintPerformanceResultsHelper.PrintAverageDurationMillisecondsInTeamcity(this.DriverContext.PerformanceMeasures); PrintPerformanceResultsHelper.PrintPercentiles90DurationMillisecondsinTeamcity(this.DriverContext.PerformanceMeasures); - this.DriverContext.Stop(); } /// From 3c0750cb4072be872ced48343ef4c72199bf7e65 Mon Sep 17 00:00:00 2001 From: pawelstryczek Date: Tue, 31 Jan 2023 19:50:00 +0100 Subject: [PATCH 14/25] Update nunit runner for CloudProviderCrossBrowser --- .../Ocaramba.Tests.CloudProviderCrossBrowser.csproj | 2 +- Ocaramba.Tests.NUnit/ProjectTestBase.cs | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Ocaramba.Tests.CloudProviderCrossBrowser/Ocaramba.Tests.CloudProviderCrossBrowser.csproj b/Ocaramba.Tests.CloudProviderCrossBrowser/Ocaramba.Tests.CloudProviderCrossBrowser.csproj index 541f04e65..75f2bf2f8 100644 --- a/Ocaramba.Tests.CloudProviderCrossBrowser/Ocaramba.Tests.CloudProviderCrossBrowser.csproj +++ b/Ocaramba.Tests.CloudProviderCrossBrowser/Ocaramba.Tests.CloudProviderCrossBrowser.csproj @@ -11,7 +11,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/Ocaramba.Tests.NUnit/ProjectTestBase.cs b/Ocaramba.Tests.NUnit/ProjectTestBase.cs index 12bbe2f0b..49222e5cc 100644 --- a/Ocaramba.Tests.NUnit/ProjectTestBase.cs +++ b/Ocaramba.Tests.NUnit/ProjectTestBase.cs @@ -87,8 +87,6 @@ public void BeforeClass() public void AfterClass() { this.DriverContext.Stop(); - //PrintPerformanceResultsHelper.PrintAverageDurationMillisecondsInAppVeyor(this.DriverContext.PerformanceMeasures); - //PrintPerformanceResultsHelper.PrintPercentiles90DurationMillisecondsInAppVeyor(this.DriverContext.PerformanceMeasures); PrintPerformanceResultsHelper.PrintAverageDurationMillisecondsInTeamcity(this.DriverContext.PerformanceMeasures); PrintPerformanceResultsHelper.PrintPercentiles90DurationMillisecondsinTeamcity(this.DriverContext.PerformanceMeasures); } From 3fca9b876d930e1036572f1ac91e519a2f8780c2 Mon Sep 17 00:00:00 2001 From: pawelstryczek Date: Tue, 31 Jan 2023 20:08:26 +0100 Subject: [PATCH 15/25] Fix warnings: warning MSB3245 warning MSB3243 --- OcarambaLite/OcarambaLite.csproj | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/OcarambaLite/OcarambaLite.csproj b/OcarambaLite/OcarambaLite.csproj index bbcd72928..f90002fed 100644 --- a/OcarambaLite/OcarambaLite.csproj +++ b/OcarambaLite/OcarambaLite.csproj @@ -24,7 +24,7 @@ - + @@ -58,9 +58,6 @@ 5.1.1 - - - From f290f2fe6262cef3793308127cf9fc7645282319 Mon Sep 17 00:00:00 2001 From: pawelstryczek Date: Tue, 31 Jan 2023 20:31:04 +0100 Subject: [PATCH 16/25] Updated chrome driver to 109.0.5414.7400 --- Ocaramba.Tests.Angular/Ocaramba.Tests.Angular.csproj | 2 +- .../Ocaramba.Tests.CloudProviderCrossBrowser.csproj | 2 +- Ocaramba.Tests.Features/Ocaramba.Tests.Features.csproj | 2 +- Ocaramba.Tests.MsTest/Ocaramba.Tests.MsTest.csproj | 2 +- Ocaramba.Tests.NUnit/Ocaramba.Tests.NUnit.csproj | 2 +- .../Ocaramba.Tests.NUnitExtentReports.csproj | 2 +- Ocaramba.Tests.Xunit/Ocaramba.Tests.Xunit.csproj | 2 +- Ocaramba.UnitTests/Ocaramba.UnitTests.csproj | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Ocaramba.Tests.Angular/Ocaramba.Tests.Angular.csproj b/Ocaramba.Tests.Angular/Ocaramba.Tests.Angular.csproj index c817cb0a2..da103bf1b 100644 --- a/Ocaramba.Tests.Angular/Ocaramba.Tests.Angular.csproj +++ b/Ocaramba.Tests.Angular/Ocaramba.Tests.Angular.csproj @@ -19,7 +19,7 @@ - + diff --git a/Ocaramba.Tests.CloudProviderCrossBrowser/Ocaramba.Tests.CloudProviderCrossBrowser.csproj b/Ocaramba.Tests.CloudProviderCrossBrowser/Ocaramba.Tests.CloudProviderCrossBrowser.csproj index 75f2bf2f8..c1f94d40f 100644 --- a/Ocaramba.Tests.CloudProviderCrossBrowser/Ocaramba.Tests.CloudProviderCrossBrowser.csproj +++ b/Ocaramba.Tests.CloudProviderCrossBrowser/Ocaramba.Tests.CloudProviderCrossBrowser.csproj @@ -18,7 +18,7 @@ - + diff --git a/Ocaramba.Tests.Features/Ocaramba.Tests.Features.csproj b/Ocaramba.Tests.Features/Ocaramba.Tests.Features.csproj index d1b7b2ed7..781464940 100644 --- a/Ocaramba.Tests.Features/Ocaramba.Tests.Features.csproj +++ b/Ocaramba.Tests.Features/Ocaramba.Tests.Features.csproj @@ -19,7 +19,7 @@ - + diff --git a/Ocaramba.Tests.MsTest/Ocaramba.Tests.MsTest.csproj b/Ocaramba.Tests.MsTest/Ocaramba.Tests.MsTest.csproj index b7bd238f2..6c2685d65 100644 --- a/Ocaramba.Tests.MsTest/Ocaramba.Tests.MsTest.csproj +++ b/Ocaramba.Tests.MsTest/Ocaramba.Tests.MsTest.csproj @@ -14,7 +14,7 @@ - + diff --git a/Ocaramba.Tests.NUnit/Ocaramba.Tests.NUnit.csproj b/Ocaramba.Tests.NUnit/Ocaramba.Tests.NUnit.csproj index 833cdb6f7..4a1589628 100644 --- a/Ocaramba.Tests.NUnit/Ocaramba.Tests.NUnit.csproj +++ b/Ocaramba.Tests.NUnit/Ocaramba.Tests.NUnit.csproj @@ -19,7 +19,7 @@ - + diff --git a/Ocaramba.Tests.NUnitExtentReports/Ocaramba.Tests.NUnitExtentReports.csproj b/Ocaramba.Tests.NUnitExtentReports/Ocaramba.Tests.NUnitExtentReports.csproj index 67c6ba540..ee889b0aa 100644 --- a/Ocaramba.Tests.NUnitExtentReports/Ocaramba.Tests.NUnitExtentReports.csproj +++ b/Ocaramba.Tests.NUnitExtentReports/Ocaramba.Tests.NUnitExtentReports.csproj @@ -17,7 +17,7 @@ - + diff --git a/Ocaramba.Tests.Xunit/Ocaramba.Tests.Xunit.csproj b/Ocaramba.Tests.Xunit/Ocaramba.Tests.Xunit.csproj index 4dd38d62c..e37db5fd7 100644 --- a/Ocaramba.Tests.Xunit/Ocaramba.Tests.Xunit.csproj +++ b/Ocaramba.Tests.Xunit/Ocaramba.Tests.Xunit.csproj @@ -12,7 +12,7 @@ - + diff --git a/Ocaramba.UnitTests/Ocaramba.UnitTests.csproj b/Ocaramba.UnitTests/Ocaramba.UnitTests.csproj index b150f9c9c..fd6bcdc23 100644 --- a/Ocaramba.UnitTests/Ocaramba.UnitTests.csproj +++ b/Ocaramba.UnitTests/Ocaramba.UnitTests.csproj @@ -20,7 +20,7 @@ - + From b7b27fb382040cde1f1f1bb3bbf2c377b3bca4fc Mon Sep 17 00:00:00 2001 From: pawelstryczek Date: Tue, 31 Jan 2023 21:07:58 +0100 Subject: [PATCH 17/25] Update grid version to selenium-server-4.8.0.jar --- azure-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 81a2d9fc0..ac87e8827 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -29,8 +29,8 @@ variables: buildConfiguration: 'Release' frameworkVersion: '4.0.0' BuildVersion: '$(frameworkVersion)$(Build.BuildNumber)' - seleniumGridVersion: 'selenium-server-4.0.0.jar' - seleniumGridUrl: 'https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.0.0/selenium-server-4.0.0.jar' + seleniumGridVersion: 'selenium-server-4.8.0.jar' + seleniumGridUrl: 'https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.8.0/selenium-server-4.8.0.jar" stages: - stage: build From dee46e0bc2f8e602ced79d0c03c7fb0f87be1a1a Mon Sep 17 00:00:00 2001 From: pawelstryczek Date: Tue, 31 Jan 2023 21:31:00 +0100 Subject: [PATCH 18/25] Fix in azure-pipelines.yml --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index ac87e8827..5efd76d7e 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -30,7 +30,7 @@ variables: frameworkVersion: '4.0.0' BuildVersion: '$(frameworkVersion)$(Build.BuildNumber)' seleniumGridVersion: 'selenium-server-4.8.0.jar' - seleniumGridUrl: 'https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.8.0/selenium-server-4.8.0.jar" + seleniumGridUrl: 'https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.8.0/selenium-server-4.8.0.jar' stages: - stage: build From 2c241f450bbc7da1686aa88ea657278e3318f00a Mon Sep 17 00:00:00 2001 From: pawelstryczek Date: Tue, 31 Jan 2023 22:09:18 +0100 Subject: [PATCH 19/25] Updated dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index a3cfdc62a..432bb04a7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/dotnet/core/sdk:3.1 +FROM mcr.microsoft.com/dotnet/core/sdk:6.0 LABEL maintainer "Ocaramba " #========= # Midnight Commander, lbzip2 From 0e15dc87a3e056dd7ad0cbcd0a4c02c6e0034450 Mon Sep 17 00:00:00 2001 From: pawelstryczek Date: Tue, 31 Jan 2023 22:33:27 +0100 Subject: [PATCH 20/25] updated base image to mcr.microsoft.com/dotnet/sdk:6.0 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 432bb04a7..fc92b60ba 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/dotnet/core/sdk:6.0 +FROM mcr.microsoft.com/dotnet/sdk:6.0 LABEL maintainer "Ocaramba " #========= # Midnight Commander, lbzip2 From d913492840143848102101783b7ab56414c1f24d Mon Sep 17 00:00:00 2001 From: pawelstryczek Date: Tue, 31 Jan 2023 22:56:08 +0100 Subject: [PATCH 21/25] Fix in ExecutingTestsOnDocker.ps1 --- ExecutingTestsOnDocker.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ExecutingTestsOnDocker.ps1 b/ExecutingTestsOnDocker.ps1 index 6e7a8cd17..13812e728 100644 --- a/ExecutingTestsOnDocker.ps1 +++ b/ExecutingTestsOnDocker.ps1 @@ -5,7 +5,7 @@ If($IsWindows){ docker info -docker build -t ocaramba/selenium -f DockerfileBuild . +docker build -t ocaramba/selenium -f Dockerfile docker run --rm -dit --name ocaramba_selenium ocaramba/selenium docker ps -a From f32b793d95ae5c2e1169402cee5b0dc1f749881e Mon Sep 17 00:00:00 2001 From: pawelstryczek Date: Wed, 1 Feb 2023 10:23:55 +0100 Subject: [PATCH 22/25] Upadated docker-compose.yml --- docker-compose.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 37f8dbdaa..17916fde0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,10 +1,10 @@ version: '3.7' services: ocaramba_selenium_container: - image: ocaramba/selenium + image: mcr.microsoft.com/dotnet/sdk:6.0 build: context: . - dockerfile: DockerfileBuild + dockerfile: Dockerfile container_name: ocaramba_selenium stdin_open: true tty: true From 03e21fbbde33953ef2206f4bb41dae4dd588cc1a Mon Sep 17 00:00:00 2001 From: Jakub Raczek Date: Wed, 1 Feb 2023 10:55:01 +0100 Subject: [PATCH 23/25] Update azure-pipelines.yml for Azure Pipelines Fixes #422 --- azure-pipelines.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 5efd76d7e..78250dab2 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -129,6 +129,14 @@ stages: dockerComposeFile: '**/docker-compose.yml' action: 'Run a Docker Compose command' dockerComposeCommand: 'up -d --build' + enabled: false + + - task: Docker@2 + displayName: Build an image + inputs: + repository: ocaramba_selenium + command: build + Dockerfile: Dockerfile - task: PowerShell@2 inputs: From bf7c61fbf3222fabcffdde762a7d4a79486886aa Mon Sep 17 00:00:00 2001 From: Jakub Raczek Date: Wed, 1 Feb 2023 11:59:43 +0100 Subject: [PATCH 24/25] Update azure-pipelines.yml --- azure-pipelines.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 78250dab2..82e3308d3 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -122,6 +122,7 @@ stages: - job: RunTestsOnDocker pool: vmImage: 'ubuntu-latest' + condition: false steps: - task: DockerCompose@0 inputs: From 96e6f82541284f3a1d9a975ae6133ca8079a2add Mon Sep 17 00:00:00 2001 From: Jakub Raczek Date: Wed, 1 Feb 2023 12:00:27 +0100 Subject: [PATCH 25/25] Update azure-pipelines.yml --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 82e3308d3..57ba3fbd9 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -122,7 +122,7 @@ stages: - job: RunTestsOnDocker pool: vmImage: 'ubuntu-latest' - condition: false + condition: false steps: - task: DockerCompose@0 inputs: