How to use Expect method of Microsoft.Playwright.NUnit.PlaywrightTest class

Best Playwright-dotnet code snippet using Microsoft.Playwright.NUnit.PlaywrightTest.Expect

Run Playwright-dotnet automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

PlaywrightTest.cs

Source: PlaywrightTest.cs Github

copy
1/*
2 * MIT License
3 *
4 * Copyright (c) Microsoft Corporation.
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights
9 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 * copies of the Software, and to permit persons to whom the Software is
11 * furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in all
14 * copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 * SOFTWARE.
23 */
24
25using System;
26using System.Threading.Tasks;
27using NUnit.Framework;
28
29namespace Microsoft.Playwright.NUnit
30{
31    public class PlaywrightTest : WorkerAwareTest
32    {
33        public static string BrowserName => (Environment.GetEnvironmentVariable("BROWSER") ?? Microsoft.Playwright.BrowserType.Chromium).ToLower();
34
35        private static readonly Task<IPlaywright> _playwrightTask = Microsoft.Playwright.Playwright.CreateAsync();
36
37        public IPlaywright Playwright { get; private set; }
38        public IBrowserType BrowserType { get; private set; }
39
40        [SetUp]
41        public async Task PlaywrightSetup()
42        {
43            Playwright = await _playwrightTask.ConfigureAwait(false);
44            BrowserType = Playwright[BrowserName];
45            Assert.IsNotNull(BrowserType, $"The requested browser ({BrowserName}) could not be found - make sure your BROWSER env variable is set correctly.");
46        }
47
48        public ILocatorAssertions Expect(ILocator locator) => Assertions.Expect(locator);
49
50        public IPageAssertions Expect(IPage page) => Assertions.Expect(page);
51    }
52}
53
Full Screen

PageAssertionsTests.cs

Source: PageAssertionsTests.cs Github

copy
1/*
2 * MIT License
3 *
4 * Copyright (c) Microsoft Corporation.
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights
9 * to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
10 * copies of the Software, and to permit persons to whom the Software is
11 * furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in all
14 * copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 * SOFTWARE.
23 */
24
25using System.Text.RegularExpressions;
26using System.Threading.Tasks;
27using NUnit.Framework;
28
29namespace Microsoft.Playwright.Tests.Assertions
30{
31    public class PageAssertionsTests : PageTestEx
32    {
33        [PlaywrightTest("playwright-test/playwright.expect.misc.spec.ts", "should support toHaveTitle")]
34        public async Task ShouldSupportToHaveTitleAsync()
35        {
36            await Page.SetContentAsync("<title>  Hello     world</title>");
37            await Expect(Page).ToHaveTitleAsync("Hello  world");
38
39            await Page.SetContentAsync("<title>Bye</title>");
40            var exception = await PlaywrightAssert.ThrowsAsync<PlaywrightException>(() => Expect(Page).ToHaveTitleAsync("Hello", new() { Timeout = 100 }));
41            StringAssert.Contains("Page title expected to be 'Hello'", exception.Message);
42            StringAssert.Contains("But was: 'Bye'", exception.Message);
43            StringAssert.Contains("PageAssertions.ToHaveTitleAsync with timeout 100ms", exception.Message);
44
45            await Page.SetContentAsync("<title>Foo Bar Kek</title>");
46            await Expect(Page).ToHaveTitleAsync(new Regex("^Foo .* Kek$"));
47            await PlaywrightAssert.ThrowsAsync<PlaywrightException>(() => Expect(Page).ToHaveTitleAsync(new Regex("nooo"), new() { Timeout = 100 }));
48
49            await Page.SetContentAsync("<title>Bye</title>");
50            await Expect(Page).Not.ToHaveTitleAsync("Hello");
51        }
52
53        [PlaywrightTest("playwright-test/playwright.expect.misc.spec.ts", "should support toHaveURL")]
54        public async Task ShouldSupportToHaveURLAsync()
55        {
56            await Page.GotoAsync("data:text/html,<div>A</div>");
57            await Expect(Page).ToHaveURLAsync("data:text/html,<div>A</div>");
58
59            await Page.GotoAsync("data:text/html,<div>B</div>");
60            var exception = await PlaywrightAssert.ThrowsAsync<PlaywrightException>(() => Expect(Page).ToHaveURLAsync("wrong", new() { Timeout = 100 }));
61            StringAssert.Contains("Page URL expected to be 'wrong'", exception.Message);
62            StringAssert.Contains("But was: 'data:text/html,<div>B</div>'", exception.Message);
63            StringAssert.Contains("PageAssertions.ToHaveURLAsync with timeout 100ms", exception.Message);
64
65            await Page.GotoAsync(Server.EmptyPage);
66            await Expect(Page).ToHaveURLAsync(new Regex(".*empty.html"));
67            await PlaywrightAssert.ThrowsAsync<PlaywrightException>(() => Expect(Page).ToHaveURLAsync(new Regex("nooo"), new() { Timeout = 100 }));
68
69            await Page.GotoAsync(Server.EmptyPage);
70            await Expect(Page).ToHaveURLAsync(Server.Prefix + "/empty.html");
71            await Expect(Page).Not.ToHaveURLAsync(Server.Prefix + "/foobar.html");
72
73            var page = await Browser.NewPageAsync(new() { BaseURL = Server.Prefix });
74            try
75            {
76                await page.GotoAsync("/empty.html");
77                await Expect(page).ToHaveURLAsync("/empty.html");
78                await Expect(page).Not.ToHaveURLAsync("/kek.html");
79            }
80            finally
81            {
82                await page.CloseAsync();
83            }
84        }
85    }
86}
87
Full Screen

LocatorAssertionsTests.cs

Source: LocatorAssertionsTests.cs Github

copy
1/*
2 * MIT License
3 *
4 * Copyright (c) Microsoft Corporation.
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights
9 * to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
10 * copies of the Software, and to permit persons to whom the Software is
11 * furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in all
14 * copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 * SOFTWARE.
23 */
24
25using System;
26using System.Collections.Generic;
27using System.Text.RegularExpressions;
28using System.Threading.Tasks;
29using NUnit.Framework;
30
31namespace Microsoft.Playwright.Tests.Assertions
32{
33    public class LocatorAssertionsTests : PageTestEx
34    {
35        [PlaywrightTest("playwright-test/playwright.expect.spec.ts", "should support toBeChecked")]
36        public async Task ShouldSupportToBeChecked()
37        {
38            await Page.SetContentAsync("<input type=checkbox checked></input>");
39            await Expect(Page.Locator("input")).ToBeCheckedAsync();
40
41            await Expect(Page.Locator("input")).ToBeCheckedAsync(new() { Checked = true });
42            await Expect(Page.Locator("input")).Not.ToBeCheckedAsync(new() { Checked = false });
43
44            var exception = await PlaywrightAssert.ThrowsAsync<PlaywrightException>(() => Expect(Page.Locator("input")).ToBeCheckedAsync(new() { Checked = false, Timeout = 300 }));
45            StringAssert.Contains("Locator expected not to be checked", exception.Message);
46            StringAssert.Contains("LocatorAssertions.ToBeCheckedAsync with timeout 300ms", exception.Message);
47
48            exception = await PlaywrightAssert.ThrowsAsync<PlaywrightException>(() => Expect(Page.Locator("input")).Not.ToBeCheckedAsync(new() { Timeout = 300 }));
49            StringAssert.Contains("Locator expected not to be checked", exception.Message);
50            StringAssert.Contains("LocatorAssertions.ToBeCheckedAsync with timeout 300ms", exception.Message);
51        }
52
53        [PlaywrightTest("playwright-test/playwright.expect.spec.ts", "should support toBeEditable, toBeEnabled, toBeDisabled, toBeEmpty")]
54        public async Task ShouldSupportToBeEditableToBeEnabledToBeDisabledToBeEmpty()
55        {
56            {
57                await Page.SetContentAsync("<input></input>");
58                await Expect(Page.Locator("input")).ToBeEditableAsync();
59            }
60
61            {
62                await Page.SetContentAsync("<button>Text</button>");
63                await Expect(Page.Locator("button")).ToBeEnabledAsync();
64            }
65
66            {
67                await Page.SetContentAsync("<button disabled>Text</button>");
68                var exception = await PlaywrightAssert.ThrowsAsync<PlaywrightException>(() => Expect(Page.Locator("button")).ToBeEnabledAsync(new() { Timeout = 500 }));
69                StringAssert.Contains("Locator expected to be enabled", exception.Message);
70                StringAssert.Contains("LocatorAssertions.ToBeEnabledAsync with timeout 500ms", exception.Message);
71            }
72
73            {
74                await Page.SetContentAsync("<button disabled>Text</button>");
75                var locator = Page.Locator("button");
76                await locator.EvaluateAsync("e => setTimeout(() => { e.removeAttribute('disabled') }, 500);");
77                await Expect(locator).ToBeEnabledAsync();
78            }
79
80            {
81                await Page.SetContentAsync("<button>Text</button>");
82                var locator = Page.Locator("button");
83                await locator.EvaluateAsync("e => setTimeout(() => { e.setAttribute('disabled', '') }, 500);");
84                await Expect(locator).Not.ToBeEnabledAsync();
85            }
86
87            {
88                await Page.SetContentAsync("<button disabled>Text</button>");
89                var locator = Page.Locator("button");
90                await Expect(locator).ToBeDisabledAsync();
91            }
92
93            {
94                await Page.SetContentAsync("<input></input>");
95                var locator = Page.Locator("input");
96                await Expect(locator).ToBeEmptyAsync();
97            }
98
99            {
100                await Page.SetContentAsync("<input value=text></input>");
101                var locator = Page.Locator("input");
102                await Expect(locator).Not.ToBeEmptyAsync();
103            }
104        }
105
106        [PlaywrightTest("playwright-test/playwright.expect.spec.ts", "should support toBeVisible, toBeHidden")]
107        public async Task ShouldSupportToBeVisibleToBeHidden()
108        {
109            {
110                await Page.SetContentAsync("<input></input>");
111                var locator = Page.Locator("input");
112                await Expect(locator).ToBeVisibleAsync();
113            }
114            {
115                await Page.SetContentAsync("<button style=\"display: none\"></button>");
116                var locator = Page.Locator("button");
117                await Expect(locator).Not.ToBeVisibleAsync();
118            }
119            {
120                await Page.SetContentAsync("<button style=\"display: none\"></button>");
121                var locator = Page.Locator("button");
122                await Expect(locator).ToBeHiddenAsync();
123            }
124            {
125                await Page.SetContentAsync("<div></div>");
126                var locator = Page.Locator("div");
127                await Expect(locator).ToBeHiddenAsync();
128            }
129            {
130                await Page.SetContentAsync("<input></input>");
131                var locator = Page.Locator("input");
132                await Expect(locator).Not.ToBeHiddenAsync();
133            }
134        }
135
136        [PlaywrightTest("playwright-test/playwright.expect.spec.ts", "should support toBeVisible, toBeHidden fail")]
137        public async Task ShouldSupportToBeVisibleToBeHiddenFail()
138        {
139            {
140                await Page.SetContentAsync("<button style=\"display: none\"></button>");
141                var locator = Page.Locator("button");
142                var exception = await PlaywrightAssert.ThrowsAsync<PlaywrightException>(() => Expect(locator).ToBeVisibleAsync(new() { Timeout = 500 }));
143                StringAssert.Contains("Locator expected to be visible", exception.Message);
144                StringAssert.Contains("LocatorAssertions.ToBeVisibleAsync with timeout 500ms", exception.Message);
145            }
146            {
147                await Page.SetContentAsync("<input></input>");
148                var locator = Page.Locator("input");
149                var exception = await PlaywrightAssert.ThrowsAsync<PlaywrightException>(() => Expect(locator).Not.ToBeVisibleAsync(new() { Timeout = 500 }));
150                StringAssert.Contains("Locator expected not to be visible", exception.Message);
151                StringAssert.Contains("LocatorAssertions.ToBeVisibleAsync with timeout 500ms", exception.Message);
152            }
153        }
154
155        [PlaywrightTest("playwright-test/playwright.expect.spec.ts", "should support toBeFocused")]
156        public async Task ShouldSupportToBeFocused()
157        {
158            await Page.SetContentAsync("<input></input>");
159            var locator = Page.Locator("input");
160            await locator.FocusAsync();
161            await Expect(locator).ToBeFocusedAsync();
162        }
163
164        [PlaywrightTest("playwright-test/playwright.expect.spec.ts", "should support toContainText")]
165        public async Task ShouldSupportToContainText()
166        {
167            {
168                await Page.SetContentAsync("<div id=node>Text   content</div>");
169                await Expect(Page.Locator("#node")).ToContainTextAsync(new Regex("ex"));
170                // Should not normalize whitespace.
171                await Expect(Page.Locator("#node")).ToContainTextAsync(new Regex("ext   cont"));
172            }
173            {
174                await Page.SetContentAsync("<div id=node>Text content</div>");
175                var exeption = await PlaywrightAssert.ThrowsAsync<PlaywrightException>(() => Expect(Page.Locator("#node")).ToContainTextAsync(new Regex("ex2"), new() { Timeout = 100 }));
176                StringAssert.Contains("Locator expected text matching regex 'ex2'", exeption.Message);
177                StringAssert.Contains("But was: 'Text content'", exeption.Message);
178                StringAssert.Contains("LocatorAssertions.ToContainTextAsync with timeout 100ms", exeption.Message);
179            }
180            {
181                await Page.SetContentAsync("<div id=node><span></span>Text \ncontent&nbsp;    </div>");
182                var locator = Page.Locator("#node");
183                // Should normalize whitespace.
184                await Expect(locator).ToHaveTextAsync("Text                        content");
185                // Should normalize zero width whitespace.
186                await Expect(locator).ToHaveTextAsync("T\u200be\u200bx\u200bt content");
187                await Expect(locator).ToHaveTextAsync(new Regex("Text\\s+content"));
188            }
189            {
190                await Page.SetContentAsync("<div id=node>Text content</div>");
191                var locator = Page.Locator("#node");
192                await Expect(locator).ToContainTextAsync("Text");
193                // Should normalize whitespace.
194                await Expect(locator).ToContainTextAsync("   ext        cont\n  ");
195            }
196            {
197                await Page.SetContentAsync("<div id=node>Text content</div>");
198                var locator = Page.Locator("#node");
199                var exeption = await PlaywrightAssert.ThrowsAsync<PlaywrightException>(() => Expect(locator).ToHaveTextAsync("Text", new() { Timeout = 100 }));
200                StringAssert.Contains("Locator expected to have text 'Text'", exeption.Message);
201                StringAssert.Contains("But was: 'Text content'", exeption.Message);
202                StringAssert.Contains("LocatorAssertions.ToHaveTextAsync with timeout 100ms", exeption.Message);
203            }
204        }
205
206        [PlaywrightTest("playwright-test/playwright.expect.spec.ts", "should support toContainText w/ array")]
207        public async Task ShouldSupportToContainTextWithArray()
208        {
209            await Page.SetContentAsync("<div>Text \n1</div><div>Text2</div><div>Text3</div>");
210            var locator = Page.Locator("div");
211            await Expect(locator).ToContainTextAsync(new string[] { "ext     1", "ext3" });
212            await Expect(locator).ToContainTextAsync(new Regex[] { new Regex("ext \\s+1"), new Regex("ext3") });
213        }
214
215        [PlaywrightTest("playwright-test/playwright.expect.spec.ts", "should support toHaveText w/ array")]
216        public async Task ShouldSupportToHaveTextWithArray()
217        {
218            await Page.SetContentAsync("<div>Text    \n1</div><div>Text   2a</div>");
219            var locator = Page.Locator("div");
220            // Should normalize whitespace.
221            await Expect(locator).ToHaveTextAsync(new string[] { "Text  1", "Text 2a" });
222            // But not for Regex.
223            await Expect(locator).ToHaveTextAsync(new Regex[] { new Regex("Text \\s+1"), new Regex("Text   \\d+a") });
224        }
225
226        [PlaywrightTest("playwright-test/playwright.expect.spec.ts", "should support toHaveAttribute")]
227        public async Task ShouldSupportToHaveAttribute()
228        {
229            await Page.SetContentAsync("<div id=node>Text content</div>");
230            var locator = Page.Locator("#node");
231            await Expect(locator).ToHaveAttributeAsync("id", "node");
232            await Expect(locator).ToHaveAttributeAsync("id", new Regex("node"));
233        }
234
235        [PlaywrightTest("playwright-test/playwright.expect.spec.ts", "should support toHaveCSS")]
236        public async Task ShouldSupportToHaveCSS()
237        {
238            await Page.SetContentAsync("<div id=node style=\"color: rgb(255, 0, 0)\">Text content</div>");
239            var locator = Page.Locator("#node");
240            await Expect(locator).ToHaveCSSAsync("color", "rgb(255, 0, 0)");
241            await Expect(locator).ToHaveCSSAsync("color", new Regex("rgb\\(\\d+, 0, 0\\)"));
242        }
243
244        [PlaywrightTest("playwright-test/playwright.expect.spec.ts", "should support toHaveClass")]
245        public async Task ShouldSupportToHaveClass()
246        {
247            {
248                await Page.SetContentAsync("<div class=\"foo bar baz\"></div>");
249                var locator = Page.Locator("div");
250                await Expect(locator).ToHaveClassAsync("foo bar baz");
251                await Expect(locator).ToHaveClassAsync(new Regex("foo bar baz"));
252                var exception = await PlaywrightAssert.ThrowsAsync<PlaywrightException>(() => Expect(locator).ToHaveClassAsync("kektus", new() { Timeout = 300 }));
253                StringAssert.Contains("Locator expected to have class 'kektus'", exception.Message);
254                StringAssert.Contains("But was: 'foo bar baz'", exception.Message);
255                StringAssert.Contains("LocatorAssertions.ToHaveClassAsync with timeout 300ms", exception.Message);
256            }
257            {
258                await Page.SetContentAsync("<div class=\"foo\"></div><div class=\"bar\"></div><div class=\"baz\"></div>");
259                var locator = Page.Locator("div");
260                await Expect(locator).ToHaveClassAsync(new string[] { "foo", "bar", "baz" });
261                await Expect(locator).ToHaveClassAsync(new Regex[] { new("^f.o$"), new("^b.r$"), new("^[a-z]az$") });
262            }
263        }
264
265        [PlaywrightTest("playwright-test/playwright.expect.spec.ts", "should support toHaveCount")]
266        public async Task ShouldSupportToHaveCount()
267        {
268            await Page.SetContentAsync("<select><option>One</option></select>");
269            var locator = Page.Locator("option");
270            await PlaywrightAssert.ThrowsAsync<PlaywrightException>(() => Expect(locator).ToHaveCountAsync(2, new() { Timeout = 300 }));
271            await Page.SetContentAsync("<select><option>One</option><option>Two</option></select>");
272            await Expect(locator).ToHaveCountAsync(2);
273        }
274
275        [PlaywrightTest("playwright-test/playwright.expect.spec.ts", "should support toHaveId")]
276        public async Task ShouldSupportToHaveId()
277        {
278            await Page.SetContentAsync("<div id=node>Text content</div>");
279            var locator = Page.Locator("#node");
280            await Expect(locator).ToHaveIdAsync("node");
281            await Expect(locator).ToHaveIdAsync(new Regex("n.de"));
282        }
283
284        [PlaywrightTest("playwright-test/playwright.expect.misc.spec.ts", "should support toHaveJSProperty")]
285        public async Task ShouldSupportToHaveJSProperty()
286        {
287            await Page.SetContentAsync("<div></div>");
288            await Page.EvalOnSelectorAsync("div", "e => e.foo = { a: 1, b: 'string', c: new Date(1627503992000) }");
289            var locator = Page.Locator("div");
290            await Expect(locator).ToHaveJSPropertyAsync("foo", new Dictionary<string, object>
291            {
292                ["a"] = 1,
293                ["b"] = "string",
294                ["c"] = DateTime.Parse("2021-07-28T20:26:32.000Z"),
295            });
296        }
297
298        [PlaywrightTest("playwright-test/playwright.expect.misc.spec.ts", "should support toHaveValue")]
299        public async Task ShouldSupportToHaveValue()
300        {
301            {
302                await Page.SetContentAsync("<input id=node></input>");
303                var locator = Page.Locator("#node");
304                await locator.FillAsync("Text content");
305                await Expect(locator).ToHaveValueAsync("Text content");
306                await Expect(locator).ToHaveValueAsync(new Regex("Text( |)content"));
307            }
308            {
309                await Page.SetContentAsync("<label><input></input></label>");
310                await Page.Locator("label input").FillAsync("Text content");
311                await Expect(Page.Locator("label")).ToHaveValueAsync("Text content");
312            }
313        }
314    }
315}
316
Full Screen

Accelerate Your Automation Test Cycles With LambdaTest

Leverage LambdaTest’s cloud-based platform to execute your automation tests in parallel and trim down your test execution time significantly. Your first 100 automation testing minutes are on us.

Try LambdaTest

Most used method in PlaywrightTest

Trigger Expect code on LambdaTest Cloud Grid

Execute automation tests with Expect on a cloud-based Grid of 3000+ real browsers and operating systems for both web and mobile applications.

Test now for Free
LambdaTestX

We use cookies to give you the best experience. Cookies help to provide a more personalized experience and relevant advertising for you, and web analytics for us. Learn More in our Cookies policy, Privacy & Terms of service

Allow Cookie
Sarah

I hope you find the best code examples for your project.

If you want to accelerate automated browser testing, try LambdaTest. Your first 100 automation testing minutes are FREE.

Sarah Elson (Product & Growth Lead)