File tree Expand file tree Collapse file tree 3 files changed +17
-3
lines changed 
lib/PuppeteerSharp.Tests/Browsers/Chrome Expand file tree Collapse file tree 3 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,6 @@ await using (var browser = await Puppeteer.LaunchAsync(new()
5151    Console .WriteLine (" Export completed"  );
5252}
5353``` 
54- <sup ><a  href =' https://github.com/hardkoded/puppeteer-sharp/blob/master/lib/PuppeteerSharp.Tests/Browsers/Chrome/ChromeDataTests.cs#L14-L49  '  title =' Snippet source file ' >snippet source</a > | <a  href =' #snippet-CustomVersionsExample '  title =' Start of snippet ' >anchor</a ></sup >
54+ <sup ><a  href =' https://github.com/hardkoded/puppeteer-sharp/blob/master/lib/PuppeteerSharp.Tests/Browsers/Chrome/ChromeDataTests.cs#L24-L59  '  title =' Snippet source file ' >snippet source</a > | <a  href =' #snippet-CustomVersionsExample '  title =' Start of snippet ' >anchor</a ></sup >
5555<!--  endSnippet --> 
5656``` 
Original file line number Diff line number Diff line change @@ -11,12 +11,16 @@ from a location where it was previously downloaded instead of from the default l
1111
1212Use ` BrowserFetcherOptions `  to specify the full path for where to download Chrome.
1313
14- ``` 
14+ <!--  snippet: ReuseChromeExample --> 
15+ <a  id =' snippet-ReuseChromeExample ' ></a >
16+ ``` cs 
1517var  downloadPath  =  " /Users/dario/chrome"  ;
1618var  browserFetcherOptions  =  new  BrowserFetcherOptions  { Path  =  downloadPath  };
17- using  var browserFetcher = new BrowserFetcher(browserFetcherOptions);
19+ var  browserFetcher  =  new  BrowserFetcher (browserFetcherOptions );
1820var  installedBrowser  =  await  browserFetcher .DownloadAsync ();
1921``` 
22+ <sup ><a  href =' https://github.com/hardkoded/puppeteer-sharp/blob/master/lib/PuppeteerSharp.Tests/Browsers/Chrome/ChromeDataTests.cs#L14-L19 '  title =' Snippet source file ' >snippet source</a > | <a  href =' #snippet-ReuseChromeExample '  title =' Start of snippet ' >anchor</a ></sup >
23+ <!--  endSnippet --> 
2024
2125Use ` Puppeteer.LaunchAsync() `  with ` LaunchOptions `  with the ` LaunchOptions.ExecutablePath `  property set to the
2226fully qualified path to the Chrome executable.
Original file line number Diff line number Diff line change @@ -9,6 +9,16 @@ namespace PuppeteerSharp.Tests.Browsers.Chrome
99{ 
1010    public  class  ChromeDataTests 
1111    { 
12+         public  async  Task  ReuseChromeExample ( ) 
13+         { 
14+             #region ReuseChromeExample
15+             var  downloadPath  =  "/Users/dario/chrome" ; 
16+             var  browserFetcherOptions  =  new  BrowserFetcherOptions  {  Path  =  downloadPath  } ; 
17+             var  browserFetcher  =  new  BrowserFetcher ( browserFetcherOptions ) ; 
18+             var  installedBrowser  =  await  browserFetcher . DownloadAsync ( ) ; 
19+             #endregion
20+         } 
21+ 
1222        public  async  Task  Usage ( ) 
1323        { 
1424            #region CustomVersionsExample
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments