-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Dummy
committed
Feb 2, 2019
1 parent
7f93c35
commit 953496f
Showing
14 changed files
with
297 additions
and
204 deletions.
There are no files selected for viewing
9 changes: 5 additions & 4 deletions
9
src/FluffySpoon.Automation.Web.Puppeteer/PuppeteerRegistrationExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
using System; | ||
using System.Threading.Tasks; | ||
using Microsoft.Extensions.DependencyInjection; | ||
using PuppeteerSharp; | ||
|
||
namespace FluffySpoon.Automation.Web.Selenium | ||
{ | ||
public static class PuppeteerRegistrationExtensions | ||
{ | ||
public static void AddSeleniumWebAutomationFrameworkInstance(this ServiceCollection services, Func<IWebDriver> driverConstructor) | ||
public static void AddPuppeteerWebAutomationFrameworkInstance(this ServiceCollection services, Func<Task<Browser>> driverConstructor) | ||
{ | ||
RegistrationExtensions.AddWebAutomationFrameworkInstance(provider => | ||
new SeleniumWebAutomationFrameworkInstance( | ||
provider.GetRequiredService<IDomSelectorStrategy>(), | ||
driverConstructor())); | ||
new PuppeteerWebAutomationFrameworkInstance( | ||
driverConstructor)); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.