Skip to content

Commit

Permalink
only support VRT
Browse files Browse the repository at this point in the history
  • Loading branch information
IamRanjeetSingh committed Jul 31, 2024
1 parent 2413dae commit 0cee04d
Showing 1 changed file with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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;
}
Expand Down Expand Up @@ -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.";
Expand Down

0 comments on commit 0cee04d

Please sign in to comment.