Skip to content

Commit

Permalink
[BREAKING]: Remove WaitForTimeoutAsync (#2595)
Browse files Browse the repository at this point in the history
  • Loading branch information
kblok authored Apr 11, 2024
1 parent 391e196 commit eddc391
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 153 deletions.
25 changes: 0 additions & 25 deletions lib/PuppeteerSharp.Tests/WaitTaskTests/FrameWaitForTimeoutTests.cs

This file was deleted.

79 changes: 0 additions & 79 deletions lib/PuppeteerSharp.Tests/WaitTaskTests/PageWaitForTests.cs

This file was deleted.

25 changes: 0 additions & 25 deletions lib/PuppeteerSharp.Tests/WaitTaskTests/PageWaitForTimeoutTests.cs

This file was deleted.

3 changes: 0 additions & 3 deletions lib/PuppeteerSharp/Frame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,6 @@ public Task<IElementHandle> WaitForXPathAsync(string xpath, WaitForSelectorOptio
return WaitForSelectorAsync($"xpath/{xpath}", options);
}

/// <inheritdoc/>
public Task WaitForTimeoutAsync(int milliseconds) => Task.Delay(milliseconds);

/// <inheritdoc/>
public Task<IJSHandle> WaitForFunctionAsync(string script, WaitForFunctionOptions options, params object[] args)
{
Expand Down
9 changes: 0 additions & 9 deletions lib/PuppeteerSharp/IFrame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -389,15 +389,6 @@ public interface IFrame
/// <exception cref="WaitTaskTimeoutException">If timeout occurred.</exception>
Task<IElementHandle> WaitForSelectorAsync(string selector, WaitForSelectorOptions options = null);

/// <summary>
/// Waits for a timeout.
/// </summary>
/// <param name="milliseconds">The amount of time to wait.</param>
/// <returns>A task that resolves when after the timeout.</returns>
/// <seealso cref="IPage.WaitForTimeoutAsync(int)"/>
/// <exception cref="WaitTaskTimeoutException">If timeout occurred.</exception>
Task WaitForTimeoutAsync(int milliseconds);

/// <summary>
/// Waits for a selector to be added to the DOM.
/// </summary>
Expand Down
8 changes: 0 additions & 8 deletions lib/PuppeteerSharp/IPage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1393,14 +1393,6 @@ public interface IPage : IDisposable, IAsyncDisposable
/// <seealso cref="IFrame.WaitForSelectorAsync(string, WaitForSelectorOptions)"/>
Task<IElementHandle> WaitForSelectorAsync(string selector, WaitForSelectorOptions options = null);

/// <summary>
/// Waits for a timeout.
/// </summary>
/// <param name="milliseconds">The amount of time to wait.</param>
/// <returns>A task that resolves when after the timeout.</returns>
/// <seealso cref="IFrame.WaitForTimeoutAsync(int)"/>
Task WaitForTimeoutAsync(int milliseconds);

/// <summary>
/// Waits for a xpath selector to be added to the DOM.
/// </summary>
Expand Down
4 changes: 0 additions & 4 deletions lib/PuppeteerSharp/Page.cs
Original file line number Diff line number Diff line change
Expand Up @@ -659,10 +659,6 @@ public Task<IResponse> ReloadAsync(int? timeout = null, WaitUntilNavigation[] wa
public Task<string[]> SelectAsync(string selector, params string[] values)
=> MainFrame.SelectAsync(selector, values);

/// <inheritdoc/>
public Task WaitForTimeoutAsync(int milliseconds)
=> MainFrame.WaitForTimeoutAsync(milliseconds);

/// <inheritdoc/>
public Task<IJSHandle> WaitForFunctionAsync(string script, WaitForFunctionOptions options = null, params object[] args)
=> MainFrame.WaitForFunctionAsync(script, options ?? new WaitForFunctionOptions(), args);
Expand Down

0 comments on commit eddc391

Please sign in to comment.