Skip to content

Commit

Permalink
[dotnet] Small performance improvement for DriverFactory (#12497)
Browse files Browse the repository at this point in the history
Small performance improvement for DriverFactory

I noticed in 962a34b that an `if`-statement was used, while probably an `else-if` should have been used, to skip all other conditions when the Chrome driver is used.
  • Loading branch information
jerone committed Aug 7, 2023
1 parent 72f083c commit 0579687
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dotnet/test/common/Environment/DriverFactory.cs
Expand Up @@ -46,7 +46,7 @@ public IWebDriver CreateDriverWithOptions(Type driverType, DriverOptions driverO
browser = Browser.Chrome;
options = GetDriverOptions<ChromeOptions>(driverType, driverOptions);
}
if (typeof(EdgeDriver).IsAssignableFrom(driverType))
else if (typeof(EdgeDriver).IsAssignableFrom(driverType))
{
browser = Browser.Edge;
options = GetDriverOptions<EdgeOptions>(driverType, driverOptions);
Expand Down

0 comments on commit 0579687

Please sign in to comment.