microsoft / playwright-dotnet

.NET version of the Playwright testing and automation library.
https://playwright.dev/dotnet/
MIT License
2.38k stars 229 forks source link

[BUG] Tests fail on WaitForURLAsync() when run in headless mode but work without it #2320

Closed sturlath closed 1 year ago

sturlath commented 1 year ago

Hi

I have these test (that you can just try out) that fail on the following line if run with headless == true but else they just run fine.

await Page.WaitForURLAsync("https://eventstreamingpublicwebdev.azurewebsites.net/");

where I get

waiting for navigation to "https://eventstreamingpublicwebdev.azurewebsites.net/" until "Load"

I have tried searching for a reason but just can´t see what I´m doing wrong. But bear with me since this is only day two of me trying to use Playwright.

But you should be able to try this out and see the test fail by running the code either in Visual Studio Test Explorer or with dotnet test --settings:.runsettings

using Microsoft.Playwright;
using Microsoft.Playwright.NUnit;

namespace My.PlaywrightTests
{
    public class FrontPagelogin : PageTest
    {
        [SetUp]
        public async Task Setup()
        {
            await Page.GotoAsync(url: "https://eventstreamingpublicwebdev.azurewebsites.net/");
        }

        [Test]
        public async Task This_works_when_headless_is_false()
        {
            // If I start tracing this works
            await Page.Context.Tracing.StartAsync(new()
            {
                Screenshots = false,
                Snapshots = true, //<-- This makes the test succeeed in the least time
                Sources = false
            });

            await Page.GotoAsync("https://eventstreamingpublicwebdev.azurewebsites.net/LoginSelector");
            await Page.Locator("a[role=\"button\"]:has-text(\"Innskráning áhorfanda\")").ClickAsync();

            var loginPage = new LoginPage(Page);
            await loginPage.Login("playwrightppv", "1q2w3E*");

            await Page.WaitForURLAsync("https://eventstreamingpublicwebdev.azurewebsites.net/");

            // Stop tracing and export it into a zip archive.
            await Page.Context.Tracing.StopAsync(new()
            {
                Path = "trace.zip"
            });

            await Expect(Page.Locator("#dropdownMenuUser img")).ToBeVisibleAsync();
        }

        [Test]
        public async Task Doesnt_work_when_headless_is_false()
        {
            await Page.GotoAsync("https://eventstreamingpublicwebdev.azurewebsites.net/LoginSelector");
            await Page.Locator("a[role=\"button\"]:has-text(\"Innskráning áhorfanda\")").ClickAsync();

            var loginPage = new LoginPage(Page);
            await loginPage.Login("playwrightppv", "1q2w3E*");

            // fails here!
            await Page.WaitForURLAsync("https://eventstreamingpublicwebdev.azurewebsites.net/");

            await Expect(Page.Locator("#dropdownMenuUser img")).ToBeVisibleAsync();
        }
    }

  // Here are my first abstraction classes for my pages since I want to be able to reuse the login logic.

    public class MyLoginPage : MyBasePage
    {
        public MyLoginPage(IPage page) : base(page) { }
        public async Task Login(string userName, string pasword)
        {
            await Page.Locator("input[name=\"LoginInput\\.UserNameOrEmailAddress\"]").ClickAsync();
            await Page.Locator("input[name=\"LoginInput\\.UserNameOrEmailAddress\"]").FillAsync(userName);

            await Page.Locator("input[name=\"LoginInput\\.Password\"]").ClickAsync();
            await Page.Locator("input[name=\"LoginInput\\.Password\"]").FillAsync(pasword);
            await Page.Locator("id=termsandcondition").CheckAsync();

            await Page.Locator("#loginsubmitbtn").ClickAsync();
        }
    }

    public class MyBasePage
    {
        public IPage Page;

        public MyBasePage(IPage page) => this.Page = page;
    }
}

my .runsettings file

<?xml version="1.0" encoding="utf-8"?>
<RunSettings>
    <Playwright>
        <BrowserName>chromium</BrowserName>
        <LaunchOptions>
            <Headless>true</Headless>
            <Channel>msedge</Channel>
        </LaunchOptions>
    </Playwright>
</RunSettings>

my test project file

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFramework>net6.0</TargetFramework>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>
    <IsPackable>false</IsPackable>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.1" />
    <PackageReference Include="Microsoft.Playwright" Version="1.25.0" />
    <PackageReference Include="Microsoft.Playwright.NUnit" Version="1.25.0" />
    <PackageReference Include="NUnit" Version="3.13.3" />
    <PackageReference Include="NUnit3TestAdapter" Version="4.2.1" />
    <PackageReference Include="NUnit.Analyzers" Version="3.3.0" />
    <PackageReference Include="coverlet.collector" Version="3.1.2" />
  </ItemGroup>
</Project>

Context:

mxschmitt commented 1 year ago

I tried to reproduce it, but for me it's unfortunately passing. Could you try setting the DEBUG=pw:api env? This should give a hint what's going wrong.

sturlath commented 1 year ago

Sometimes some tests run fine the first time but not after that. Can you run it again?

But yes I had tried with debug and only see that it times out. Maybe you can spot something?

C:\Dev\IBeinni\aspnet-core\test\BSR.Beinni.Playwright.Tests> dotnet test --settings:.runsettings
  Determining projects to restore...
  All projects are up-to-date for restore.
  BSR.Beinni.PlaywrightTests -> C:\Dev\IBeinni\aspnet-core\test\BSR.Beinni.Playwright.Tests\bin\Debug\net6.0\BSR.Beinni
  .PlaywrightTests.dll
Test run for C:\Dev\IBeinni\aspnet-core\test\BSR.Beinni.Playwright.Tests\bin\Debug\net6.0\BSR.Beinni.PlaywrightTests.dll (.NETCoreApp,Version=v6.0)
Microsoft (R) Test Execution Command Line Tool Version 17.3.0 (x64)
Copyright (c) Microsoft Corporation.  All rights reserved.

Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
2022-09-19T20:53:41.978Z pw:api navigating to "https://eventstreamingpublicwebdev.azurewebsites.net/", waiting until "load"
2022-09-19T20:53:42.570Z pw:api   "commit" event fired
2022-09-19T20:53:42.570Z pw:api   navigated to "https://eventstreamingpublicwebdev.azurewebsites.net/LandingPage"
2022-09-19T20:53:43.310Z pw:api   "domcontentloaded" event fired
2022-09-19T20:53:43.361Z pw:api   "load" event fired
2022-09-19T20:53:43.368Z pw:api navigating to "https://eventstreamingpublicwebdev.azurewebsites.net/LoginSelector", waiting until "load"
2022-09-19T20:53:43.891Z pw:api   "commit" event fired
2022-09-19T20:53:43.891Z pw:api   navigated to "https://eventstreamingpublicwebdev.azurewebsites.net/LoginSelector"
2022-09-19T20:53:44.996Z pw:api   "load" event fired
2022-09-19T20:53:44.996Z pw:api   "domcontentloaded" event fired
2022-09-19T20:53:45.004Z pw:api waiting for selector "a[role="button"]:has-text("Innskráning áhorfanda")"
2022-09-19T20:53:45.023Z pw:api   selector resolved to visible <a role="button" class="btn-lg btn" href="/Account/></a>
2022-09-19T20:53:45.027Z pw:api attempting click action
2022-09-19T20:53:45.027Z pw:api   waiting for element to be visible, enabled and stable
2022-09-19T20:53:45.043Z pw:api   element is visible, enabled and stable
2022-09-19T20:53:45.043Z pw:api   scrolling into view if needed
2022-09-19T20:53:45.046Z pw:api   done scrolling
2022-09-19T20:53:45.048Z pw:api   performing click action
2022-09-19T20:53:45.865Z pw:api   click action done
2022-09-19T20:53:45.865Z pw:api   waiting for scheduled navigations to finish
2022-09-19T20:53:45.865Z pw:api   "commit" event fired
2022-09-19T20:53:45.866Z pw:api   navigated to "https://streamworksidentitydev.azurewebsites.net/Account/Login?ReturnUrl=%2Fconnect%2Fauthorize%2Fcallback%3Fclient_id%3DBeinni_Web_Public%26redirect_uri%3Dhttps%253A%252F%252Feventstreamingpublicwebdev.azurewebsites.net%252Fsignin-oidc%26response_type%3Dcode%2520id_token%26scope%3Dopenid%2520profile%2520role%2520email%2520phone%2520Beinni%26response_mode%3Dform_post%26nonce%3D637992176252883502.OTdmZmU1MzQtNTZiZi00ZDZhLWJlNmUtYzFlMjM3YTA4NGQ5MzE1MjdlY2YtNGUwNi00MTliLWE1MTUtMmY2MGRmZmVmNzll%26state%3DCfDJ8Nz0aZ4MpSdEq6-Csy0Lf5XVHw1g4LRIy4pYVUJmazZoIhKB9CFiKIhAbJB7aqURO6rY8uxyILAAk-VKxHh9OAHxig7aLpRnsMIF2REeojjs_wofBWA7WMN-Uwt_h7-VGV09rD170A4ehB6B6heAtzc_rQ_EOFg2rFlUcrYhlBBUvTyonuEQDWqOAEHgoeoUOyPupjQomMW60mOMBiOAZ8a-c96IVK8JG-yrFJnaDOmGG1-dvkO-l7lx_71GZ3318QW35bVGzpBIWeyhOGkCxTV6S-z_QjpOm6Y-j5ny1ldfPfMT-579yTQ64fZ-VGT-zKpXxcRvcpFzNhq-6UG3g0c%26x-client-SKU%3DID_NETSTANDARD2_0%26x-client-ver%3D6.10.0.0"
2022-09-19T20:53:45.866Z pw:api   navigated to "https://streamworksidentitydev.azurewebsites.net/Account/Login?ReturnUrl=%2Fconnect%2Fauthorize%2Fcallback%3Fclient_id%3DBeinni_Web_Public%26redirect_uri%3Dhttps%253A%252F%252Feventstreamingpublicwebdev.azurewebsites.net%252Fsignin-oidc%26response_type%3Dcode%2520id_token%26scope%3Dopenid%2520profile%2520role%2520email%2520phone%2520Beinni%26response_mode%3Dform_post%26nonce%3D637992176252883502.OTdmZmU1MzQtNTZiZi00ZDZhLWJlNmUtYzFlMjM3YTA4NGQ5MzE1MjdlY2YtNGUwNi00MTliLWE1MTUtMmY2MGRmZmVmNzll%26state%3DCfDJ8Nz0aZ4MpSdEq6-Csy0Lf5XVHw1g4LRIy4pYVUJmazZoIhKB9CFiKIhAbJB7aqURO6rY8uxyILAAk-VKxHh9OAHxig7aLpRnsMIF2REeojjs_wofBWA7WMN-Uwt_h7-VGV09rD170A4ehB6B6heAtzc_rQ_EOFg2rFlUcrYhlBBUvTyonuEQDWqOAEHgoeoUOyPupjQomMW60mOMBiOAZ8a-c96IVK8JG-yrFJnaDOmGG1-dvkO-l7lx_71GZ3318QW35bVGzpBIWeyhOGkCxTV6S-z_QjpOm6Y-j5ny1ldfPfMT-579yTQ64fZ-VGT-zKpXxcRvcpFzNhq-6UG3g0c%26x-client-SKU%3DID_NETSTANDARD2_0%26x-client-ver%3D6.10.0.0"
2022-09-19T20:53:45.869Z pw:api   navigations have finished
2022-09-19T20:53:45.872Z pw:api waiting for selector "input[name="LoginInput\.UserNameOrEmailAddress"]"
2022-09-19T20:53:45.892Z pw:api   selector resolved to visible <input value="" type="text" data-val="true" maxlength="/>
2022-09-19T20:53:45.894Z pw:api attempting click action
2022-09-19T20:53:45.894Z pw:api   waiting for element to be visible, enabled and stable
2022-09-19T20:53:46.291Z pw:api   element is visible, enabled and stable
2022-09-19T20:53:46.292Z pw:api   scrolling into view if needed
2022-09-19T20:53:46.292Z pw:api   done scrolling
2022-09-19T20:53:46.296Z pw:api   performing click action
2022-09-19T20:53:46.301Z pw:api   click action done
2022-09-19T20:53:46.301Z pw:api   waiting for scheduled navigations to finish
2022-09-19T20:53:46.303Z pw:api   navigations have finished
2022-09-19T20:53:46.306Z pw:api waiting for selector "input[name="LoginInput\.UserNameOrEmailAddress"]"
2022-09-19T20:53:46.313Z pw:api   selector resolved to visible <input value="" type="text" data-val="true" maxlength="/>
2022-09-19T20:53:46.315Z pw:api elementHandle.fill("playwrightppv")
2022-09-19T20:53:46.315Z pw:api   waiting for element to be visible, enabled and editable
2022-09-19T20:53:46.320Z pw:api   element is visible, enabled and editable
2022-09-19T20:53:46.324Z pw:api waiting for selector "input[name="LoginInput\.Password"]"
2022-09-19T20:53:46.329Z pw:api   selector resolved to visible <input type="password" data-val="true" maxlength="128" />
2022-09-19T20:53:46.331Z pw:api attempting click action
2022-09-19T20:53:46.331Z pw:api   waiting for element to be visible, enabled and stable
2022-09-19T20:53:46.361Z pw:api   element is visible, enabled and stable
2022-09-19T20:53:46.361Z pw:api   scrolling into view if needed
2022-09-19T20:53:46.361Z pw:api   done scrolling
2022-09-19T20:53:46.364Z pw:api   performing click action
2022-09-19T20:53:46.368Z pw:api   click action done
2022-09-19T20:53:46.368Z pw:api   waiting for scheduled navigations to finish
2022-09-19T20:53:46.369Z pw:api   navigations have finished
2022-09-19T20:53:46.370Z pw:api waiting for selector "input[name="LoginInput\.Password"]"
2022-09-19T20:53:46.372Z pw:api   selector resolved to visible <input type="password" data-val="true" maxlength="128" />
2022-09-19T20:53:46.374Z pw:api elementHandle.fill("1q2w3E*")
2022-09-19T20:53:46.374Z pw:api   waiting for element to be visible, enabled and editable
2022-09-19T20:53:46.377Z pw:api   element is visible, enabled and editable
2022-09-19T20:53:46.382Z pw:api waiting for selector "id=termsandcondition"
2022-09-19T20:53:46.385Z pw:api   selector resolved to visible <input value="true" type="checkbox" data-val="true" id=/>
2022-09-19T20:53:46.388Z pw:api attempting click action
2022-09-19T20:53:46.388Z pw:api   waiting for element to be visible, enabled and stable
2022-09-19T20:53:46.409Z pw:api   element is visible, enabled and stable
2022-09-19T20:53:46.409Z pw:api   scrolling into view if needed
2022-09-19T20:53:46.410Z pw:api   done scrolling
2022-09-19T20:53:46.412Z pw:api   performing click action
2022-09-19T20:53:46.417Z pw:api   click action done
2022-09-19T20:53:46.417Z pw:api   waiting for scheduled navigations to finish
2022-09-19T20:53:46.417Z pw:api   navigations have finished
2022-09-19T20:53:46.419Z pw:api waiting for selector "#loginsubmitbtn"
2022-09-19T20:53:46.421Z pw:api   selector resolved to visible <button type="button" name="Action" value="Login" id="loÔǪ>Innskr├í</button>
2022-09-19T20:53:46.422Z pw:api attempting click action
2022-09-19T20:53:46.422Z pw:api   waiting for element to be visible, enabled and stable
2022-09-19T20:53:46.443Z pw:api   element is visible, enabled and stable
2022-09-19T20:53:46.443Z pw:api   scrolling into view if needed
2022-09-19T20:53:46.443Z pw:api   done scrolling
2022-09-19T20:53:46.446Z pw:api   performing click action
2022-09-19T20:53:46.451Z pw:api   click action done
2022-09-19T20:53:46.451Z pw:api   waiting for scheduled navigations to finish
2022-09-19T20:53:46.452Z pw:api   navigations have finished
2022-09-19T20:53:46.473Z pw:api waiting for navigation to "https://eventstreamingpublicwebdev.azurewebsites.net/" until "Load"
2022-09-19T20:53:46.986Z pw:api   "load" event fired
2022-09-19T20:53:46.986Z pw:api   "domcontentloaded" event fired
2022-09-19T20:53:47.494Z pw:api   "networkidle" event fired
  Failed Bought_Events_Page_ [35 s]
  Error Message:
   System.TimeoutException : Timeout 30000ms exceeded.
