csf-dev / CSF.Screenplay

Implementation of the Screenplay pattern (aka Journey) in .NET
https://csf-dev.github.io/CSF.Screenplay/
MIT License
13 stars 1 forks source link

Deal with page refresh bug in Safari #95

Closed craigfowler closed 7 years ago

craigfowler commented 7 years ago

In Safari, it seems the ready state can return 'complete' after a click but before the new page had loaded.

Here's as possible solution (python):

http://www.obeythetestinggoat.com/how-to-get-selenium-to-wait-for-page-load-after-a-click.html

craigfowler commented 7 years ago

I think I could implement this with a syntax like:

Navigate.ByClicking(target)
  .WaitingAtMost(5).Seconds()
  .ForTheNextPageToLoad();

This would use a click action internally, but would wrap it with the extra scaffold to correctly wait until the page has loaded.