Skip to content

Commit 933a123

Browse files
committed
Perhaps resolves a wait issue in remote Safari & Firefox
1 parent adb9f42 commit 933a123

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

CSF.Screenplay.Selenium/Tasks/ClickAndWaitForDocumentReady.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ public class ClickAndWaitForDocumentReady : ISingleElementPerformable
2424
const string COMPLETE_READY_STATE = "complete";
2525

2626
static readonly NamedScriptWithResult<string> getReadyState = Scripts.GetTheDocumentReadyState;
27-
static readonly TimeSpan
28-
pollingInterval = TimeSpan.FromMilliseconds(100),
29-
stalenessTimeout = TimeSpan.FromMilliseconds(500);
3027

3128
readonly TimeSpan waitTimeout;
3229

@@ -39,11 +36,10 @@ public async ValueTask PerformAsAsync(ICanPerform actor, IWebDriver webDriver, L
3936
{
4037
await actor.PerformAsync(ClickOn(element.Value), cancellationToken);
4138
await actor.PerformAsync(WaitUntil(ElementIsStale(element.Value.WebElement))
42-
.ForAtMost(stalenessTimeout)
43-
.WithPollingInterval(pollingInterval)
39+
.ForAtMost(waitTimeout)
4440
.Named($"{element.Value.Name} is no longer on the page"),
4541
cancellationToken);
46-
await actor.PerformAsync(WaitUntil(PageIsReady).ForAtMost(waitTimeout).Named("the page is ready").WithPollingInterval(pollingInterval),
42+
await actor.PerformAsync(WaitUntil(PageIsReady).ForAtMost(waitTimeout).Named("the page is ready"),
4743
cancellationToken);
4844
}
4945

0 commit comments

Comments
 (0)