File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
src/Shared/BrowserTesting/src Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -49,8 +49,16 @@ async Task InitializeCore()
49
49
{
50
50
// Work around weird driverExecutable lookup logic
51
51
var helixDirectory = Environment . GetEnvironmentVariable ( "HELIX_WORKITEM_ROOT" ) ;
52
- var driverPath = string . IsNullOrEmpty ( helixDirectory ) ? null : Path . Combine ( helixDirectory , "runtests.sh" ) ;
53
- Playwright = await PlaywrightSharp . Playwright . CreateAsync ( _loggerFactory , driverExecutablePath : driverPath /*, debug: "pw:api"*/ ) ;
52
+ if ( string . IsNullOrEmpty ( helixDirectory ) )
53
+ {
54
+ var driverPath = Path . Combine ( helixDirectory ,
55
+ RuntimeInformation . IsOSPlatform ( OSPlatform . OSX ) || RuntimeInformation . IsOSPlatform ( OSPlatform . Linux ) ? "playwright.sh" : "playwright.cmd" ) ;
56
+ Playwright = await PlaywrightSharp . Playwright . CreateAsync ( _loggerFactory , driverExecutablePath : driverPath /*, debug: "pw:api"*/ ) ;
57
+ }
58
+ else
59
+ {
60
+ Playwright = await PlaywrightSharp . Playwright . CreateAsync ( _loggerFactory /*, debug: "pw:api"*/ ) ;
61
+ }
54
62
foreach ( var ( browserName , options ) in _browserManagerConfiguration . BrowserOptions )
55
63
{
56
64
if ( ! _launchBrowsers . ContainsKey ( browserName ) )
You can’t perform that action at this time.
0 commit comments