Class PlaywrightOperations
- Namespace
- Ando.Operations
- Assembly
- ando.dll
Playwright CLI operations for E2E testing. All methods take a DirectoryRef parameter to specify the working directory.
public class PlaywrightOperations : OperationsBase
- Inheritance
-
PlaywrightOperations
- Inherited Members
Constructors
PlaywrightOperations(StepRegistry, IBuildLogger, Func<ICommandExecutor>, NodeSdkEnsurer?)
Playwright CLI operations for E2E testing. All methods take a DirectoryRef parameter to specify the working directory.
public PlaywrightOperations(StepRegistry registry, IBuildLogger logger, Func<ICommandExecutor> executorFactory, NodeSdkEnsurer? nodeEnsurer = null)
Parameters
registryStepRegistryloggerIBuildLoggerexecutorFactoryFunc<ICommandExecutor>nodeEnsurerNodeSdkEnsurer
Methods
Install(DirectoryRef)
Installs Playwright browsers and system dependencies via 'npx playwright install --with-deps'. Call this after npm install and before running tests. The --with-deps flag installs required system packages (libgtk, libasound, etc.).
public void Install(DirectoryRef directory)
Parameters
directoryDirectoryRefDirectory containing playwright.config.ts.
Test(DirectoryRef, Action<PlaywrightTestOptions>?)
Runs Playwright tests. By default uses 'npx playwright test'. Set UseNpmScript to use 'npm run test' instead.
public void Test(DirectoryRef directory, Action<PlaywrightTestOptions>? configure = null)
Parameters
directoryDirectoryRefDirectory containing playwright.config.ts or package.json.
configureAction<PlaywrightTestOptions>Optional callback to configure test options.