Skip to content

Commit dd101a7

Browse files
kblokMeir017
authored andcommitted
Make WaitTaskTimeoutException public (#633)
* Make WaitTaskTimeoutException public * Remove some extra quotes
1 parent e3ae546 commit dd101a7

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

lib/PuppeteerSharp/Frame.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ public async Task<JSHandle> EvaluateFunctionHandleAsync(string function, params
221221
/// <returns>A task that resolves when element specified by selector string is added to DOM</returns>
222222
/// <seealso cref="WaitForXPathAsync(string, WaitForSelectorOptions)"/>
223223
/// <seealso cref="Page.WaitForSelectorAsync(string, WaitForSelectorOptions)"/>
224+
/// <exception cref="WaitTaskTimeoutException">If timeout occurred.</exception>
224225
public Task<ElementHandle> WaitForSelectorAsync(string selector, WaitForSelectorOptions options = null)
225226
=> WaitForSelectorOrXPathAsync(selector, false, options);
226227

@@ -250,6 +251,7 @@ public Task<ElementHandle> WaitForSelectorAsync(string selector, WaitForSelector
250251
/// </example>
251252
/// <seealso cref="WaitForSelectorAsync(string, WaitForSelectorOptions)"/>
252253
/// <seealso cref="Page.WaitForXPathAsync(string, WaitForSelectorOptions)"/>
254+
/// <exception cref="WaitTaskTimeoutException">If timeout occurred.</exception>
253255
public Task<ElementHandle> WaitForXPathAsync(string xpath, WaitForSelectorOptions options = null)
254256
=> WaitForSelectorOrXPathAsync(xpath, true, options);
255257

@@ -259,6 +261,7 @@ public Task<ElementHandle> WaitForXPathAsync(string xpath, WaitForSelectorOption
259261
/// <param name="milliseconds"></param>
260262
/// <returns>A task that resolves when after the timeout</returns>
261263
/// <seealso cref="Page.WaitForTimeoutAsync(int)"/>
264+
/// <exception cref="WaitTaskTimeoutException">If timeout occurred.</exception>
262265
public Task WaitForTimeoutAsync(int milliseconds) => Task.Delay(milliseconds);
263266

264267
/// <summary>
@@ -269,6 +272,7 @@ public Task<ElementHandle> WaitForXPathAsync(string xpath, WaitForSelectorOption
269272
/// <param name="args">Arguments to pass to <c>script</c></param>
270273
/// <returns>A task that resolves when the <c>script</c> returns a truthy value</returns>
271274
/// <seealso cref="Page.WaitForFunctionAsync(string, WaitForFunctionOptions, object[])"/>
275+
/// <exception cref="WaitTaskTimeoutException">If timeout occurred.</exception>
272276
public Task<JSHandle> WaitForFunctionAsync(string script, WaitForFunctionOptions options, params object[] args)
273277
=> new WaitTask(this, script, false, "function", options.Polling, options.PollingInterval, options.Timeout, args).Task;
274278

@@ -279,6 +283,7 @@ public Task<JSHandle> WaitForFunctionAsync(string script, WaitForFunctionOptions
279283
/// <param name="options">Optional waiting parameters</param>
280284
/// <returns>A task that resolves when the <c>script</c> returns a truthy value</returns>
281285
/// <seealso cref="Page.WaitForExpressionAsync(string, WaitForFunctionOptions)"/>
286+
/// <exception cref="WaitTaskTimeoutException">If timeout occurred.</exception>
282287
public Task<JSHandle> WaitForExpressionAsync(string script, WaitForFunctionOptions options)
283288
=> new WaitTask(this, script, true, "function", options.Polling, options.PollingInterval, options.Timeout).Task;
284289

lib/PuppeteerSharp/WaitTaskTimeoutException.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@
33

44
namespace PuppeteerSharp
55
{
6+
/// <summary>
7+
/// Timeout exception that might be thrown by <c>WaitFor</c> methods in <see cref="Frame"/>.
8+
/// </summary>
69
[Serializable]
7-
internal class WaitTaskTimeoutException : PuppeteerException
10+
public class WaitTaskTimeoutException : PuppeteerException
811
{
912
/// <summary>
1013
/// Timeout that caused the exception

0 commit comments

Comments
 (0)