-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCheckout.cs
28 lines (24 loc) · 894 Bytes
/
Checkout.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
using Microsoft.Playwright;
namespace PlaywrightTests
{
internal class Checkout: BasePage
{
public async Task<Checkout> FillClientInfo(string firstName = "TestClient", string lastName = "TestClient", string zipCode = "12345")
{
await _page.Locator(Selectors.clientFirstNameInput).FillAsync(firstName);
await _page.Locator(Selectors.clientLastNameInput).FillAsync(lastName);
await _page.Locator(Selectors.clientZipCodeInput).FillAsync(zipCode);
return this;
}
public async Task<Checkout> Continue()
{
await _page.Locator(Selectors.checkoutContinueButton).ClickAsync();
return this;
}
public async Task<Checkout> Finish()
{
await _page.Locator(Selectors.checkoutFinishButton).ClickAsync();
return this;
}
}
}