File tree 2 files changed +16
-11
lines changed
2 files changed +16
-11
lines changed Original file line number Diff line number Diff line change @@ -51,14 +51,19 @@ public async Task<IBrowser> LaunchAsync(LaunchOptions options)
51
51
52
52
EnsureSingleLaunchOrConnect ( ) ;
53
53
_browser = options . Browser ;
54
- var buildId = options . Browser switch
54
+
55
+ var executable = options . ExecutablePath ;
56
+ if ( executable == null )
55
57
{
56
- SupportedBrowser . Firefox => await Firefox . GetDefaultBuildIdAsync ( ) . ConfigureAwait ( false ) ,
57
- SupportedBrowser . Chrome or SupportedBrowser . ChromeHeadlessShell => Chrome . DefaultBuildId ,
58
- SupportedBrowser . Chromium => await Chromium . ResolveBuildIdAsync ( BrowserFetcher . GetCurrentPlatform ( ) ) . ConfigureAwait ( false ) ,
59
- _ => throw new ArgumentException ( "Invalid browser" ) ,
60
- } ;
61
- var executable = options . ExecutablePath ?? GetExecutablePath ( options , buildId ) ;
58
+ var buildId = options . Browser switch
59
+ {
60
+ SupportedBrowser . Firefox => await Firefox . GetDefaultBuildIdAsync ( ) . ConfigureAwait ( false ) ,
61
+ SupportedBrowser . Chrome or SupportedBrowser . ChromeHeadlessShell => Chrome . DefaultBuildId ,
62
+ SupportedBrowser . Chromium => await Chromium . ResolveBuildIdAsync ( BrowserFetcher . GetCurrentPlatform ( ) ) . ConfigureAwait ( false ) ,
63
+ _ => throw new ArgumentException ( "Invalid browser" ) ,
64
+ } ;
65
+ executable = GetExecutablePath ( options , buildId ) ;
66
+ }
62
67
63
68
Process = options . Browser switch
64
69
{
Original file line number Diff line number Diff line change 12
12
<Description >Headless Browser .NET API</Description >
13
13
<PackageId >PuppeteerSharp</PackageId >
14
14
<PackageReleaseNotes ></PackageReleaseNotes >
15
- <PackageVersion >20.0.2 </PackageVersion >
16
- <ReleaseVersion >20.0.2 </ReleaseVersion >
17
- <AssemblyVersion >20.0.2 </AssemblyVersion >
18
- <FileVersion >20.0.2 </FileVersion >
15
+ <PackageVersion >20.0.3 </PackageVersion >
16
+ <ReleaseVersion >20.0.3 </ReleaseVersion >
17
+ <AssemblyVersion >20.0.3 </AssemblyVersion >
18
+ <FileVersion >20.0.3 </FileVersion >
19
19
<SynchReleaseVersion >false</SynchReleaseVersion >
20
20
<StyleCopTreatErrorsAsWarnings >false</StyleCopTreatErrorsAsWarnings >
21
21
<DebugType >embedded</DebugType >
You can’t perform that action at this time.
0 commit comments