Skip to content

Commit cda2c68

Browse files
committed
Move Browsers enum to Web.Common
Moved Browsers enum to web.common. If a plugin doesn't support specific browser, it should throw exception. We don't need to manage two seperate copies of Browsers enum for each plugin. It should belong to the common.
1 parent 62f80d1 commit cda2c68

File tree

3 files changed

+2
-14
lines changed

3 files changed

+2
-14
lines changed

src/Pixel.Automation.Web.Playwright.Components/Enums/Browsers.cs renamed to src/Pixel.Automation.Web.Common/Browsers.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
namespace Pixel.Automation.Web.Playwright.Components;
2+
namespace Pixel.Automation.Web.Common;
33

44
public enum Browsers
55
{

src/Pixel.Automation.Web.Selenium.Components/Enums/Browsers.cs

Lines changed: 0 additions & 9 deletions
This file was deleted.

src/Pixel.Automation.Web.Selenium.Components/WebApplicationEntity.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,12 @@
22
using OpenQA.Selenium.Chrome;
33
using OpenQA.Selenium.Edge;
44
using OpenQA.Selenium.Firefox;
5-
using Pixel.Automation.Core;
65
using Pixel.Automation.Core.Arguments;
76
using Pixel.Automation.Core.Components;
87
using Pixel.Automation.Core.Interfaces;
9-
using Pixel.Automation.Web.Selenium.Components.Enums;
108
using System.ComponentModel;
119
using System.ComponentModel.DataAnnotations;
1210
using System.Diagnostics;
13-
using System.Runtime.InteropServices;
1411
using System.Runtime.Serialization;
1512

1613
namespace Pixel.Automation.Web.Selenium.Components;
@@ -115,7 +112,7 @@ public override async Task LaunchAsync()
115112
webApplicationDetails.WebDriver = new EdgeDriver(edgeDriverService, edgeDriverOptions);
116113
break;
117114
default:
118-
throw new ArgumentException("Requested web driver type is not supported");
115+
throw new ArgumentException($"Browser : '{preferredBrowser}' is not supported");
119116
}
120117

121118
logger.Information("{browserToLaunch} has been launched.", preferredBrowser);

0 commit comments

Comments
 (0)