Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

fix(dotnet): follow up, add WaitFor(action) in order

Pavel Feldmanc497c32ec9b9
diff --git a/utils/doclint/generateDotnetApi.js b/utils/doclint/generateDotnetApi.js
index 55f480b23d..5a0c7e9a37 100644
--- a/utils/doclint/generateDotnetApi.js
+++ b/utils/doclint/generateDotnetApi.js
@@ -574,7 +574,8 @@ function renderMethod(member, parent, output, name) {
.forEach(parseArg);
if (name.includes('WaitFor') && !['WaitForTimeoutAsync', 'WaitForFunctionAsync', 'WaitForLoadStateAsync', 'WaitForURLAsync', 'WaitForSelectorAsync', 'WaitForElementStateAsync'].includes(name)) {
- args.push('Func<Task> action = default');
+ const firstOptional = args.find(a => a.includes('='));
+ args.splice(args.indexOf(firstOptional), 0, 'Func<Task> action = default');
argTypeMap.set('Func<Task> action = default', 'action');
addParamsDoc('action', ['Action to perform while waiting']);
}