Skip to content

Commit 3c03f62

Browse files
authored
Sync WaitForSelectorOrXPathAsync code (#929)
1 parent 73f7ea8 commit 3c03f62

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

lib/PuppeteerSharp/DOMWorld.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -397,8 +397,8 @@ function hasVisibleBoundingBox() {
397397
predicate,
398398
false,
399399
$"{(isXPath ? "XPath" : "selector")} '{selectorOrXPath}'{(options.Hidden ? " to be hidden" : "")}",
400-
options.Polling,
401-
options.PollingInterval,
400+
polling,
401+
null,
402402
options.Timeout,
403403
new object[]
404404
{

lib/PuppeteerSharp/WaitForSelectorOptions.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,13 @@
55
/// </summary>
66
/// <seealso cref="Page.WaitForSelectorAsync(string, WaitForSelectorOptions)"/>
77
/// <seealso cref="Frame.WaitForSelectorAsync(string, WaitForSelectorOptions)"/>
8-
public class WaitForSelectorOptions : WaitForFunctionOptions
8+
public class WaitForSelectorOptions
99
{
10+
/// <summary>
11+
/// Maximum time to wait for in milliseconds. Defaults to 30000 (30 seconds). Pass 0 to disable timeout.
12+
/// </summary>
13+
public int Timeout { get; set; } = Puppeteer.DefaultTimeout;
14+
1015
/// <summary>
1116
/// Wait for selector to become visible.
1217
/// </summary>

0 commit comments

Comments
 (0)