Skip to content

Commit bcacfdd

Browse files
committed
Update BrowserManager.cs
1 parent e25d161 commit bcacfdd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Shared/BrowserTesting/src/BrowserManager.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,10 @@ private async Task InitializeAsync()
4646

4747
async Task InitializeCore()
4848
{
49-
Playwright = await PlaywrightSharp.Playwright.CreateAsync(_loggerFactory/*, debug: "pw:api"*/);
49+
// Work around weird driverExecutable lookup logic
50+
var helixDirectory = Environment.GetEnvironmentVariable("HELIX_WORKITEM_ROOT")
51+
var driverPath = string.isNullOrEmpty(helixDirectory) ? null : Path.Combine(helixDirectory, "runtests.sh");
52+
Playwright = await PlaywrightSharp.Playwright.CreateAsync(_loggerFactory, driverExecutablePath: driverPath /*, debug: "pw:api"*/);
5053
foreach (var (browserName, options) in _browserManagerConfiguration.BrowserOptions)
5154
{
5255
if (!_launchBrowsers.ContainsKey(browserName))

0 commit comments

Comments
 (0)