You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using System.Text.RegularExpressions;using System.Threading.Tasks;using Microsoft.Playwright;using Microsoft.Playwright.NUnit;using NUnit.Framework;namespace PlaywrightTests;[Parallelizable(ParallelScope.Self)][TestFixture]publicclassTests:PageTest{[Test]publicasync Task HomepageHasPlaywrightInTitleAndGetStartedLinkLinkingtoTheIntroPage(){await Page.GotoAsync("https://playwright.dev");// Expect a title "to contain" a substring.await Expect(Page).ToHaveTitleAsync(new Regex("Playwright"));// create a locatorvargetStarted= Page.GetByRole(AriaRole.Link,new(){Name="Get started"});// Expect an attribute "to be strictly equal" to the value.await Expect(getStarted).ToHaveAttributeAsync("href","/docs/intro");// Click the get started link.await getStarted.ClickAsync();// Expects the URL to contain intro.await Expect(Page).ToHaveURLAsync(new Regex(".*intro"));}}
Playwright test execute successfully in one or more browsers, whether they pass or not.
Actual
Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
Failed HomepageHasPlaywrightInTitleAndGetStartedLinkLinkingtoTheIntroPage [228 ms]
Error Message:
System.ArgumentException : Invalid browser name: /vscode/vscode-server/bin/linux-x64/8b3775030ed1a69b13e4f4c628c612102e30a681/bin/helpers/browser.sh
Stack Trace:
at Microsoft.Playwright.TestAdapter.PlaywrightSettingsProvider.ValidateBrowserName(String browserName) in /_/src/Playwright.TestAdapter/PlaywrightSettingsProvider.cs:line 102
at Microsoft.Playwright.TestAdapter.PlaywrightSettingsProvider.get_BrowserName() in /_/src/Playwright.TestAdapter/PlaywrightSettingsProvider.cs:line 45
at Microsoft.Playwright.NUnit.PlaywrightTest.PlaywrightSetup() in /_/src/Playwright.NUnit/PlaywrightTest.cs:line 44
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.SetUpTearDownItem.RunSetUpOrTearDownMethod(TestExecutionContext context, IMethodInfo method)
at NUnit.Framework.Internal.Commands.SetUpTearDownItem.RunSetUp(TestExecutionContext context)
at NUnit.Framework.Internal.Commands.SetUpTearDownCommand.<>c__DisplayClass0_0.<.ctor>b__0(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)
Failed! - Failed: 1, Passed: 0, Skipped: 0, Total: 1, Duration: 228 ms - YogaEndToEndTests.dll (net8.0)
The text was updated successfully, but these errors were encountered:
Setting BROWSER inline with the command works! I'm going to see if I can somehow set an environment variable in the container to keep it at a sane value, like chromium.
System info
Source code
Steps
Expected
Playwright test execute successfully in one or more browsers, whether they pass or not.
Actual
The text was updated successfully, but these errors were encountered: