Skip to content

Core - LoadUrlAsync require url and remove SyncContext param #3842

Closed

Description

@amaitland

Currently it's possible to call await browser.LoadUrlAsync() without passing in a Url.

If you do this and the browser isn't loading then the method will just wait forever.

To provide a predictable behaviour the string url = null will be changed to string url and an ArgumentNullException thrown when string.IsNullOrEmpty(url).

  • Remove default null value for url param.
  • Remove SyncronisationContext param
    upon remove it doesn't make sense
  • Add WaitForInitialLoadAsync method

Activity

  1. added this to the 95.7.x milestone on Oct 10, 2021
  2. amaitland commented on Oct 10, 2021

    @amaitland
    MemberAuthor

    WaitForBrowserInitialLoadAsync has been added, still needs some additional testing.

    The intention of this method is to wait for the browser to finish it's initial load though it's not strictly checking for anything that prevents it from being called later.

    I might consider renaming to WaitForBrowserLoadAsync before the 95 branch is created.

  3. added a commit that references this issue on Oct 15, 2021
  4. amaitland commented on Oct 22, 2021

    @amaitland
    MemberAuthor

    WaitForBrowserInitialLoadAsync has been added, still needs some additional testing.

    Was reverted as some of the tests failed.

  5. changed the title [-]Core - LoadUrlAsync require url[/-] [+]Core - LoadUrlAsync require url and remove SyncContext param[/+] on Oct 27, 2021
  6. self-assigned this
    on Oct 28, 2021
  7. amaitland commented on Oct 28, 2021

    @amaitland
    MemberAuthor

    For anyone using LoadUrlAsync() without params then you can switch to using WaitForInitialLoadAsync for the initial page load.

    //Before
    await browser.LoadUrlAsync();
    //After
    await browser.WaitForInitialLoadAsync();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions