Skip to content

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

api(dotnet): introduce WaitFor*(action) (#6610)

Pavel Feldman3aa9ab88efa1
diff --git a/utils/doclint/generateDotnetApi.js b/utils/doclint/generateDotnetApi.js
index 20d3600062..55f480b23d 100644
--- a/utils/doclint/generateDotnetApi.js
+++ b/utils/doclint/generateDotnetApi.js
@@ -573,10 +573,16 @@ function renderMethod(member, parent, output, name) {
.sort((a, b) => b.alias === 'options' ? -1 : 0) //move options to the back to the arguments list
.forEach(parseArg);
+ if (name.includes('WaitFor') && !['WaitForTimeoutAsync', 'WaitForFunctionAsync', 'WaitForLoadStateAsync', 'WaitForURLAsync', 'WaitForSelectorAsync', 'WaitForElementStateAsync'].includes(name)) {
+ args.push('Func<Task> action = default');
+ argTypeMap.set('Func<Task> action = default', 'action');
+ addParamsDoc('action', ['Action to perform while waiting']);
+ }
+
let printArgDoc = function (val, ind) {
- if (val && val.length === 1)
+ if (val && val.length === 1) {
output(`/// <param name="${ind}">${val}</param>`);
- else {
+ } else {
output(`/// <param name="${ind}">`);
output(val.map(l => `/// ${l}`));
output(`/// </param>`);