diff --git a/Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Playwright/PlaywrightDriver.cs b/Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Playwright/PlaywrightDriver.cs index 8d38a57ada..234e49196b 100644 --- a/Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Playwright/PlaywrightDriver.cs +++ b/Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/Playwright/PlaywrightDriver.cs @@ -162,7 +162,14 @@ public override void RunAction(Act act) actGotoURLHandler.HandleAsync().Wait(); break; case ActVisualTesting actVisualTesting: - actVisualTesting.Execute(this); + if (actVisualTesting.VisualTestingAnalyzer == ActVisualTesting.eVisualTestingAnalyzer.VRT) + { + actVisualTesting.Execute(this); + } + else + { + act.Error = $"{actVisualTesting.VisualTestingAnalyzer} is not supported by Playwright driver, use Selenium driver instead."; + } break; default: act.Error = $"This Action is not supported for Playwright driver"; @@ -175,7 +182,7 @@ public bool IsActionSupported(Act act, out string message) { message = string.Empty; - if (act is ActWithoutDriver or ActScreenShot or ActVisualTesting) + if (act is ActWithoutDriver or ActScreenShot) { return true; } @@ -222,6 +229,11 @@ public bool IsActionSupported(Act act, out string message) } return isLocatorSupported && isOperationSupported; } + else if (act is ActVisualTesting actVisualTesting) + { + message = $"{actVisualTesting.VisualTestingAnalyzer} is not supported by Playwright driver, use Selenium driver instead."; + return actVisualTesting.VisualTestingAnalyzer == ActVisualTesting.eVisualTestingAnalyzer.VRT; + } else { message = $"'{act.ActionType}' is not supported by Playwright driver, use Selenium driver instead.";