=========================== logs ===========================
waiting for navigation to "https://eventstreamingpublicwebdev.azurewebsites.net/" until "Load"
============================================================
  ----> System.TimeoutException : Timeout 30000ms exceeded.
  Stack Trace:
     at Microsoft.Playwright.Core.Waiter.WaitForPromiseAsync[T](Task`1 task, Action dispose) in /_/src/Playwright/Core/Waiter.cs:line 179
   at Microsoft.Playwright.Core.Frame.WaitForNavigationAsync(FrameWaitForNavigationOptions options) in /_/src/Playwright/Core/Frame.cs:line 226
   at BSR.Beinni.PlaywrightTests.FrontPagelogin.Bought_Events_Page_() in C:\Dev\IBeinni\aspnet-core\test\BSR.Beinni.Playwright.Tests\LoginTests\Frontpagelogin.cs:line 100
   at NUnit.Framework.Internal.TaskAwaitAdapter.GenericAdapter`1.BlockUntilCompleted()
   at NUnit.Framework.Internal.MessagePumpStrategy.NoMessagePumpStrategy.WaitForCompletion(AwaitAdapter awaiter)
   at NUnit.Framework.Internal.AsyncToSyncAdapter.Await(Func`1 invoke)
   at NUnit.Framework.Internal.Commands.TestMethodCommand.RunTestMethod(TestExecutionContext context)
   at NUnit.Framework.Internal.Commands.TestMethodCommand.Execute(TestExecutionContext context)
   at NUnit.Framework.Internal.Commands.BeforeAndAfterTestCommand.<>c__DisplayClass1_0.<Execute>b__0()
   at NUnit.Framework.Internal.Commands.DelegatingTestCommand.RunTestMethodInThreadAbortSafeZone(TestExecutionContext context, Action action)
--TimeoutException
   at Microsoft.Playwright.Helpers.TaskHelper.<>c__DisplayClass2_0.<WithTimeout>b__0() in /_/src/Playwright/Helpers/TaskHelper.cs:line 73
   at Microsoft.Playwright.Helpers.TaskHelper.WithTimeout(Task task, Func`1 timeoutAction, TimeSpan timeout, CancellationToken cancellationToken) in /_/src/Playwright/Helpers/TaskHelper.cs:line 109
   at Microsoft.Playwright.Core.Waiter.WaitForPromiseAsync[T](Task`1 task, Action dispose) in /_/src/Playwright/Core/Waiter.cs:line 171
  Standard Error Messages:
 2022-09-19T20:53:41.978Z pw:api navigating to "https://eventstreamingpublicwebdev.azurewebsites.net/", waiting until "load"
 2022-09-19T20:53:42.570Z pw:api   "commit" event fired
 2022-09-19T20:53:42.570Z pw:api   navigated to "https://eventstreamingpublicwebdev.azurewebsites.net/LandingPage"
 2022-09-19T20:53:43.310Z pw:api   "domcontentloaded" event fired
 2022-09-19T20:53:43.361Z pw:api   "load" event fired
 2022-09-19T20:53:43.368Z pw:api navigating to "https://eventstreamingpublicwebdev.azurewebsites.net/LoginSelector", waiting until "load"
 2022-09-19T20:53:43.891Z pw:api   "commit" event fired
 2022-09-19T20:53:43.891Z pw:api   navigated to "https://eventstreamingpublicwebdev.azurewebsites.net/LoginSelector"
 2022-09-19T20:53:44.996Z pw:api   "load" event fired
 2022-09-19T20:53:44.996Z pw:api   "domcontentloaded" event fired
 2022-09-19T20:53:45.004Z pw:api waiting for selector "a[role="button"]:has-text("Innskráning áhorfanda")"
 2022-09-19T20:53:45.023Z pw:api   selector resolved to visible <a role="button" class="btn-lg btn" href="/Account/></a>
 2022-09-19T20:53:45.027Z pw:api attempting click action
 2022-09-19T20:53:45.027Z pw:api   waiting for element to be visible, enabled and stable
 2022-09-19T20:53:45.043Z pw:api   element is visible, enabled and stable
 2022-09-19T20:53:45.043Z pw:api   scrolling into view if needed
 2022-09-19T20:53:45.046Z pw:api   done scrolling
 2022-09-19T20:53:45.048Z pw:api   performing click action
 2022-09-19T20:53:45.865Z pw:api   click action done
 2022-09-19T20:53:45.865Z pw:api   waiting for scheduled navigations to finish
 2022-09-19T20:53:45.865Z pw:api   "commit" event fired
 2022-09-19T20:53:45.866Z pw:api   navigated to "https://streamworksidentitydev.azurewebsites.net/Account/Login?ReturnUrl=%2Fconnect%2Fauthorize%2Fcallback%3Fclient_id%3DBeinni_Web_Public%26redirect_uri%3Dhttps%253A%252F%252Feventstreamingpublicwebdev.azurewebsites.net%252Fsignin-oidc%26response_type%3Dcode%2520id_token%26scope%3Dopenid%2520profile%2520role%2520email%2520phone%2520Beinni%26response_mode%3Dform_post%26nonce%3D637992176252883502.OTdmZmU1MzQtNTZiZi00ZDZhLWJlNmUtYzFlMjM3YTA4NGQ5MzE1MjdlY2YtNGUwNi00MTliLWE1MTUtMmY2MGRmZmVmNzll%26state%3DCfDJ8Nz0aZ4MpSdEq6-Csy0Lf5XVHw1g4LRIy4pYVUJmazZoIhKB9CFiKIhAbJB7aqURO6rY8uxyILAAk-VKxHh9OAHxig7aLpRnsMIF2REeojjs_wofBWA7WMN-Uwt_h7-VGV09rD170A4ehB6B6heAtzc_rQ_EOFg2rFlUcrYhlBBUvTyonuEQDWqOAEHgoeoUOyPupjQomMW60mOMBiOAZ8a-c96IVK8JG-yrFJnaDOmGG1-dvkO-l7lx_71GZ3318QW35bVGzpBIWeyhOGkCxTV6S-z_QjpOm6Y-j5ny1ldfPfMT-579yTQ64fZ-VGT-zKpXxcRvcpFzNhq-6UG3g0c%26x-client-SKU%3DID_NETSTANDARD2_0%26x-client-ver%3D6.10.0.0"
 2022-09-19T20:53:45.866Z pw:api   navigated to "https://streamworksidentitydev.azurewebsites.net/Account/Login?ReturnUrl=%2Fconnect%2Fauthorize%2Fcallback%3Fclient_id%3DBeinni_Web_Public%26redirect_uri%3Dhttps%253A%252F%252Feventstreamingpublicwebdev.azurewebsites.net%252Fsignin-oidc%26response_type%3Dcode%2520id_token%26scope%3Dopenid%2520profile%2520role%2520email%2520phone%2520Beinni%26response_mode%3Dform_post%26nonce%3D637992176252883502.OTdmZmU1MzQtNTZiZi00ZDZhLWJlNmUtYzFlMjM3YTA4NGQ5MzE1MjdlY2YtNGUwNi00MTliLWE1MTUtMmY2MGRmZmVmNzll%26state%3DCfDJ8Nz0aZ4MpSdEq6-Csy0Lf5XVHw1g4LRIy4pYVUJmazZoIhKB9CFiKIhAbJB7aqURO6rY8uxyILAAk-VKxHh9OAHxig7aLpRnsMIF2REeojjs_wofBWA7WMN-Uwt_h7-VGV09rD170A4ehB6B6heAtzc_rQ_EOFg2rFlUcrYhlBBUvTyonuEQDWqOAEHgoeoUOyPupjQomMW60mOMBiOAZ8a-c96IVK8JG-yrFJnaDOmGG1-dvkO-l7lx_71GZ3318QW35bVGzpBIWeyhOGkCxTV6S-z_QjpOm6Y-j5ny1ldfPfMT-579yTQ64fZ-VGT-zKpXxcRvcpFzNhq-6UG3g0c%26x-client-SKU%3DID_NETSTANDARD2_0%26x-client-ver%3D6.10.0.0"
 2022-09-19T20:53:45.869Z pw:api   navigations have finished
 2022-09-19T20:53:45.872Z pw:api waiting for selector "input[name="LoginInput\.UserNameOrEmailAddress"]"
 2022-09-19T20:53:45.892Z pw:api   selector resolved to visible <input value="" type="text" data-val="true" maxlength="/>
 2022-09-19T20:53:45.894Z pw:api attempting click action
 2022-09-19T20:53:45.894Z pw:api   waiting for element to be visible, enabled and stable
 2022-09-19T20:53:46.291Z pw:api   element is visible, enabled and stable
 2022-09-19T20:53:46.292Z pw:api   scrolling into view if needed
 2022-09-19T20:53:46.292Z pw:api   done scrolling
 2022-09-19T20:53:46.296Z pw:api   performing click action
 2022-09-19T20:53:46.301Z pw:api   click action done
 2022-09-19T20:53:46.301Z pw:api   waiting for scheduled navigations to finish
 2022-09-19T20:53:46.303Z pw:api   navigations have finished
 2022-09-19T20:53:46.306Z pw:api waiting for selector "input[name="LoginInput\.UserNameOrEmailAddress"]"
 2022-09-19T20:53:46.313Z pw:api   selector resolved to visible <input value="" type="text" data-val="true" maxlength="/>
 2022-09-19T20:53:46.315Z pw:api elementHandle.fill("playwrightppv")
 2022-09-19T20:53:46.315Z pw:api   waiting for element to be visible, enabled and editable
 2022-09-19T20:53:46.320Z pw:api   element is visible, enabled and editable
 2022-09-19T20:53:46.324Z pw:api waiting for selector "input[name="LoginInput\.Password"]"
 2022-09-19T20:53:46.329Z pw:api   selector resolved to visible <input type="password" data-val="true" maxlength="128" />
 2022-09-19T20:53:46.331Z pw:api attempting click action
 2022-09-19T20:53:46.331Z pw:api   waiting for element to be visible, enabled and stable
 2022-09-19T20:53:46.361Z pw:api   element is visible, enabled and stable
 2022-09-19T20:53:46.361Z pw:api   scrolling into view if needed
 2022-09-19T20:53:46.361Z pw:api   done scrolling
 2022-09-19T20:53:46.364Z pw:api   performing click action
 2022-09-19T20:53:46.368Z pw:api   click action done
 2022-09-19T20:53:46.368Z pw:api   waiting for scheduled navigations to finish
 2022-09-19T20:53:46.369Z pw:api   navigations have finished
 2022-09-19T20:53:46.370Z pw:api waiting for selector "input[name="LoginInput\.Password"]"
 2022-09-19T20:53:46.372Z pw:api   selector resolved to visible <input type="password" data-val="true" maxlength="128" />
 2022-09-19T20:53:46.374Z pw:api elementHandle.fill("1q2w3E*")
 2022-09-19T20:53:46.374Z pw:api   waiting for element to be visible, enabled and editable
 2022-09-19T20:53:46.377Z pw:api   element is visible, enabled and editable
 2022-09-19T20:53:46.382Z pw:api waiting for selector "id=termsandcondition"
 2022-09-19T20:53:46.385Z pw:api   selector resolved to visible <input value="true" type="checkbox" data-val="true" id=/>
 2022-09-19T20:53:46.388Z pw:api attempting click action
 2022-09-19T20:53:46.388Z pw:api   waiting for element to be visible, enabled and stable
 2022-09-19T20:53:46.409Z pw:api   element is visible, enabled and stable
 2022-09-19T20:53:46.409Z pw:api   scrolling into view if needed
 2022-09-19T20:53:46.410Z pw:api   done scrolling
 2022-09-19T20:53:46.412Z pw:api   performing click action
 2022-09-19T20:53:46.417Z pw:api   click action done
 2022-09-19T20:53:46.417Z pw:api   waiting for scheduled navigations to finish
 2022-09-19T20:53:46.417Z pw:api   navigations have finished
 2022-09-19T20:53:46.419Z pw:api waiting for selector "#loginsubmitbtn"
 2022-09-19T20:53:46.421Z pw:api   selector resolved to visible <button type="button" name="Action" value="Login" id="loÔǪ>Innskr├í</button>
 2022-09-19T20:53:46.422Z pw:api attempting click action
 2022-09-19T20:53:46.422Z pw:api   waiting for element to be visible, enabled and stable
 2022-09-19T20:53:46.443Z pw:api   element is visible, enabled and stable
 2022-09-19T20:53:46.443Z pw:api   scrolling into view if needed
 2022-09-19T20:53:46.443Z pw:api   done scrolling
 2022-09-19T20:53:46.446Z pw:api   performing click action
 2022-09-19T20:53:46.451Z pw:api   click action done
 2022-09-19T20:53:46.451Z pw:api   waiting for scheduled navigations to finish
 2022-09-19T20:53:46.452Z pw:api   navigations have finished
 2022-09-19T20:53:46.473Z pw:api waiting for navigation to "https://eventstreamingpublicwebdev.azurewebsites.net/" until "Load"
 2022-09-19T20:53:46.986Z pw:api   "load" event fired
 2022-09-19T20:53:46.986Z pw:api   "domcontentloaded" event fired
 2022-09-19T20:53:47.494Z pw:api   "networkidle" event fired

2022-09-19T20:54:16.741Z pw:api navigating to "https://eventstreamingpublicwebdev.azurewebsites.net/", waiting until "load"
2022-09-19T20:54:17.236Z pw:api   "commit" event fired
2022-09-19T20:54:17.237Z pw:api   navigated to "https://eventstreamingpublicwebdev.azurewebsites.net/LandingPage"
2022-09-19T20:54:17.956Z pw:api   "domcontentloaded" event fired
2022-09-19T20:54:18.225Z pw:api   "load" event fired
2022-09-19T20:54:18.250Z pw:api navigating to "https://eventstreamingpublicwebdev.azurewebsites.net/LoginSelector", waiting until "load"
2022-09-19T20:54:18.390Z pw:api   "commit" event fired
2022-09-19T20:54:18.390Z pw:api   navigated to "https://eventstreamingpublicwebdev.azurewebsites.net/LoginSelector"
2022-09-19T20:54:18.841Z pw:api   "load" event fired
2022-09-19T20:54:18.842Z pw:api   "domcontentloaded" event fired
2022-09-19T20:54:18.856Z pw:api waiting for selector "a[role="button"]:has-text("Innskráning áhorfanda")"
2022-09-19T20:54:18.872Z pw:api   selector resolved to visible <a role="button" class="btn-lg btn" href="/Account/></a>
2022-09-19T20:54:18.875Z pw:api attempting click action
2022-09-19T20:54:18.875Z pw:api   waiting for element to be visible, enabled and stable
2022-09-19T20:54:18.892Z pw:api   element is visible, enabled and stable
2022-09-19T20:54:18.892Z pw:api   scrolling into view if needed
2022-09-19T20:54:18.893Z pw:api   done scrolling
2022-09-19T20:54:18.897Z pw:api   performing click action
2022-09-19T20:54:19.614Z pw:api   click action done
2022-09-19T20:54:19.614Z pw:api   waiting for scheduled navigations to finish
2022-09-19T20:54:19.615Z pw:api   "commit" event fired
2022-09-19T20:54:19.615Z pw:api   navigated to "https://streamworksidentitydev.azurewebsites.net/Account/Login?ReturnUrl=%2Fconnect%2Fauthorize%2Fcallback%3Fclient_id%3DBeinni_Web_Public%26redirect_uri%3Dhttps%253A%252F%252Feventstreamingpublicwebdev.azurewebsites.net%252Fsignin-oidc%26response_type%3Dcode%2520id_token%26scope%3Dopenid%2520profile%2520role%2520email%2520phone%2520Beinni%26response_mode%3Dform_post%26nonce%3D637992176590468503.OTNiZWZmNDItZGFmNi00OTQzLThjNDctOTExOGJjNGUxNTc0OTgyNmJlM2ItYTk5ZC00OWQ1LTg4MDYtMWY5NzAyYmYzMTJi%26state%3DCfDJ8Nz0aZ4MpSdEq6-Csy0Lf5WQWcvPWvB_LvTZouDE8lxyKPGtkRUaQtiNWTscL9n3lf0hvpklyNK0ZuvQD5SSIsSO_pior48ll2zySWI5_9nUtZODMMhiL_CrYSXY7_hAc4y7mzXerQfmS3-QuShNww9mxkvKQVf__A_uQsSLsr4nuHaHfMy6pRioAysQxijFibqF-51X6iPktmaIMX8BHRFpeOq9P1_swkeEliQ5eNy0XdHFyO0T0dE4ICvcH1Pm8ZkHd7tYQABFoZHp6OuS3oflqzgXHqtka2wOl2plsbuK4-UaT6qhJBtUMLfem2suWdNrpCc9MvYxVxnmk7K3CVk%26x-client-SKU%3DID_NETSTANDARD2_0%26x-client-ver%3D6.10.0.0"
2022-09-19T20:54:19.615Z pw:api   navigated to "https://streamworksidentitydev.azurewebsites.net/Account/Login?ReturnUrl=%2Fconnect%2Fauthorize%2Fcallback%3Fclient_id%3DBeinni_Web_Public%26redirect_uri%3Dhttps%253A%252F%252Feventstreamingpublicwebdev.azurewebsites.net%252Fsignin-oidc%26response_type%3Dcode%2520id_token%26scope%3Dopenid%2520profile%2520role%2520email%2520phone%2520Beinni%26response_mode%3Dform_post%26nonce%3D637992176590468503.OTNiZWZmNDItZGFmNi00OTQzLThjNDctOTExOGJjNGUxNTc0OTgyNmJlM2ItYTk5ZC00OWQ1LTg4MDYtMWY5NzAyYmYzMTJi%26state%3DCfDJ8Nz0aZ4MpSdEq6-Csy0Lf5WQWcvPWvB_LvTZouDE8lxyKPGtkRUaQtiNWTscL9n3lf0hvpklyNK0ZuvQD5SSIsSO_pior48ll2zySWI5_9nUtZODMMhiL_CrYSXY7_hAc4y7mzXerQfmS3-QuShNww9mxkvKQVf__A_uQsSLsr4nuHaHfMy6pRioAysQxijFibqF-51X6iPktmaIMX8BHRFpeOq9P1_swkeEliQ5eNy0XdHFyO0T0dE4ICvcH1Pm8ZkHd7tYQABFoZHp6OuS3oflqzgXHqtka2wOl2plsbuK4-UaT6qhJBtUMLfem2suWdNrpCc9MvYxVxnmk7K3CVk%26x-client-SKU%3DID_NETSTANDARD2_0%26x-client-ver%3D6.10.0.0"
2022-09-19T20:54:19.620Z pw:api   navigations have finished
2022-09-19T20:54:19.627Z pw:api waiting for selector "input[name="LoginInput\.UserNameOrEmailAddress"]"
2022-09-19T20:54:19.653Z pw:api   selector resolved to visible <input value="" type="text" data-val="true" maxlength="/>
2022-09-19T20:54:19.655Z pw:api attempting click action
2022-09-19T20:54:19.655Z pw:api   waiting for element to be visible, enabled and stable
2022-09-19T20:54:20.172Z pw:api   element is visible, enabled and stable
2022-09-19T20:54:20.172Z pw:api   scrolling into view if needed
2022-09-19T20:54:20.173Z pw:api   done scrolling
2022-09-19T20:54:20.179Z pw:api   performing click action
2022-09-19T20:54:20.185Z pw:api   click action done
2022-09-19T20:54:20.185Z pw:api   waiting for scheduled navigations to finish
2022-09-19T20:54:20.185Z pw:api   navigations have finished
2022-09-19T20:54:20.191Z pw:api waiting for selector "input[name="LoginInput\.UserNameOrEmailAddress"]"
2022-09-19T20:54:20.194Z pw:api   selector resolved to visible <input value="" type="text" data-val="true" maxlength="/>
2022-09-19T20:54:20.197Z pw:api elementHandle.fill("playwrightppv")
2022-09-19T20:54:20.199Z pw:api   waiting for element to be visible, enabled and editable
2022-09-19T20:54:20.203Z pw:api   element is visible, enabled and editable
2022-09-19T20:54:20.212Z pw:api waiting for selector "input[name="LoginInput\.Password"]"
2022-09-19T20:54:20.215Z pw:api   selector resolved to visible <input type="password" data-val="true" maxlength="128" />
2022-09-19T20:54:20.216Z pw:api attempting click action
2022-09-19T20:54:20.216Z pw:api   waiting for element to be visible, enabled and stable
2022-09-19T20:54:20.242Z pw:api   element is visible, enabled and stable
2022-09-19T20:54:20.242Z pw:api   scrolling into view if needed
2022-09-19T20:54:20.242Z pw:api   done scrolling
2022-09-19T20:54:20.247Z pw:api   performing click action
2022-09-19T20:54:20.254Z pw:api   click action done
2022-09-19T20:54:20.254Z pw:api   waiting for scheduled navigations to finish
2022-09-19T20:54:20.255Z pw:api   navigations have finished
2022-09-19T20:54:20.260Z pw:api waiting for selector "input[name="LoginInput\.Password"]"
2022-09-19T20:54:20.263Z pw:api   selector resolved to visible <input type="password" data-val="true" maxlength="128" />
2022-09-19T20:54:20.266Z pw:api elementHandle.fill("1q2w3E*")
2022-09-19T20:54:20.269Z pw:api   waiting for element to be visible, enabled and editable
2022-09-19T20:54:20.277Z pw:api   element is visible, enabled and editable
2022-09-19T20:54:20.285Z pw:api waiting for selector "id=termsandcondition"
2022-09-19T20:54:20.291Z pw:api   selector resolved to visible <input value="true" type="checkbox" data-val="true" id=/>
2022-09-19T20:54:20.298Z pw:api attempting click action
2022-09-19T20:54:20.298Z pw:api   waiting for element to be visible, enabled and stable
2022-09-19T20:54:20.328Z pw:api   element is visible, enabled and stable
2022-09-19T20:54:20.328Z pw:api   scrolling into view if needed
2022-09-19T20:54:20.328Z pw:api   done scrolling
2022-09-19T20:54:20.333Z pw:api   performing click action
2022-09-19T20:54:20.341Z pw:api   click action done
2022-09-19T20:54:20.341Z pw:api   waiting for scheduled navigations to finish
2022-09-19T20:54:20.342Z pw:api   navigations have finished
2022-09-19T20:54:20.351Z pw:api waiting for selector "#loginsubmitbtn"
2022-09-19T20:54:20.354Z pw:api   selector resolved to visible <button type="button" name="Action" value="Login" id="loÔǪ>Innskr├í</button>
2022-09-19T20:54:20.356Z pw:api attempting click action
2022-09-19T20:54:20.356Z pw:api   waiting for element to be visible, enabled and stable
2022-09-19T20:54:20.393Z pw:api   element is visible, enabled and stable
2022-09-19T20:54:20.393Z pw:api   scrolling into view if needed
2022-09-19T20:54:20.394Z pw:api   done scrolling
2022-09-19T20:54:20.399Z pw:api   performing click action
2022-09-19T20:54:20.404Z pw:api   "domcontentloaded" event fired
2022-09-19T20:54:20.404Z pw:api   "load" event fired
2022-09-19T20:54:21.077Z pw:api   click action done
2022-09-19T20:54:21.077Z pw:api   waiting for scheduled navigations to finish
2022-09-19T20:54:21.077Z pw:api   "commit" event fired
2022-09-19T20:54:21.078Z pw:api   navigated to "https://streamworksidentitydev.azurewebsites.net/connect/authorize/callback?client_id=Beinni_Web_Public&redirect_uri=https%3A%2F%2Feventstreamingpublicwebdev.azurewebsites.net%2Fsignin-oidc&response_type=code%20id_token&scope=openid%20profile%20role%20email%20phone%20Beinni&response_mode=form_post&nonce=637992176590468503.OTNiZWZmNDItZGFmNi00OTQzLThjNDctOTExOGJjNGUxNTc0OTgyNmJlM2ItYTk5ZC00OWQ1LTg4MDYtMWY5NzAyYmYzMTJi&state=CfDJ8Nz0aZ4MpSdEq6-Csy0Lf5WQWcvPWvB_LvTZouDE8lxyKPGtkRUaQtiNWTscL9n3lf0hvpklyNK0ZuvQD5SSIsSO_pior48ll2zySWI5_9nUtZODMMhiL_CrYSXY7_hAc4y7mzXerQfmS3-QuShNww9mxkvKQVf__A_uQsSLsr4nuHaHfMy6pRioAysQxijFibqF-51X6iPktmaIMX8BHRFpeOq9P1_swkeEliQ5eNy0XdHFyO0T0dE4ICvcH1Pm8ZkHd7tYQABFoZHp6OuS3oflqzgXHqtka2wOl2plsbuK4-UaT6qhJBtUMLfem2suWdNrpCc9MvYxVxnmk7K3CVk&x-client-SKU=ID_NETSTANDARD2_0&x-client-ver=6.10.0.0"
2022-09-19T20:54:21.078Z pw:api   navigated to "https://streamworksidentitydev.azurewebsites.net/connect/authorize/callback?client_id=Beinni_Web_Public&redirect_uri=https%3A%2F%2Feventstreamingpublicwebdev.azurewebsites.net%2Fsignin-oidc&response_type=code%20id_token&scope=openid%20profile%20role%20email%20phone%20Beinni&response_mode=form_post&nonce=637992176590468503.OTNiZWZmNDItZGFmNi00OTQzLThjNDctOTExOGJjNGUxNTc0OTgyNmJlM2ItYTk5ZC00OWQ1LTg4MDYtMWY5NzAyYmYzMTJi&state=CfDJ8Nz0aZ4MpSdEq6-Csy0Lf5WQWcvPWvB_LvTZouDE8lxyKPGtkRUaQtiNWTscL9n3lf0hvpklyNK0ZuvQD5SSIsSO_pior48ll2zySWI5_9nUtZODMMhiL_CrYSXY7_hAc4y7mzXerQfmS3-QuShNww9mxkvKQVf__A_uQsSLsr4nuHaHfMy6pRioAysQxijFibqF-51X6iPktmaIMX8BHRFpeOq9P1_swkeEliQ5eNy0XdHFyO0T0dE4ICvcH1Pm8ZkHd7tYQABFoZHp6OuS3oflqzgXHqtka2wOl2plsbuK4-UaT6qhJBtUMLfem2suWdNrpCc9MvYxVxnmk7K3CVk&x-client-SKU=ID_NETSTANDARD2_0&x-client-ver=6.10.0.0"
2022-09-19T20:54:21.080Z pw:api   "load" event fired
2022-09-19T20:54:21.082Z pw:api   "domcontentloaded" event fired
2022-09-19T20:54:21.083Z pw:api   navigations have finished

Failed!  - Failed:     1, Passed:     1, Skipped:     0, Total:     2, Duration: 39 s - BSR.Beinni.PlaywrightTests.dll (net6.0)

C:\Dev\IBeinni\aspnet-core\test\BSR.Beinni.Playwright.Tests>
sturlath commented 1 year ago

Any clue what this might be @mxschmitt? And this all just runs fine on your end again and again?

mxschmitt commented 1 year ago

Unfortunately not, I'd try to debug it with tracing, to find out how the website looks like if the logs are not helping.

mxschmitt commented 1 year ago

Closing for now since we can't act on it, feel free to re-file with a smaller repro.