Skip to content

Commit

Permalink
v1.2 docs (#389)
Browse files Browse the repository at this point in the history
  • Loading branch information
kblok authored Jul 13, 2018
1 parent 409ae3f commit 3065bd7
Showing 1 changed file with 13 additions and 71 deletions.
84 changes: 13 additions & 71 deletions lib/PuppeteerSharp/PuppeteerSharp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<PackOnBuild>true</PackOnBuild>
<PackageVersion>1.1.0</PackageVersion>
<PackageVersion>1.2.0</PackageVersion>
<Authors>Darío Kondratiuk</Authors>
<Owners>Darío Kondratiuk</Owners>
<PackageProjectUrl>https://github.com/kblok/puppeteer-sharp</PackageProjectUrl>
Expand All @@ -13,76 +13,21 @@
<PackageId>PuppeteerSharp</PackageId>
<PackageReleaseNotes>
New Features
* New Chromium version r536395
* Service workers support
* Cache Support
* New WaitFor options
* New BrowserFetcher utility
* Dump IO implementation
* New RequestChain property.
* Chromium updated to r543305.

New APIs

* Page.SetCacheEnabledAsync
* Page.DOMContentLoaded
* Page.WaitForXPathAsync
* ResponseData.FromServiceWorker
* ExecutionContext.Frame
* Frame.EvaluateExpressionHandleAsync
* Frame.EvaluateFunctionHandleAsync
* Frame.WaitForSelectorAsync
* Frame.WaitForXPathAsync
* Frame.WaitForSelectorOrXPathAsync

Breaking Changes

Downloader changes

The Downloader class was renamed to BrowserFetcher. BrowserFetcher has the following API:

* DefaultRevision
* DownloadsFolder
* DownloadHost
* Platform
* DownloadProgressChanged
* CanDownloadAsync(int revision)
* LocalRevisions()
* Remove(int revision)
* RevisionInfo(int revision)
* DownloadAsync(int revision)
* GetExecutablePath(int revision)
* GetExecutablePath(Platform platform, string folderPath)

If you were using Downloader like this:

await Downloader.CreateDefault().DownloadRevisionAsync(chromiumRevision);

It should be changed to :

await new BrowserFetcher().DownloadAsync(BrowserFetcher.DefaultRevision);


Puppeteer.LaunchAsync breaking change

In order to simplify the API, the revision argument was removed from the `LaunchAsync` method. So this piece of code:

Puppeteer.LaunchAsync(launcherOptions, Downloader.DefaultRevision);


Should be changed to:

Puppeteer.LaunchAsync(launcherOptions);


If you need to launch Puppeteer using another revision you should handle that using the `ExecutablePath` option:

var myRevisionInfo = await new BrowserFetcher().DownloadAsync(myRevision);
var browser = Puppeteer.LaunchAsync(new LaunchOptions
{
Headless = true,
ExecutablePath = myRevisionInfo.ExecutablePath
});
* Request.RedirectChain.
* ElementHandle.ContentFrameAsync.
* AddTagOptions.Type. Allowing the user to declare script tags (using Page.AddScriptTagAsync) as modules.

Changes
* Response.Ok() returns true for local files.
* Target.TargetType is now an enum.
* NavigationException Improvements.
* PaperFormat Height and Width now are public.
</PackageReleaseNotes>
<ReleaseVersion>1.1.0</ReleaseVersion>
<ReleaseVersion>1.2.0</ReleaseVersion>
<SynchReleaseVersion>false</SynchReleaseVersion>
</PropertyGroup>
<PropertyGroup>
Expand All @@ -97,7 +42,4 @@ var browser = Puppeteer.LaunchAsync(new LaunchOptions
<PackageReference Include="System.Net.Http" Version="4.3.3" />
<PackageReference Include="Microsoft.AspNetCore.WebUtilities" Version="2.0.2" />
</ItemGroup>
<ItemGroup>
<Compile Remove="FrameInfo.cs" />
</ItemGroup>
</Project>

0 comments on commit 3065bd7

Please sign in to comment.