internal/misc/Microsoft.Playwright.xml
<?xml version="1.0"?>
<doc> <assembly> <name>Microsoft.Playwright</name> </assembly> <members> <member name="T:Microsoft.Playwright.IAccessibility"> <summary> <para> **DEPRECATED** This class is deprecated. Please use other libraries such as <a href="https://www.deque.com/axe/">Axe</a> if you need to test page accessibility. See our Node.js <a href="https://playwright.dev/docs/accessibility-testing">guide</a> for integration with Axe. </para> <para> The Accessibility class provides methods for inspecting Chromium's accessibility tree. The accessibility tree is used by assistive technology such as <a href="https://en.wikipedia.org/wiki/Screen_reader">screen readers</a> or <a href="https://en.wikipedia.org/wiki/Switch_access">switches</a>. </para> <para> Accessibility is a very platform-specific thing. On different platforms, there are different screen readers that might have wildly different output. </para> <para> Rendering engines of Chromium, Firefox and WebKit have a concept of "accessibility tree", which is then translated into different platform-specific APIs. Accessibility namespace gives access to this Accessibility Tree. </para> <para> Most of the accessibility tree gets filtered out when converting from internal browser AX Tree to Platform-specific AX-Tree or by assistive technologies themselves. By default, Playwright tries to approximate this filtering, exposing only the "interesting" nodes of the tree. </para> </summary> </member> <member name="M:Microsoft.Playwright.IAccessibility.SnapshotAsync(Microsoft.Playwright.AccessibilitySnapshotOptions)"> <summary> <para> **DEPRECATED** This method is deprecated. Please use other libraries such as <a href="https://www.deque.com/axe/">Axe</a> if you need to test page accessibility. See our Node.js <a href="https://playwright.dev/docs/accessibility-testing">guide</a> for integration with Axe. </para> <para> Captures the current state of the accessibility tree. The returned object represents the root accessible node of the page. </para> <para> The Chromium accessibility tree contains nodes that go unused on most platforms and by most screen readers. Playwright will discard them as well for an easier to process tree, unless <see cref="M:Microsoft.Playwright.IAccessibility.SnapshotAsync(Microsoft.Playwright.AccessibilitySnapshotOptions)"/> is set to <c>false</c>. </para> <para>**Usage**</para> <para>An example of dumping the entire accessibility tree:</para> <code> var accessibilitySnapshot = await page.Accessibility.SnapshotAsync();<br/> Console.WriteLine(System.Text.Json.JsonSerializer.Serialize(accessibilitySnapshot)); </code> <para>An example of logging the focused node's name:</para> <code> var accessibilitySnapshot = await page.Accessibility.SnapshotAsync();<br/> Console.WriteLine(System.Text.Json.JsonSerializer.Serialize(accessibilitySnapshot)); </code> </summary> <remarks> <para> The Chromium accessibility tree contains nodes that go unused on most platforms and by most screen readers. Playwright will discard them as well for an easier to process tree, unless <see cref="M:Microsoft.Playwright.IAccessibility.SnapshotAsync(Microsoft.Playwright.AccessibilitySnapshotOptions)"/> is set to <c>false</c>. </para> </remarks> <param name="options">Call options</param> </member> <member name="T:Microsoft.Playwright.IAPIRequest"> <summary> <para> Exposes API that can be used for the Web API testing. This class is used for creating <see cref="T:Microsoft.Playwright.IAPIRequestContext"/> instance which in turn can be used for sending web requests. An instance of this class can be obtained via <see cref="P:Microsoft.Playwright.IPlaywright.APIRequest"/>. For more information see <see cref="T:Microsoft.Playwright.IAPIRequestContext"/>. </para> </summary> </member> <member name="M:Microsoft.Playwright.IAPIRequest.NewContextAsync(Microsoft.Playwright.APIRequestNewContextOptions)"> <summary><para>Creates new instances of <see cref="T:Microsoft.Playwright.IAPIRequestContext"/>.</para></summary> <param name="options">Call options</param> </member> <member name="T:Microsoft.Playwright.IAPIRequestContext"> <summary> <para> This API is used for the Web API testing. You can use it to trigger API endpoints, configure micro-services, prepare environment or the service to your e2e test. </para> <para> Each Playwright browser context has associated with it <see cref="T:Microsoft.Playwright.IAPIRequestContext"/> instance which shares cookie storage with the browser context and can be accessed via <see cref="P:Microsoft.Playwright.IBrowserContext.APIRequest"/> or <see cref="P:Microsoft.Playwright.IPage.APIRequest"/>. It is also possible to create a new APIRequestContext instance manually by calling <see cref="M:Microsoft.Playwright.IAPIRequest.NewContextAsync(Microsoft.Playwright.APIRequestNewContextOptions)"/>. </para> <para>**Cookie management**</para> <para> <see cref="T:Microsoft.Playwright.IAPIRequestContext"/> returned by <see cref="P:Microsoft.Playwright.IBrowserContext.APIRequest"/> and <see cref="P:Microsoft.Playwright.IPage.APIRequest"/> shares cookie storage with the corresponding <see cref="T:Microsoft.Playwright.IBrowserContext"/>. Each API request will have <c>Cookie</c> header populated with the values from the browser context. If the API response contains <c>Set-Cookie</c> header it will automatically update <see cref="T:Microsoft.Playwright.IBrowserContext"/> cookies and requests made from the page will pick them up. This means that if you log in using this API, your e2e test will be logged in and vice versa. </para> <para> If you want API requests to not interfere with the browser cookies you should create a new <see cref="T:Microsoft.Playwright.IAPIRequestContext"/> by calling <see cref="M:Microsoft.Playwright.IAPIRequest.NewContextAsync(Microsoft.Playwright.APIRequestNewContextOptions)"/>. Such <c>APIRequestContext</c> object will have its own isolated cookie storage. </para> </summary> </member> <member name="M:Microsoft.Playwright.IAPIRequestContext.CreateFormData"> <summary> <para> Creates a new <see cref="T:Microsoft.Playwright.IFormData"/> instance which is used for providing form and multipart data when making HTTP requests. </para> </summary> </member> <member name="M:Microsoft.Playwright.IAPIRequestContext.DeleteAsync(System.String,Microsoft.Playwright.APIRequestContextOptions)"> <summary> <para> Sends HTTP(S) <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/DELETE">DELETE</a> request and returns its response. The method will populate request cookies from the context and update context cookies from the response. The method will automatically follow redirects. </para> </summary> <param name="url">Target URL.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IAPIRequestContext.FetchAsync(System.String,Microsoft.Playwright.APIRequestContextOptions)"> <summary> <para> Sends HTTP(S) request and returns its response. The method will populate request cookies from the context and update context cookies from the response. The method will automatically follow redirects. </para> <para>**Usage**</para> <para>JSON objects can be passed directly to the request:</para> <code> var data = new Dictionary<string, object>() {<br/> { "title", "Book Title" },<br/> { "body", "John Doe" }<br/> };<br/> await Request.FetchAsync("https://example.com/api/createBook", new() { Method = "post", DataObject = data }); </code> <para> The common way to send file(s) in the body of a request is to upload them as form fields with <c>multipart/form-data</c> encoding, by specifiying the <c>multipart</c> parameter: </para> <code> var file = new FilePayload()<br/> {<br/> Name = "f.js",<br/> MimeType = "text/javascript",<br/> Buffer = System.Text.Encoding.UTF8.GetBytes("console.log(2022);")<br/> };<br/> var multipart = Context.APIRequest.CreateFormData();<br/> multipart.Set("fileField", file);<br/> await Request.FetchAsync("https://example.com/api/uploadScript", new() { Method = "post", Multipart = multipart }); </code> </summary> <param name="urlOrRequest">Target URL or Request to get all parameters from.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IAPIRequestContext.FetchAsync(Microsoft.Playwright.IRequest,Microsoft.Playwright.APIRequestContextOptions)"> <summary> <para> Sends HTTP(S) request and returns its response. The method will populate request cookies from the context and update context cookies from the response. The method will automatically follow redirects. </para> <para>**Usage**</para> <para>JSON objects can be passed directly to the request:</para> <code> var data = new Dictionary<string, object>() {<br/> { "title", "Book Title" },<br/> { "body", "John Doe" }<br/> };<br/> await Request.FetchAsync("https://example.com/api/createBook", new() { Method = "post", DataObject = data }); </code> <para> The common way to send file(s) in the body of a request is to upload them as form fields with <c>multipart/form-data</c> encoding, by specifiying the <c>multipart</c> parameter: </para> <code> var file = new FilePayload()<br/> {<br/> Name = "f.js",<br/> MimeType = "text/javascript",<br/> Buffer = System.Text.Encoding.UTF8.GetBytes("console.log(2022);")<br/> };<br/> var multipart = Context.APIRequest.CreateFormData();<br/> multipart.Set("fileField", file);<br/> await Request.FetchAsync("https://example.com/api/uploadScript", new() { Method = "post", Multipart = multipart }); </code> </summary> <param name="urlOrRequest">Target URL or Request to get all parameters from.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IAPIRequestContext.GetAsync(System.String,Microsoft.Playwright.APIRequestContextOptions)"> <summary> <para> Sends HTTP(S) <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/GET">GET</a> request and returns its response. The method will populate request cookies from the context and update context cookies from the response. The method will automatically follow redirects. </para> <para>**Usage**</para> <para> Request parameters can be configured with <c>params</c> option, they will be serialized into the URL search parameters: </para> <code> var queryParams = new Dictionary<string, object>()<br/> {<br/> { "isbn", "1234" },<br/> { "page", 23 },<br/> };<br/> await request.GetAsync("https://example.com/api/getText", new() { Params = queryParams }); </code> </summary> <param name="url">Target URL.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IAPIRequestContext.HeadAsync(System.String,Microsoft.Playwright.APIRequestContextOptions)"> <summary> <para> Sends HTTP(S) <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/HEAD">HEAD</a> request and returns its response. The method will populate request cookies from the context and update context cookies from the response. The method will automatically follow redirects. </para> </summary> <param name="url">Target URL.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IAPIRequestContext.PatchAsync(System.String,Microsoft.Playwright.APIRequestContextOptions)"> <summary> <para> Sends HTTP(S) <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/PATCH">PATCH</a> request and returns its response. The method will populate request cookies from the context and update context cookies from the response. The method will automatically follow redirects. </para> </summary> <param name="url">Target URL.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IAPIRequestContext.PostAsync(System.String,Microsoft.Playwright.APIRequestContextOptions)"> <summary> <para> Sends HTTP(S) <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST">POST</a> request and returns its response. The method will populate request cookies from the context and update context cookies from the response. The method will automatically follow redirects. </para> <para>**Usage**</para> <para>JSON objects can be passed directly to the request:</para> <code> var data = new Dictionary<string, object>() {<br/> { "firstName", "John" },<br/> { "lastName", "Doe" }<br/> };<br/> await request.PostAsync("https://example.com/api/createBook", new() { DataObject = data }); </code> <para> To send form data to the server use <c>form</c> option. Its value will be encoded into the request body with <c>application/x-www-form-urlencoded</c> encoding (see below how to use <c>multipart/form-data</c> form encoding to send files): </para> <code> var formData = Context.APIRequest.CreateFormData();<br/> formData.Set("title", "Book Title");<br/> formData.Set("body", "John Doe");<br/> await request.PostAsync("https://example.com/api/findBook", new() { Form = formData }); </code> <para> The common way to send file(s) in the body of a request is to upload them as form fields with <c>multipart/form-data</c> encoding. Use <see cref="T:Microsoft.Playwright.IFormData"/> to construct request body and pass it to the request as <c>multipart</c> parameter: </para> <code> var file = new FilePayload()<br/> {<br/> Name = "f.js",<br/> MimeType = "text/javascript",<br/> Buffer = System.Text.Encoding.UTF8.GetBytes("console.log(2022);")<br/> };<br/> var multipart = Context.APIRequest.CreateFormData();<br/> multipart.Set("fileField", file);<br/> await request.PostAsync("https://example.com/api/uploadScript", new() { Multipart = multipart }); </code> </summary> <param name="url">Target URL.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IAPIRequestContext.PutAsync(System.String,Microsoft.Playwright.APIRequestContextOptions)"> <summary> <para> Sends HTTP(S) <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/PUT">PUT</a> request and returns its response. The method will populate request cookies from the context and update context cookies from the response. The method will automatically follow redirects. </para> </summary> <param name="url">Target URL.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IAPIRequestContext.StorageStateAsync(Microsoft.Playwright.APIRequestContextStorageStateOptions)"> <summary> <para> Returns storage state for this request context, contains current cookies and local storage snapshot if it was passed to the constructor. </para> </summary> <param name="options">Call options</param> </member> <member name="T:Microsoft.Playwright.IAPIResponse"> <summary> <para> <see cref="T:Microsoft.Playwright.IAPIResponse"/> class represents responses returned by <see cref="M:Microsoft.Playwright.IAPIRequestContext.GetAsync(System.String,Microsoft.Playwright.APIRequestContextOptions)"/> and similar methods. </para> </summary> </member> <member name="M:Microsoft.Playwright.IAPIResponse.BodyAsync"> <summary><para>Returns the buffer with response body.</para></summary> </member> <member name="P:Microsoft.Playwright.IAPIResponse.Headers"> <summary><para>An object with all the response HTTP headers associated with this response.</para></summary> </member> <member name="P:Microsoft.Playwright.IAPIResponse.HeadersArray"> <summary> <para> An array with all the response HTTP headers associated with this response. Header names are not lower-cased. Headers with multiple entries, such as <c>Set-Cookie</c>, appear in the array multiple times. </para> </summary> </member> <member name="M:Microsoft.Playwright.IAPIResponse.JsonAsync"> <summary> <para>Returns the JSON representation of response body.</para> <para>This method will throw if the response body is not parsable via <c>JSON.parse</c>.</para> </summary> </member> <member name="P:Microsoft.Playwright.IAPIResponse.Ok"> <summary> <para> Contains a boolean stating whether the response was successful (status in the range 200-299) or not. </para> </summary> </member> <member name="P:Microsoft.Playwright.IAPIResponse.Status"> <summary><para>Contains the status code of the response (e.g., 200 for a success).</para></summary> </member> <member name="P:Microsoft.Playwright.IAPIResponse.StatusText"> <summary><para>Contains the status text of the response (e.g. usually an "OK" for a success).</para></summary> </member> <member name="M:Microsoft.Playwright.IAPIResponse.TextAsync"> <summary><para>Returns the text representation of response body.</para></summary> </member> <member name="P:Microsoft.Playwright.IAPIResponse.Url"> <summary><para>Contains the URL of the response.</para></summary> </member> <member name="T:Microsoft.Playwright.IAPIResponseAssertions"> <summary> <para> The <see cref="T:Microsoft.Playwright.IAPIResponseAssertions"/> class provides assertion methods that can be used to make assertions about the <see cref="T:Microsoft.Playwright.IAPIResponse"/> in the tests. </para> </summary> </member> <member name="P:Microsoft.Playwright.IAPIResponseAssertions.Not"> <summary> <para> Makes the assertion check for the opposite condition. For example, this code tests that the response status is not successful: </para> </summary> </member> <member name="M:Microsoft.Playwright.IAPIResponseAssertions.ToBeOKAsync"> <summary> <para>Ensures the response status code is within <c>200..299</c> range.</para> <para>**Usage**</para> </summary> </member> <member name="T:Microsoft.Playwright.IBrowser"> <summary> <para> A Browser is created via <see cref="M:Microsoft.Playwright.IBrowserType.LaunchAsync(Microsoft.Playwright.BrowserTypeLaunchOptions)"/>. An example of using a <see cref="T:Microsoft.Playwright.IBrowser"/> to create a <see cref="T:Microsoft.Playwright.IPage"/>: </para> <code> using Microsoft.Playwright;<br/> <br/> using var playwright = await Playwright.CreateAsync();<br/> var firefox = playwright.Firefox;<br/> var browser = await firefox.LaunchAsync(new() { Headless = false });<br/> var page = await browser.NewPageAsync();<br/> await page.GotoAsync("https://www.bing.com");<br/> await browser.CloseAsync(); </code> </summary> </member> <member name="E:Microsoft.Playwright.IBrowser.Disconnected"> <summary> <para> Emitted when Browser gets disconnected from the browser application. This might happen because of one of the following: </para> <list type="bullet"> <item><description>Browser application is closed or crashed.</description></item> <item><description>The <see cref="M:Microsoft.Playwright.IBrowser.CloseAsync(Microsoft.Playwright.BrowserCloseOptions)"/> method was called.</description></item> </list> </summary> </member> <member name="P:Microsoft.Playwright.IBrowser.BrowserType"> <summary><para>Get the browser type (chromium, firefox or webkit) that the browser belongs to.</para></summary> </member> <member name="M:Microsoft.Playwright.IBrowser.CloseAsync(Microsoft.Playwright.BrowserCloseOptions)"> <summary> <para> In case this browser is obtained using <see cref="M:Microsoft.Playwright.IBrowserType.LaunchAsync(Microsoft.Playwright.BrowserTypeLaunchOptions)"/>, closes the browser and all of its pages (if any were opened). </para> <para> In case this browser is connected to, clears all created contexts belonging to this browser and disconnects from the browser server. </para> <para> This is similar to force-quitting the browser. To close pages gracefully and ensure you receive page close events, call <see cref="M:Microsoft.Playwright.IBrowserContext.CloseAsync(Microsoft.Playwright.BrowserContextCloseOptions)"/> on any <see cref="T:Microsoft.Playwright.IBrowserContext"/> instances you explicitly created earlier using <see cref="M:Microsoft.Playwright.IBrowser.NewContextAsync(Microsoft.Playwright.BrowserNewContextOptions)"/> **before** calling <see cref="M:Microsoft.Playwright.IBrowser.CloseAsync(Microsoft.Playwright.BrowserCloseOptions)"/>. </para> <para> The <see cref="T:Microsoft.Playwright.IBrowser"/> object itself is considered to be disposed and cannot be used anymore. </para> </summary> <remarks> <para> This is similar to force-quitting the browser. To close pages gracefully and ensure you receive page close events, call <see cref="M:Microsoft.Playwright.IBrowserContext.CloseAsync(Microsoft.Playwright.BrowserContextCloseOptions)"/> on any <see cref="T:Microsoft.Playwright.IBrowserContext"/> instances you explicitly created earlier using <see cref="M:Microsoft.Playwright.IBrowser.NewContextAsync(Microsoft.Playwright.BrowserNewContextOptions)"/> **before** calling <see cref="M:Microsoft.Playwright.IBrowser.CloseAsync(Microsoft.Playwright.BrowserCloseOptions)"/>. </para> </remarks> <param name="options">Call options</param> </member> <member name="P:Microsoft.Playwright.IBrowser.Contexts"> <summary> <para> Returns an array of all open browser contexts. In a newly created browser, this will return zero browser contexts. </para> <para>**Usage**</para> <code> using var playwright = await Playwright.CreateAsync();<br/> var browser = await playwright.Webkit.LaunchAsync();<br/> System.Console.WriteLine(browser.Contexts.Count); // prints "0"<br/> var context = await browser.NewContextAsync();<br/> System.Console.WriteLine(browser.Contexts.Count); // prints "1" </code> </summary> </member> <member name="P:Microsoft.Playwright.IBrowser.IsConnected"> <summary><para>Indicates that the browser is connected.</para></summary> </member> <member name="M:Microsoft.Playwright.IBrowser.NewBrowserCDPSessionAsync"> <summary> <para>CDP Sessions are only supported on Chromium-based browsers.</para> <para>Returns the newly created browser session.</para> </summary> <remarks><para>CDP Sessions are only supported on Chromium-based browsers.</para></remarks> </member> <member name="M:Microsoft.Playwright.IBrowser.NewContextAsync(Microsoft.Playwright.BrowserNewContextOptions)"> <summary> <para>Creates a new browser context. It won't share cookies/cache with other browser contexts.</para> <para> If directly using this method to create <see cref="T:Microsoft.Playwright.IBrowserContext"/>s, it is best practice to explicitly close the returned context via <see cref="M:Microsoft.Playwright.IBrowserContext.CloseAsync(Microsoft.Playwright.BrowserContextCloseOptions)"/> when your code is done with the <see cref="T:Microsoft.Playwright.IBrowserContext"/>, and before calling <see cref="M:Microsoft.Playwright.IBrowser.CloseAsync(Microsoft.Playwright.BrowserCloseOptions)"/>. This will ensure the <c>context</c> is closed gracefully and any artifacts—like HARs and videos—are fully flushed and saved. </para> <para>**Usage**</para> <code> using var playwright = await Playwright.CreateAsync();<br/> var browser = await playwright.Firefox.LaunchAsync();<br/> // Create a new incognito browser context.<br/> var context = await browser.NewContextAsync();<br/> // Create a new page in a pristine context.<br/> var page = await context.NewPageAsync(); ;<br/> await page.GotoAsync("https://www.bing.com");<br/> <br/> // Gracefully close up everything<br/> await context.CloseAsync();<br/> await browser.CloseAsync(); </code> </summary> <remarks> <para> If directly using this method to create <see cref="T:Microsoft.Playwright.IBrowserContext"/>s, it is best practice to explicitly close the returned context via <see cref="M:Microsoft.Playwright.IBrowserContext.CloseAsync(Microsoft.Playwright.BrowserContextCloseOptions)"/> when your code is done with the <see cref="T:Microsoft.Playwright.IBrowserContext"/>, and before calling <see cref="M:Microsoft.Playwright.IBrowser.CloseAsync(Microsoft.Playwright.BrowserCloseOptions)"/>. This will ensure the <c>context</c> is closed gracefully and any artifacts—like HARs and videos—are fully flushed and saved. </para> </remarks> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IBrowser.NewPageAsync(Microsoft.Playwright.BrowserNewPageOptions)"> <summary> <para> Creates a new page in a new browser context. Closing this page will close the context as well. </para> <para> This is a convenience API that should only be used for the single-page scenarios and short snippets. Production code and testing frameworks should explicitly create <see cref="M:Microsoft.Playwright.IBrowser.NewContextAsync(Microsoft.Playwright.BrowserNewContextOptions)"/> followed by the <see cref="M:Microsoft.Playwright.IBrowserContext.NewPageAsync"/> to control their exact life times. </para> </summary> <param name="options">Call options</param> </member> <member name="P:Microsoft.Playwright.IBrowser.Version"> <summary><para>Returns the browser version.</para></summary> </member> <member name="T:Microsoft.Playwright.IBrowserContext"> <summary> <para>BrowserContexts provide a way to operate multiple independent browser sessions.</para> <para> If a page opens another page, e.g. with a <c>window.open</c> call, the popup will belong to the parent page's browser context. </para> <para> Playwright allows creating isolated non-persistent browser contexts with <see cref="M:Microsoft.Playwright.IBrowser.NewContextAsync(Microsoft.Playwright.BrowserNewContextOptions)"/> method. Non-persistent browser contexts don't write any browsing data to disk. </para> <code> using var playwright = await Playwright.CreateAsync();<br/> var browser = await playwright.Firefox.LaunchAsync(new() { Headless = false });<br/> // Create a new incognito browser context<br/> var context = await browser.NewContextAsync();<br/> // Create a new page inside context.<br/> var page = await context.NewPageAsync();<br/> await page.GotoAsync("https://bing.com");<br/> // Dispose context once it is no longer needed.<br/> await context.CloseAsync(); </code> </summary> <summary> <para>BrowserContexts provide a way to operate multiple independent browser sessions.</para> <para> If a page opens another page, e.g. with a <c>window.open</c> call, the popup will belong to the parent page's browser context. </para> <para> Playwright allows creation of "incognito" browser contexts with <c>browser.newContext()</c> method. "Incognito" browser contexts don't write any browsing data to disk. </para> </summary> </member> <member name="E:Microsoft.Playwright.IBrowserContext.BackgroundPage"> <summary> <para>Only works with Chromium browser's persistent context.</para> <para>Emitted when new background page is created in the context.</para> <code> context.BackgroundPage += (_, backgroundPage) =><br/> {<br/> Console.WriteLine(backgroundPage.Url);<br/> };<br/> </code> </summary> <remarks><para>Only works with Chromium browser's persistent context.</para></remarks> </member> <member name="P:Microsoft.Playwright.IBrowserContext.Clock"> <summary><para>Playwright has ability to mock clock and passage of time.</para></summary> </member> <member name="E:Microsoft.Playwright.IBrowserContext.Close"> <summary> <para> Emitted when Browser context gets closed. This might happen because of one of the following: </para> <list type="bullet"> <item><description>Browser context is closed.</description></item> <item><description>Browser application is closed or crashed.</description></item> <item><description>The <see cref="M:Microsoft.Playwright.IBrowser.CloseAsync(Microsoft.Playwright.BrowserCloseOptions)"/> method was called.</description></item> </list> </summary> </member> <member name="E:Microsoft.Playwright.IBrowserContext.Console"> <summary> <para> Emitted when JavaScript within the page calls one of console API methods, e.g. <c>console.log</c> or <c>console.dir</c>. </para> <para> The arguments passed into <c>console.log</c> and the page are available on the <see cref="T:Microsoft.Playwright.IConsoleMessage"/> event handler argument. </para> <para>**Usage**</para> <code> context.Console += async (_, msg) =><br/> {<br/> foreach (var arg in msg.Args)<br/> Console.WriteLine(await arg.JsonValueAsync<object>());<br/> };<br/> <br/> await page.EvaluateAsync("console.log('hello', 5, { foo: 'bar' })"); </code> </summary> </member> <member name="E:Microsoft.Playwright.IBrowserContext.Dialog"> <summary> <para> Emitted when a JavaScript dialog appears, such as <c>alert</c>, <c>prompt</c>, <c>confirm</c> or <c>beforeunload</c>. Listener **must** either <see cref="M:Microsoft.Playwright.IDialog.AcceptAsync(System.String)"/> or <see cref="M:Microsoft.Playwright.IDialog.DismissAsync"/> the dialog - otherwise the page will <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/EventLoop#never_blocking">freeze</a> waiting for the dialog, and actions like click will never finish. </para> <para>**Usage**</para> <code> Context.Dialog += async (_, dialog) =><br/> {<br/> await dialog.AcceptAsync();<br/> }; </code> <para> When no <see cref="E:Microsoft.Playwright.IPage.Dialog"/> or <see cref="E:Microsoft.Playwright.IBrowserContext.Dialog"/> listeners are present, all dialogs are automatically dismissed. </para> </summary> <remarks> <para> When no <see cref="E:Microsoft.Playwright.IPage.Dialog"/> or <see cref="E:Microsoft.Playwright.IBrowserContext.Dialog"/> listeners are present, all dialogs are automatically dismissed. </para> </remarks> </member> <member name="E:Microsoft.Playwright.IBrowserContext.Page"> <summary> <para> The event is emitted when a new Page is created in the BrowserContext. The page may still be loading. The event will also fire for popup pages. See also <see cref="E:Microsoft.Playwright.IPage.Popup"/> to receive events about popups relevant to a specific page. </para> <para> The earliest moment that page is available is when it has navigated to the initial url. For example, when opening a popup with <c>window.open('http://example.com')</c>, this event will fire when the network request to "http://example.com" is done and its response has started loading in the popup. If you would like to route/listen to this network request, use <see cref="M:Microsoft.Playwright.IBrowserContext.RouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.BrowserContextRouteOptions)"/> and <see cref="E:Microsoft.Playwright.IBrowserContext.Request"/> respectively instead of similar methods on the <see cref="T:Microsoft.Playwright.IPage"/>. </para> <code> var popup = await context.RunAndWaitForPageAsync(async =><br/> {<br/> await page.GetByText("open new page").ClickAsync();<br/> });<br/> Console.WriteLine(await popup.EvaluateAsync<string>("location.href")); </code> <para> Use <see cref="M:Microsoft.Playwright.IPage.WaitForLoadStateAsync(System.Nullable{Microsoft.Playwright.LoadState},Microsoft.Playwright.PageWaitForLoadStateOptions)"/> to wait until the page gets to a particular state (you should not need it in most cases). </para> </summary> <remarks> <para> Use <see cref="M:Microsoft.Playwright.IPage.WaitForLoadStateAsync(System.Nullable{Microsoft.Playwright.LoadState},Microsoft.Playwright.PageWaitForLoadStateOptions)"/> to wait until the page gets to a particular state (you should not need it in most cases). </para> </remarks> </member> <member name="E:Microsoft.Playwright.IBrowserContext.WebError"> <summary> <para> Emitted when exception is unhandled in any of the pages in this context. To listen for errors from a particular page, use <see cref="E:Microsoft.Playwright.IPage.PageError"/> instead. </para> </summary> </member> <member name="E:Microsoft.Playwright.IBrowserContext.Request"> <summary> <para> Emitted when a request is issued from any pages created through this context. The <see cref="!:request"/> object is read-only. To only listen for requests from a particular page, use <see cref="E:Microsoft.Playwright.IPage.Request"/>. </para> <para> In order to intercept and mutate requests, see <see cref="M:Microsoft.Playwright.IBrowserContext.RouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.BrowserContextRouteOptions)"/> or <see cref="M:Microsoft.Playwright.IPage.RouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.PageRouteOptions)"/>. </para> </summary> </member> <member name="E:Microsoft.Playwright.IBrowserContext.RequestFailed"> <summary> <para> Emitted when a request fails, for example by timing out. To only listen for failed requests from a particular page, use <see cref="E:Microsoft.Playwright.IPage.RequestFailed"/>. </para> <para> HTTP Error responses, such as 404 or 503, are still successful responses from HTTP standpoint, so request will complete with <see cref="E:Microsoft.Playwright.IBrowserContext.RequestFinished"/> event and not with <see cref="E:Microsoft.Playwright.IBrowserContext.RequestFailed"/>. </para> </summary> <remarks> <para> HTTP Error responses, such as 404 or 503, are still successful responses from HTTP standpoint, so request will complete with <see cref="E:Microsoft.Playwright.IBrowserContext.RequestFinished"/> event and not with <see cref="E:Microsoft.Playwright.IBrowserContext.RequestFailed"/>. </para> </remarks> </member> <member name="E:Microsoft.Playwright.IBrowserContext.RequestFinished"> <summary> <para> Emitted when a request finishes successfully after downloading the response body. For a successful response, the sequence of events is <c>request</c>, <c>response</c> and <c>requestfinished</c>. To listen for successful requests from a particular page, use <see cref="E:Microsoft.Playwright.IPage.RequestFinished"/>. </para> </summary> </member> <member name="E:Microsoft.Playwright.IBrowserContext.Response"> <summary> <para> Emitted when <see cref="!:response"/> status and headers are received for a request. For a successful response, the sequence of events is <c>request</c>, <c>response</c> and <c>requestfinished</c>. To listen for response events from a particular page, use <see cref="E:Microsoft.Playwright.IPage.Response"/>. </para> </summary> </member> <member name="M:Microsoft.Playwright.IBrowserContext.AddCookiesAsync(System.Collections.Generic.IEnumerable{Microsoft.Playwright.Cookie})"> <summary> <para> Adds cookies into this browser context. All pages within this context will have these cookies installed. Cookies can be obtained via <see cref="M:Microsoft.Playwright.IBrowserContext.CookiesAsync(System.String)"/>. </para> <para>**Usage**</para> <code>await context.AddCookiesAsync(new[] { cookie1, cookie2 });</code> </summary> <param name="cookies"> </param> </member> <member name="M:Microsoft.Playwright.IBrowserContext.AddInitScriptAsync(System.String,System.String)"> <summary> <para>Adds a script which would be evaluated in one of the following scenarios:</para> <list type="bullet"> <item><description>Whenever a page is created in the browser context or is navigated.</description></item> <item><description> Whenever a child frame is attached or navigated in any page in the browser context. In this case, the script is evaluated in the context of the newly attached frame. </description></item> </list> <para> The script is evaluated after the document was created but before any of its scripts were run. This is useful to amend the JavaScript environment, e.g. to seed <c>Math.random</c>. </para> <para>**Usage**</para> <para>An example of overriding <c>Math.random</c> before the page loads:</para> <code>await Context.AddInitScriptAsync(scriptPath: "preload.js");</code> <para> The order of evaluation of multiple scripts installed via <see cref="M:Microsoft.Playwright.IBrowserContext.AddInitScriptAsync(System.String,System.String)"/> and <see cref="M:Microsoft.Playwright.IPage.AddInitScriptAsync(System.String,System.String)"/> is not defined. </para> </summary> <remarks> <para> The order of evaluation of multiple scripts installed via <see cref="M:Microsoft.Playwright.IBrowserContext.AddInitScriptAsync(System.String,System.String)"/> and <see cref="M:Microsoft.Playwright.IPage.AddInitScriptAsync(System.String,System.String)"/> is not defined. </para> </remarks> <param name="script">Script to be evaluated in all pages in the browser context.</param> <param name="scriptPath">Instead of specifying <paramref name="script"/>, gives the file name to load from.</param> </member> <member name="P:Microsoft.Playwright.IBrowserContext.BackgroundPages"> <summary> <para>Background pages are only supported on Chromium-based browsers.</para> <para>All existing background pages in the context.</para> </summary> <remarks><para>Background pages are only supported on Chromium-based browsers.</para></remarks> </member> <member name="P:Microsoft.Playwright.IBrowserContext.Browser"> <summary> <para> Returns the browser instance of the context. If it was launched as a persistent context null gets returned. </para> </summary> </member> <member name="M:Microsoft.Playwright.IBrowserContext.ClearCookiesAsync(Microsoft.Playwright.BrowserContextClearCookiesOptions)"> <summary> <para>Removes cookies from context. Accepts optional filter.</para> <para>**Usage**</para> <code> await context.ClearCookiesAsync();<br/> await context.ClearCookiesAsync(new() { Name = "session-id" });<br/> await context.ClearCookiesAsync(new() { Domain = "my-origin.com" });<br/> await context.ClearCookiesAsync(new() { Path = "/api/v1" });<br/> await context.ClearCookiesAsync(new() { Name = "session-id", Domain = "my-origin.com" }); </code> </summary> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IBrowserContext.ClearPermissionsAsync"> <summary> <para>Clears all permission overrides for the browser context.</para> <para>**Usage**</para> <code> var context = await browser.NewContextAsync();<br/> await context.GrantPermissionsAsync(new[] { "clipboard-read" });<br/> // Alternatively, you can use the helper class ContextPermissions<br/> // to specify the permissions...<br/> // do stuff ...<br/> await context.ClearPermissionsAsync(); </code> </summary> </member> <member name="M:Microsoft.Playwright.IBrowserContext.CloseAsync(Microsoft.Playwright.BrowserContextCloseOptions)"> <summary> <para> Closes the browser context. All the pages that belong to the browser context will be closed. </para> <para>The default browser context cannot be closed.</para> </summary> <remarks><para>The default browser context cannot be closed.</para></remarks> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IBrowserContext.CookiesAsync(System.String)"> <summary> <para> If no URLs are specified, this method returns all cookies. If URLs are specified, only cookies that affect those URLs are returned. </para> </summary> <param name="urls">Optional list of URLs.</param> </member> <member name="M:Microsoft.Playwright.IBrowserContext.CookiesAsync(System.Collections.Generic.IEnumerable{System.String})"> <summary> <para> If no URLs are specified, this method returns all cookies. If URLs are specified, only cookies that affect those URLs are returned. </para> </summary> <param name="urls">Optional list of URLs.</param> </member> <member name="M:Microsoft.Playwright.IBrowserContext.CookiesAsync"> <summary> <para> If no URLs are specified, this method returns all cookies. If URLs are specified, only cookies that affect those URLs are returned. </para> </summary> </member> <member name="M:Microsoft.Playwright.IBrowserContext.ExposeBindingAsync(System.String,System.Action,Microsoft.Playwright.BrowserContextExposeBindingOptions)"> <summary> <para> The method adds a function called <see cref="M:Microsoft.Playwright.IBrowserContext.ExposeBindingAsync(System.String,System.Action,Microsoft.Playwright.BrowserContextExposeBindingOptions)"/> on the <c>window</c> object of every frame in every page in the context. When called, the function executes <see cref="M:Microsoft.Playwright.IBrowserContext.ExposeBindingAsync(System.String,System.Action,Microsoft.Playwright.BrowserContextExposeBindingOptions)"/> and returns a <see cref="T:System.Threading.Tasks.Task"/> which resolves to the return value of <see cref="M:Microsoft.Playwright.IBrowserContext.ExposeBindingAsync(System.String,System.Action,Microsoft.Playwright.BrowserContextExposeBindingOptions)"/>. If the <see cref="M:Microsoft.Playwright.IBrowserContext.ExposeBindingAsync(System.String,System.Action,Microsoft.Playwright.BrowserContextExposeBindingOptions)"/> returns a <see cref="!:Promise"/>, it will be awaited. </para> <para> The first argument of the <see cref="M:Microsoft.Playwright.IBrowserContext.ExposeBindingAsync(System.String,System.Action,Microsoft.Playwright.BrowserContextExposeBindingOptions)"/> function contains information about the caller: <c>{ browserContext: BrowserContext, page: Page, frame: Frame }</c>. </para> <para>See <see cref="M:Microsoft.Playwright.IPage.ExposeBindingAsync(System.String,System.Action,Microsoft.Playwright.PageExposeBindingOptions)"/> for page-only version.</para> <para>**Usage**</para> <para>An example of exposing page URL to all frames in all pages in the context:</para> <code> using Microsoft.Playwright;<br/> <br/> using var playwright = await Playwright.CreateAsync();<br/> var browser = await playwright.Webkit.LaunchAsync(new() { Headless = false });<br/> var context = await browser.NewContextAsync();<br/> <br/> await context.ExposeBindingAsync("pageURL", source => source.Page.Url);<br/> var page = await context.NewPageAsync();<br/> await page.SetContentAsync("<script>\n" +<br/> " async function onClick() {\n" +<br/> " document.querySelector('div').textContent = await window.pageURL();\n" +<br/> " }\n" +<br/> "</script>\n" +<br/> "<button onclick=\"onClick()\">Click me</button>\n" +<br/> "<div></div>");<br/> await page.GetByRole(AriaRole.Button).ClickAsync(); </code> </summary> <param name="name">Name of the function on the window object.</param> <param name="callback">Callback function that will be called in the Playwright's context.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IBrowserContext.ExposeFunctionAsync(System.String,System.Action)"> <summary> <para> The method adds a function called <see cref="M:Microsoft.Playwright.IBrowserContext.ExposeFunctionAsync(System.String,System.Action)"/> on the <c>window</c> object of every frame in every page in the context. When called, the function executes <see cref="M:Microsoft.Playwright.IBrowserContext.ExposeFunctionAsync(System.String,System.Action)"/> and returns a <see cref="T:System.Threading.Tasks.Task"/> which resolves to the return value of <see cref="M:Microsoft.Playwright.IBrowserContext.ExposeFunctionAsync(System.String,System.Action)"/>. </para> <para> If the <see cref="M:Microsoft.Playwright.IBrowserContext.ExposeFunctionAsync(System.String,System.Action)"/> returns a <see cref="T:System.Threading.Tasks.Task"/>, it will be awaited. </para> <para>See <see cref="M:Microsoft.Playwright.IPage.ExposeFunctionAsync(System.String,System.Action)"/> for page-only version.</para> <para>**Usage**</para> <para>An example of adding a <c>sha256</c> function to all pages in the context:</para> <code> using Microsoft.Playwright;<br/> using System;<br/> using System.Security.Cryptography;<br/> using System.Threading.Tasks;<br/> <br/> class BrowserContextExamples<br/> {<br/> public static async Task Main()<br/> {<br/> using var playwright = await Playwright.CreateAsync();<br/> var browser = await playwright.Webkit.LaunchAsync(new() { Headless = false });<br/> var context = await browser.NewContextAsync();<br/> <br/> await context.ExposeFunctionAsync("sha256", (string input) =><br/> {<br/> return Convert.ToBase64String(<br/> SHA256.Create().ComputeHash(System.Text.Encoding.UTF8.GetBytes(input)));<br/> });<br/> <br/> var page = await context.NewPageAsync();<br/> await page.SetContentAsync("<script>\n" +<br/> " async function onClick() {\n" +<br/> " document.querySelector('div').textContent = await window.sha256('PLAYWRIGHT');\n" +<br/> " }\n" +<br/> "</script>\n" +<br/> "<button onclick=\"onClick()\">Click me</button>\n" +<br/> "<div></div>");<br/> <br/> await page.GetByRole(AriaRole.Button).ClickAsync();<br/> Console.WriteLine(await page.TextContentAsync("div"));<br/> }<br/> } </code> </summary> <param name="name">Name of the function on the window object.</param> <param name="callback">Callback function that will be called in the Playwright's context.</param> </member> <member name="M:Microsoft.Playwright.IBrowserContext.GrantPermissionsAsync(System.Collections.Generic.IEnumerable{System.String},Microsoft.Playwright.BrowserContextGrantPermissionsOptions)"> <summary> <para> Grants specified permissions to the browser context. Only grants corresponding permissions to the given origin if specified. </para> </summary> <param name="permissions"> A list of permissions to grant. Supported permissions differ between browsers, and even between different versions of the same browser. Any permission may stop working after an update. Here are some permissions that may be supported by some browsers: <list type="bullet"> <item><description><c>'accelerometer'</c></description></item> <item><description><c>'ambient-light-sensor'</c></description></item> <item><description><c>'background-sync'</c></description></item> <item><description><c>'camera'</c></description></item> <item><description><c>'clipboard-read'</c></description></item> <item><description><c>'clipboard-write'</c></description></item> <item><description><c>'geolocation'</c></description></item> <item><description><c>'gyroscope'</c></description></item> <item><description><c>'magnetometer'</c></description></item> <item><description><c>'microphone'</c></description></item> <item><description><c>'midi-sysex'</c> (system-exclusive midi)</description></item> <item><description><c>'midi'</c></description></item> <item><description><c>'notifications'</c></description></item> <item><description><c>'payment-handler'</c></description></item> <item><description><c>'storage-access'</c></description></item> </list> </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IBrowserContext.NewCDPSessionAsync(Microsoft.Playwright.IPage)"> <summary> <para>CDP sessions are only supported on Chromium-based browsers.</para> <para>Returns the newly created session.</para> </summary> <remarks><para>CDP sessions are only supported on Chromium-based browsers.</para></remarks> <param name="page"> Target to create new session for. For backwards-compatibility, this parameter is named <c>page</c>, but it can be a <c>Page</c> or <c>Frame</c> type. </param> </member> <member name="M:Microsoft.Playwright.IBrowserContext.NewCDPSessionAsync(Microsoft.Playwright.IFrame)"> <summary> <para>CDP sessions are only supported on Chromium-based browsers.</para> <para>Returns the newly created session.</para> </summary> <remarks><para>CDP sessions are only supported on Chromium-based browsers.</para></remarks> <param name="page"> Target to create new session for. For backwards-compatibility, this parameter is named <c>page</c>, but it can be a <c>Page</c> or <c>Frame</c> type. </param> </member> <member name="M:Microsoft.Playwright.IBrowserContext.NewPageAsync"> <summary><para>Creates a new page in the browser context.</para></summary> </member> <member name="P:Microsoft.Playwright.IBrowserContext.Pages"> <summary><para>Returns all open pages in the context.</para></summary> </member> <member name="P:Microsoft.Playwright.IBrowserContext.APIRequest"> <summary> <para> API testing helper associated with this context. Requests made with this API will use context cookies. </para> </summary> </member> <member name="M:Microsoft.Playwright.IBrowserContext.RouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.BrowserContextRouteOptions)"> <summary> <para> Routing provides the capability to modify network requests that are made by any page in the browser context. Once route is enabled, every request matching the url pattern will stall unless it's continued, fulfilled or aborted. </para> <para> <see cref="M:Microsoft.Playwright.IBrowserContext.RouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.BrowserContextRouteOptions)"/> will not intercept requests intercepted by Service Worker. See <a href="https://github.com/microsoft/playwright/issues/1090">this</a> issue. We recommend disabling Service Workers when using request interception by setting <see cref="M:Microsoft.Playwright.IBrowser.NewContextAsync(Microsoft.Playwright.BrowserNewContextOptions)"/> to <c>'block'</c>. </para> <para>**Usage**</para> <para>An example of a naive handler that aborts all image requests:</para> <code> var context = await browser.NewContextAsync();<br/> var page = await context.NewPageAsync();<br/> await context.RouteAsync("**/*.{png,jpg,jpeg}", r => r.AbortAsync());<br/> await page.GotoAsync("https://theverge.com");<br/> await browser.CloseAsync(); </code> <para>or the same snippet using a regex pattern instead:</para> <code> var context = await browser.NewContextAsync();<br/> var page = await context.NewPageAsync();<br/> await context.RouteAsync(new Regex("(\\.png$)|(\\.jpg$)"), r => r.AbortAsync());<br/> await page.GotoAsync("https://theverge.com");<br/> await browser.CloseAsync(); </code> <para> It is possible to examine the request to decide the route action. For example, mocking all requests that contain some post data, and leaving all other requests as is: </para> <code> await page.RouteAsync("/api/**", async r =><br/> {<br/> if (r.Request.PostData.Contains("my-string"))<br/> await r.FulfillAsync(new() { Body = "mocked-data" });<br/> else<br/> await r.ContinueAsync();<br/> }); </code> <para> Page routes (set up with <see cref="M:Microsoft.Playwright.IPage.RouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.PageRouteOptions)"/>) take precedence over browser context routes when request matches both handlers. </para> <para>To remove a route with its handler you can use <see cref="M:Microsoft.Playwright.IBrowserContext.UnrouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute})"/>.</para> <para>Enabling routing disables http cache.</para> </summary> <remarks> <para> <see cref="M:Microsoft.Playwright.IBrowserContext.RouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.BrowserContextRouteOptions)"/> will not intercept requests intercepted by Service Worker. See <a href="https://github.com/microsoft/playwright/issues/1090">this</a> issue. We recommend disabling Service Workers when using request interception by setting <see cref="M:Microsoft.Playwright.IBrowser.NewContextAsync(Microsoft.Playwright.BrowserNewContextOptions)"/> to <c>'block'</c>. </para> <para>Enabling routing disables http cache.</para> </remarks> <param name="url"> A glob pattern, regex pattern, or predicate that receives a <see cref="!:URL"/> to match during routing. If <see cref="M:Microsoft.Playwright.IBrowser.NewContextAsync(Microsoft.Playwright.BrowserNewContextOptions)"/> is set in the context options and the provided URL is a string that does not start with <c>*</c>, it is resolved using the <a href="https://developer.mozilla.org/en-US/docs/Web/API/URL/URL"><c>new URL()</c></a> constructor. </param> <param name="handler">handler function to route the request.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IBrowserContext.RouteAsync(System.Text.RegularExpressions.Regex,System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.BrowserContextRouteOptions)"> <summary> <para> Routing provides the capability to modify network requests that are made by any page in the browser context. Once route is enabled, every request matching the url pattern will stall unless it's continued, fulfilled or aborted. </para> <para> <see cref="M:Microsoft.Playwright.IBrowserContext.RouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.BrowserContextRouteOptions)"/> will not intercept requests intercepted by Service Worker. See <a href="https://github.com/microsoft/playwright/issues/1090">this</a> issue. We recommend disabling Service Workers when using request interception by setting <see cref="M:Microsoft.Playwright.IBrowser.NewContextAsync(Microsoft.Playwright.BrowserNewContextOptions)"/> to <c>'block'</c>. </para> <para>**Usage**</para> <para>An example of a naive handler that aborts all image requests:</para> <code> var context = await browser.NewContextAsync();<br/> var page = await context.NewPageAsync();<br/> await context.RouteAsync("**/*.{png,jpg,jpeg}", r => r.AbortAsync());<br/> await page.GotoAsync("https://theverge.com");<br/> await browser.CloseAsync(); </code> <para>or the same snippet using a regex pattern instead:</para> <code> var context = await browser.NewContextAsync();<br/> var page = await context.NewPageAsync();<br/> await context.RouteAsync(new Regex("(\\.png$)|(\\.jpg$)"), r => r.AbortAsync());<br/> await page.GotoAsync("https://theverge.com");<br/> await browser.CloseAsync(); </code> <para> It is possible to examine the request to decide the route action. For example, mocking all requests that contain some post data, and leaving all other requests as is: </para> <code> await page.RouteAsync("/api/**", async r =><br/> {<br/> if (r.Request.PostData.Contains("my-string"))<br/> await r.FulfillAsync(new() { Body = "mocked-data" });<br/> else<br/> await r.ContinueAsync();<br/> }); </code> <para> Page routes (set up with <see cref="M:Microsoft.Playwright.IPage.RouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.PageRouteOptions)"/>) take precedence over browser context routes when request matches both handlers. </para> <para>To remove a route with its handler you can use <see cref="M:Microsoft.Playwright.IBrowserContext.UnrouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute})"/>.</para> <para>Enabling routing disables http cache.</para> </summary> <remarks> <para> <see cref="M:Microsoft.Playwright.IBrowserContext.RouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.BrowserContextRouteOptions)"/> will not intercept requests intercepted by Service Worker. See <a href="https://github.com/microsoft/playwright/issues/1090">this</a> issue. We recommend disabling Service Workers when using request interception by setting <see cref="M:Microsoft.Playwright.IBrowser.NewContextAsync(Microsoft.Playwright.BrowserNewContextOptions)"/> to <c>'block'</c>. </para> <para>Enabling routing disables http cache.</para> </remarks> <param name="url"> A glob pattern, regex pattern, or predicate that receives a <see cref="!:URL"/> to match during routing. If <see cref="M:Microsoft.Playwright.IBrowser.NewContextAsync(Microsoft.Playwright.BrowserNewContextOptions)"/> is set in the context options and the provided URL is a string that does not start with <c>*</c>, it is resolved using the <a href="https://developer.mozilla.org/en-US/docs/Web/API/URL/URL"><c>new URL()</c></a> constructor. </param> <param name="handler">handler function to route the request.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IBrowserContext.RouteAsync(System.Func{System.String,System.Boolean},System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.BrowserContextRouteOptions)"> <summary> <para> Routing provides the capability to modify network requests that are made by any page in the browser context. Once route is enabled, every request matching the url pattern will stall unless it's continued, fulfilled or aborted. </para> <para> <see cref="M:Microsoft.Playwright.IBrowserContext.RouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.BrowserContextRouteOptions)"/> will not intercept requests intercepted by Service Worker. See <a href="https://github.com/microsoft/playwright/issues/1090">this</a> issue. We recommend disabling Service Workers when using request interception by setting <see cref="M:Microsoft.Playwright.IBrowser.NewContextAsync(Microsoft.Playwright.BrowserNewContextOptions)"/> to <c>'block'</c>. </para> <para>**Usage**</para> <para>An example of a naive handler that aborts all image requests:</para> <code> var context = await browser.NewContextAsync();<br/> var page = await context.NewPageAsync();<br/> await context.RouteAsync("**/*.{png,jpg,jpeg}", r => r.AbortAsync());<br/> await page.GotoAsync("https://theverge.com");<br/> await browser.CloseAsync(); </code> <para>or the same snippet using a regex pattern instead:</para> <code> var context = await browser.NewContextAsync();<br/> var page = await context.NewPageAsync();<br/> await context.RouteAsync(new Regex("(\\.png$)|(\\.jpg$)"), r => r.AbortAsync());<br/> await page.GotoAsync("https://theverge.com");<br/> await browser.CloseAsync(); </code> <para> It is possible to examine the request to decide the route action. For example, mocking all requests that contain some post data, and leaving all other requests as is: </para> <code> await page.RouteAsync("/api/**", async r =><br/> {<br/> if (r.Request.PostData.Contains("my-string"))<br/> await r.FulfillAsync(new() { Body = "mocked-data" });<br/> else<br/> await r.ContinueAsync();<br/> }); </code> <para> Page routes (set up with <see cref="M:Microsoft.Playwright.IPage.RouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.PageRouteOptions)"/>) take precedence over browser context routes when request matches both handlers. </para> <para>To remove a route with its handler you can use <see cref="M:Microsoft.Playwright.IBrowserContext.UnrouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute})"/>.</para> <para>Enabling routing disables http cache.</para> </summary> <remarks> <para> <see cref="M:Microsoft.Playwright.IBrowserContext.RouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.BrowserContextRouteOptions)"/> will not intercept requests intercepted by Service Worker. See <a href="https://github.com/microsoft/playwright/issues/1090">this</a> issue. We recommend disabling Service Workers when using request interception by setting <see cref="M:Microsoft.Playwright.IBrowser.NewContextAsync(Microsoft.Playwright.BrowserNewContextOptions)"/> to <c>'block'</c>. </para> <para>Enabling routing disables http cache.</para> </remarks> <param name="url"> A glob pattern, regex pattern, or predicate that receives a <see cref="!:URL"/> to match during routing. If <see cref="M:Microsoft.Playwright.IBrowser.NewContextAsync(Microsoft.Playwright.BrowserNewContextOptions)"/> is set in the context options and the provided URL is a string that does not start with <c>*</c>, it is resolved using the <a href="https://developer.mozilla.org/en-US/docs/Web/API/URL/URL"><c>new URL()</c></a> constructor. </param> <param name="handler">handler function to route the request.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IBrowserContext.RouteFromHARAsync(System.String,Microsoft.Playwright.BrowserContextRouteFromHAROptions)"> <summary> <para> If specified the network requests that are made in the context will be served from the HAR file. Read more about <a href="https://playwright.dev/dotnet/docs/mock#replaying-from-har">Replaying from HAR</a>. </para> <para> Playwright will not serve requests intercepted by Service Worker from the HAR file. See <a href="https://github.com/microsoft/playwright/issues/1090">this</a> issue. We recommend disabling Service Workers when using request interception by setting <see cref="M:Microsoft.Playwright.IBrowser.NewContextAsync(Microsoft.Playwright.BrowserNewContextOptions)"/> to <c>'block'</c>. </para> </summary> <param name="har"> Path to a <a href="http://www.softwareishard.com/blog/har-12-spec">HAR</a> file with prerecorded network data. If <c>path</c> is a relative path, then it is resolved relative to the current working directory. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IBrowserContext.RouteWebSocketAsync(System.String,System.Action{Microsoft.Playwright.IWebSocketRoute})"> <summary> <para> This method allows to modify websocket connections that are made by any page in the browser context. </para> <para> Note that only <c>WebSocket</c>s created after this method was called will be routed. It is recommended to call this method before creating any pages. </para> <para>**Usage**</para> <para> Below is an example of a simple handler that blocks some websocket messages. See <see cref="T:Microsoft.Playwright.IWebSocketRoute"/> for more details and examples. </para> <code> await context.RouteWebSocketAsync("/ws", async ws => {<br/> ws.RouteSend(message => {<br/> if (message == "to-be-blocked")<br/> return;<br/> ws.Send(message);<br/> });<br/> await ws.ConnectAsync();<br/> }); </code> </summary> <param name="url"> Only WebSockets with the url matching this pattern will be routed. A string pattern can be relative to the <see cref="M:Microsoft.Playwright.IBrowser.NewContextAsync(Microsoft.Playwright.BrowserNewContextOptions)"/> context option. </param> <param name="handler">Handler function to route the WebSocket.</param> </member> <member name="M:Microsoft.Playwright.IBrowserContext.RouteWebSocketAsync(System.Text.RegularExpressions.Regex,System.Action{Microsoft.Playwright.IWebSocketRoute})"> <summary> <para> This method allows to modify websocket connections that are made by any page in the browser context. </para> <para> Note that only <c>WebSocket</c>s created after this method was called will be routed. It is recommended to call this method before creating any pages. </para> <para>**Usage**</para> <para> Below is an example of a simple handler that blocks some websocket messages. See <see cref="T:Microsoft.Playwright.IWebSocketRoute"/> for more details and examples. </para> <code> await context.RouteWebSocketAsync("/ws", async ws => {<br/> ws.RouteSend(message => {<br/> if (message == "to-be-blocked")<br/> return;<br/> ws.Send(message);<br/> });<br/> await ws.ConnectAsync();<br/> }); </code> </summary> <param name="url"> Only WebSockets with the url matching this pattern will be routed. A string pattern can be relative to the <see cref="M:Microsoft.Playwright.IBrowser.NewContextAsync(Microsoft.Playwright.BrowserNewContextOptions)"/> context option. </param> <param name="handler">Handler function to route the WebSocket.</param> </member> <member name="M:Microsoft.Playwright.IBrowserContext.RouteWebSocketAsync(System.Func{System.String,System.Boolean},System.Action{Microsoft.Playwright.IWebSocketRoute})"> <summary> <para> This method allows to modify websocket connections that are made by any page in the browser context. </para> <para> Note that only <c>WebSocket</c>s created after this method was called will be routed. It is recommended to call this method before creating any pages. </para> <para>**Usage**</para> <para> Below is an example of a simple handler that blocks some websocket messages. See <see cref="T:Microsoft.Playwright.IWebSocketRoute"/> for more details and examples. </para> <code> await context.RouteWebSocketAsync("/ws", async ws => {<br/> ws.RouteSend(message => {<br/> if (message == "to-be-blocked")<br/> return;<br/> ws.Send(message);<br/> });<br/> await ws.ConnectAsync();<br/> }); </code> </summary> <param name="url"> Only WebSockets with the url matching this pattern will be routed. A string pattern can be relative to the <see cref="M:Microsoft.Playwright.IBrowser.NewContextAsync(Microsoft.Playwright.BrowserNewContextOptions)"/> context option. </param> <param name="handler">Handler function to route the WebSocket.</param> </member> <member name="M:Microsoft.Playwright.IBrowserContext.SetDefaultNavigationTimeout(System.Single)"> <summary> <para> This setting will change the default maximum navigation time for the following methods and related shortcuts: </para> <list type="bullet"> <item><description><see cref="M:Microsoft.Playwright.IPage.GoBackAsync(Microsoft.Playwright.PageGoBackOptions)"/></description></item> <item><description><see cref="M:Microsoft.Playwright.IPage.GoForwardAsync(Microsoft.Playwright.PageGoForwardOptions)"/></description></item> <item><description><see cref="M:Microsoft.Playwright.IPage.GotoAsync(System.String,Microsoft.Playwright.PageGotoOptions)"/></description></item> <item><description><see cref="M:Microsoft.Playwright.IPage.ReloadAsync(Microsoft.Playwright.PageReloadOptions)"/></description></item> <item><description><see cref="M:Microsoft.Playwright.IPage.SetContentAsync(System.String,Microsoft.Playwright.PageSetContentOptions)"/></description></item> <item><description><see cref="M:Microsoft.Playwright.IPage.RunAndWaitForNavigationAsync(System.Func{System.Threading.Tasks.Task},Microsoft.Playwright.PageRunAndWaitForNavigationOptions)"/></description></item> </list> <para> <see cref="M:Microsoft.Playwright.IPage.SetDefaultNavigationTimeout(System.Single)"/> and <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> take priority over <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultNavigationTimeout(System.Single)"/>. </para> </summary> <remarks> <para> <see cref="M:Microsoft.Playwright.IPage.SetDefaultNavigationTimeout(System.Single)"/> and <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> take priority over <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultNavigationTimeout(System.Single)"/>. </para> </remarks> <param name="timeout">Maximum navigation time in milliseconds</param> </member> <member name="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"> <summary> <para> This setting will change the default maximum time for all the methods accepting <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> option. </para> <para> <see cref="M:Microsoft.Playwright.IPage.SetDefaultNavigationTimeout(System.Single)"/>, <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> and <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultNavigationTimeout(System.Single)"/> take priority over <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/>. </para> </summary> <remarks> <para> <see cref="M:Microsoft.Playwright.IPage.SetDefaultNavigationTimeout(System.Single)"/>, <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> and <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultNavigationTimeout(System.Single)"/> take priority over <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/>. </para> </remarks> <param name="timeout">Maximum time in milliseconds. Pass <c>0</c> to disable timeout.</param> </member> <member name="M:Microsoft.Playwright.IBrowserContext.SetExtraHTTPHeadersAsync(System.Collections.Generic.IEnumerable{System.Collections.Generic.KeyValuePair{System.String,System.String}})"> <summary> <para> The extra HTTP headers will be sent with every request initiated by any page in the context. These headers are merged with page-specific extra HTTP headers set with <see cref="M:Microsoft.Playwright.IPage.SetExtraHTTPHeadersAsync(System.Collections.Generic.IEnumerable{System.Collections.Generic.KeyValuePair{System.String,System.String}})"/>. If page overrides a particular header, page-specific header value will be used instead of the browser context header value. </para> <para> <see cref="M:Microsoft.Playwright.IBrowserContext.SetExtraHTTPHeadersAsync(System.Collections.Generic.IEnumerable{System.Collections.Generic.KeyValuePair{System.String,System.String}})"/> does not guarantee the order of headers in the outgoing requests. </para> </summary> <remarks> <para> <see cref="M:Microsoft.Playwright.IBrowserContext.SetExtraHTTPHeadersAsync(System.Collections.Generic.IEnumerable{System.Collections.Generic.KeyValuePair{System.String,System.String}})"/> does not guarantee the order of headers in the outgoing requests. </para> </remarks> <param name="headers"> An object containing additional HTTP headers to be sent with every request. All header values must be strings. </param> </member> <member name="M:Microsoft.Playwright.IBrowserContext.SetGeolocationAsync(Microsoft.Playwright.Geolocation)"> <summary> <para> Sets the context's geolocation. Passing <c>null</c> or <c>undefined</c> emulates position unavailable. </para> <para>**Usage**</para> <code> await context.SetGeolocationAsync(new Geolocation()<br/> {<br/> Latitude = 59.95f,<br/> Longitude = 30.31667f<br/> }); </code> <para> Consider using <see cref="M:Microsoft.Playwright.IBrowserContext.GrantPermissionsAsync(System.Collections.Generic.IEnumerable{System.String},Microsoft.Playwright.BrowserContextGrantPermissionsOptions)"/> to grant permissions for the browser context pages to read its geolocation. </para> </summary> <remarks> <para> Consider using <see cref="M:Microsoft.Playwright.IBrowserContext.GrantPermissionsAsync(System.Collections.Generic.IEnumerable{System.String},Microsoft.Playwright.BrowserContextGrantPermissionsOptions)"/> to grant permissions for the browser context pages to read its geolocation. </para> </remarks> <param name="geolocation"> </param> </member> <member name="M:Microsoft.Playwright.IBrowserContext.SetOfflineAsync(System.Boolean)"> <param name="offline">Whether to emulate network being offline for the browser context.</param> </member> <member name="M:Microsoft.Playwright.IBrowserContext.StorageStateAsync(Microsoft.Playwright.BrowserContextStorageStateOptions)"> <summary> <para> Returns storage state for this browser context, contains current cookies, local storage snapshot and IndexedDB snapshot. </para> </summary> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IBrowserContext.UnrouteAllAsync(Microsoft.Playwright.BrowserContextUnrouteAllOptions)"> <summary> <para> Removes all routes created with <see cref="M:Microsoft.Playwright.IBrowserContext.RouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.BrowserContextRouteOptions)"/> and <see cref="M:Microsoft.Playwright.IBrowserContext.RouteFromHARAsync(System.String,Microsoft.Playwright.BrowserContextRouteFromHAROptions)"/>. </para> </summary> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IBrowserContext.UnrouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute})"> <summary> <para> Removes a route created with <see cref="M:Microsoft.Playwright.IBrowserContext.RouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.BrowserContextRouteOptions)"/>. When <see cref="M:Microsoft.Playwright.IBrowserContext.UnrouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute})"/> is not specified, removes all routes for the <see cref="M:Microsoft.Playwright.IBrowserContext.UnrouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute})"/>. </para> </summary> <param name="url"> A glob pattern, regex pattern or predicate receiving <see cref="!:URL"/> used to register a routing with <see cref="M:Microsoft.Playwright.IBrowserContext.RouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.BrowserContextRouteOptions)"/>. </param> <param name="handler">Optional handler function used to register a routing with <see cref="M:Microsoft.Playwright.IBrowserContext.RouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.BrowserContextRouteOptions)"/>.</param> </member> <member name="M:Microsoft.Playwright.IBrowserContext.UnrouteAsync(System.Text.RegularExpressions.Regex,System.Action{Microsoft.Playwright.IRoute})"> <summary> <para> Removes a route created with <see cref="M:Microsoft.Playwright.IBrowserContext.RouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.BrowserContextRouteOptions)"/>. When <see cref="M:Microsoft.Playwright.IBrowserContext.UnrouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute})"/> is not specified, removes all routes for the <see cref="M:Microsoft.Playwright.IBrowserContext.UnrouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute})"/>. </para> </summary> <param name="url"> A glob pattern, regex pattern or predicate receiving <see cref="!:URL"/> used to register a routing with <see cref="M:Microsoft.Playwright.IBrowserContext.RouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.BrowserContextRouteOptions)"/>. </param> <param name="handler">Optional handler function used to register a routing with <see cref="M:Microsoft.Playwright.IBrowserContext.RouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.BrowserContextRouteOptions)"/>.</param> </member> <member name="M:Microsoft.Playwright.IBrowserContext.UnrouteAsync(System.Func{System.String,System.Boolean},System.Action{Microsoft.Playwright.IRoute})"> <summary> <para> Removes a route created with <see cref="M:Microsoft.Playwright.IBrowserContext.RouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.BrowserContextRouteOptions)"/>. When <see cref="M:Microsoft.Playwright.IBrowserContext.UnrouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute})"/> is not specified, removes all routes for the <see cref="M:Microsoft.Playwright.IBrowserContext.UnrouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute})"/>. </para> </summary> <param name="url"> A glob pattern, regex pattern or predicate receiving <see cref="!:URL"/> used to register a routing with <see cref="M:Microsoft.Playwright.IBrowserContext.RouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.BrowserContextRouteOptions)"/>. </param> <param name="handler">Optional handler function used to register a routing with <see cref="M:Microsoft.Playwright.IBrowserContext.RouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.BrowserContextRouteOptions)"/>.</param> </member> <member name="M:Microsoft.Playwright.IBrowserContext.WaitForConsoleMessageAsync(Microsoft.Playwright.BrowserContextWaitForConsoleMessageOptions)"> <summary> <para> Performs action and waits for a <see cref="T:Microsoft.Playwright.IConsoleMessage"/> to be logged by in the pages in the context. If predicate is provided, it passes <see cref="T:Microsoft.Playwright.IConsoleMessage"/> value into the <c>predicate</c> function and waits for <c>predicate(message)</c> to return a truthy value. Will throw an error if the page is closed before the <see cref="E:Microsoft.Playwright.IBrowserContext.Console"/> event is fired. </para> </summary> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IBrowserContext.RunAndWaitForConsoleMessageAsync(System.Func{System.Threading.Tasks.Task},Microsoft.Playwright.BrowserContextRunAndWaitForConsoleMessageOptions)"> <summary> <para> Performs action and waits for a <see cref="T:Microsoft.Playwright.IConsoleMessage"/> to be logged by in the pages in the context. If predicate is provided, it passes <see cref="T:Microsoft.Playwright.IConsoleMessage"/> value into the <c>predicate</c> function and waits for <c>predicate(message)</c> to return a truthy value. Will throw an error if the page is closed before the <see cref="E:Microsoft.Playwright.IBrowserContext.Console"/> event is fired. </para> </summary> <param name="action">Action that triggers the event.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IBrowserContext.WaitForPageAsync(Microsoft.Playwright.BrowserContextWaitForPageOptions)"> <summary> <para> Performs action and waits for a new <see cref="T:Microsoft.Playwright.IPage"/> to be created in the context. If predicate is provided, it passes <see cref="T:Microsoft.Playwright.IPage"/> value into the <c>predicate</c> function and waits for <c>predicate(event)</c> to return a truthy value. Will throw an error if the context closes before new <see cref="T:Microsoft.Playwright.IPage"/> is created. </para> </summary> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IBrowserContext.RunAndWaitForPageAsync(System.Func{System.Threading.Tasks.Task},Microsoft.Playwright.BrowserContextRunAndWaitForPageOptions)"> <summary> <para> Performs action and waits for a new <see cref="T:Microsoft.Playwright.IPage"/> to be created in the context. If predicate is provided, it passes <see cref="T:Microsoft.Playwright.IPage"/> value into the <c>predicate</c> function and waits for <c>predicate(event)</c> to return a truthy value. Will throw an error if the context closes before new <see cref="T:Microsoft.Playwright.IPage"/> is created. </para> </summary> <param name="action">Action that triggers the event.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IBrowserContext.ExposeBindingAsync(System.String,System.Action{Microsoft.Playwright.BindingSource})"> <inheritdoc cref="M:Microsoft.Playwright.IBrowserContext.ExposeBindingAsync(System.String,System.Action,Microsoft.Playwright.BrowserContextExposeBindingOptions)"/> </member> <member name="M:Microsoft.Playwright.IBrowserContext.ExposeBindingAsync``1(System.String,System.Action{Microsoft.Playwright.BindingSource,``0})"> <inheritdoc cref="M:Microsoft.Playwright.IBrowserContext.ExposeBindingAsync(System.String,System.Action,Microsoft.Playwright.BrowserContextExposeBindingOptions)"/> </member> <member name="M:Microsoft.Playwright.IBrowserContext.ExposeBindingAsync``1(System.String,System.Func{Microsoft.Playwright.BindingSource,``0})"> <inheritdoc cref="M:Microsoft.Playwright.IBrowserContext.ExposeBindingAsync(System.String,System.Action,Microsoft.Playwright.BrowserContextExposeBindingOptions)"/> </member> <member name="M:Microsoft.Playwright.IBrowserContext.ExposeBindingAsync``1(System.String,System.Func{Microsoft.Playwright.BindingSource,Microsoft.Playwright.IJSHandle,``0})"> <inheritdoc cref="M:Microsoft.Playwright.IBrowserContext.ExposeBindingAsync(System.String,System.Action,Microsoft.Playwright.BrowserContextExposeBindingOptions)"/> </member> <member name="M:Microsoft.Playwright.IBrowserContext.ExposeBindingAsync``2(System.String,System.Func{Microsoft.Playwright.BindingSource,``0,``1})"> <inheritdoc cref="M:Microsoft.Playwright.IBrowserContext.ExposeBindingAsync(System.String,System.Action,Microsoft.Playwright.BrowserContextExposeBindingOptions)"/> </member> <member name="M:Microsoft.Playwright.IBrowserContext.ExposeBindingAsync``3(System.String,System.Func{Microsoft.Playwright.BindingSource,``0,``1,``2})"> <inheritdoc cref="M:Microsoft.Playwright.IBrowserContext.ExposeBindingAsync(System.String,System.Action,Microsoft.Playwright.BrowserContextExposeBindingOptions)"/> </member> <member name="M:Microsoft.Playwright.IBrowserContext.ExposeBindingAsync``4(System.String,System.Func{Microsoft.Playwright.BindingSource,``0,``1,``2,``3})"> <inheritdoc cref="M:Microsoft.Playwright.IBrowserContext.ExposeBindingAsync(System.String,System.Action,Microsoft.Playwright.BrowserContextExposeBindingOptions)"/> </member> <member name="M:Microsoft.Playwright.IBrowserContext.ExposeBindingAsync``5(System.String,System.Func{Microsoft.Playwright.BindingSource,``0,``1,``2,``3,``4})"> <inheritdoc cref="M:Microsoft.Playwright.IBrowserContext.ExposeBindingAsync(System.String,System.Action,Microsoft.Playwright.BrowserContextExposeBindingOptions)"/> </member> <member name="M:Microsoft.Playwright.IBrowserContext.ExposeFunctionAsync``1(System.String,System.Action{``0})"> <inheritdoc cref="M:Microsoft.Playwright.IBrowserContext.ExposeFunctionAsync(System.String,System.Action)"/> </member> <member name="M:Microsoft.Playwright.IBrowserContext.ExposeFunctionAsync``1(System.String,System.Func{``0})"> <inheritdoc cref="M:Microsoft.Playwright.IBrowserContext.ExposeFunctionAsync(System.String,System.Action)"/> </member> <member name="M:Microsoft.Playwright.IBrowserContext.ExposeFunctionAsync``2(System.String,System.Func{``0,``1})"> <inheritdoc cref="M:Microsoft.Playwright.IBrowserContext.ExposeFunctionAsync(System.String,System.Action)"/> </member> <member name="M:Microsoft.Playwright.IBrowserContext.ExposeFunctionAsync``3(System.String,System.Func{``0,``1,``2})"> <inheritdoc cref="M:Microsoft.Playwright.IBrowserContext.ExposeFunctionAsync(System.String,System.Action)"/> </member> <member name="M:Microsoft.Playwright.IBrowserContext.ExposeFunctionAsync``4(System.String,System.Func{``0,``1,``2,``3})"> <inheritdoc cref="M:Microsoft.Playwright.IBrowserContext.ExposeFunctionAsync(System.String,System.Action)"/> </member> <member name="M:Microsoft.Playwright.IBrowserContext.ExposeFunctionAsync``5(System.String,System.Func{``0,``1,``2,``3,``4})"> <inheritdoc cref="M:Microsoft.Playwright.IBrowserContext.ExposeFunctionAsync(System.String,System.Action)"/> </member> <member name="M:Microsoft.Playwright.IBrowserContext.RouteAsync(System.String,System.Func{Microsoft.Playwright.IRoute,System.Threading.Tasks.Task},Microsoft.Playwright.BrowserContextRouteOptions)"> <inheritdoc cref="M:Microsoft.Playwright.IBrowserContext.RouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.BrowserContextRouteOptions)"/> </member> <member name="M:Microsoft.Playwright.IBrowserContext.RouteAsync(System.Text.RegularExpressions.Regex,System.Func{Microsoft.Playwright.IRoute,System.Threading.Tasks.Task},Microsoft.Playwright.BrowserContextRouteOptions)"> <inheritdoc cref="M:Microsoft.Playwright.IBrowserContext.RouteAsync(System.Text.RegularExpressions.Regex,System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.BrowserContextRouteOptions)"/> </member> <member name="M:Microsoft.Playwright.IBrowserContext.RouteAsync(System.Func{System.String,System.Boolean},System.Func{Microsoft.Playwright.IRoute,System.Threading.Tasks.Task},Microsoft.Playwright.BrowserContextRouteOptions)"> <inheritdoc cref="M:Microsoft.Playwright.IBrowserContext.RouteAsync(System.Func{System.String,System.Boolean},System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.BrowserContextRouteOptions)"/> </member> <member name="M:Microsoft.Playwright.IBrowserContext.UnrouteAsync(System.String,System.Func{Microsoft.Playwright.IRoute,System.Threading.Tasks.Task})"> <inheritdoc cref="M:Microsoft.Playwright.IBrowserContext.UnrouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute})"/> </member> <member name="M:Microsoft.Playwright.IBrowserContext.UnrouteAsync(System.Text.RegularExpressions.Regex,System.Func{Microsoft.Playwright.IRoute,System.Threading.Tasks.Task})"> <inheritdoc cref="M:Microsoft.Playwright.IBrowserContext.UnrouteAsync(System.Text.RegularExpressions.Regex,System.Action{Microsoft.Playwright.IRoute})"/> </member> <member name="M:Microsoft.Playwright.IBrowserContext.UnrouteAsync(System.Func{System.String,System.Boolean},System.Func{Microsoft.Playwright.IRoute,System.Threading.Tasks.Task})"> <inheritdoc cref="M:Microsoft.Playwright.IBrowserContext.UnrouteAsync(System.Func{System.String,System.Boolean},System.Action{Microsoft.Playwright.IRoute})"/> </member> <member name="T:Microsoft.Playwright.IBrowserType"> <summary> <para> BrowserType provides methods to launch a specific browser instance or connect to an existing one. The following is a typical example of using Playwright to drive automation: </para> <code> using Microsoft.Playwright;<br/> using System.Threading.Tasks;<br/> <br/> class BrowserTypeExamples<br/> {<br/> public static async Task Run()<br/> {<br/> using var playwright = await Playwright.CreateAsync();<br/> var chromium = playwright.Chromium;<br/> var browser = await chromium.LaunchAsync();<br/> var page = await browser.NewPageAsync();<br/> await page.GotoAsync("https://www.bing.com");<br/> // other actions<br/> await browser.CloseAsync();<br/> }<br/> } </code> </summary> </member> <member name="M:Microsoft.Playwright.IBrowserType.ConnectAsync(System.String,Microsoft.Playwright.BrowserTypeConnectOptions)"> <summary> <para> This method attaches Playwright to an existing browser instance created via <c>BrowserType.launchServer</c> in Node.js. </para> <para> The major and minor version of the Playwright instance that connects needs to match the version of Playwright that launches the browser (1.2.3 → is compatible with 1.2.x). </para> </summary> <remarks> <para> The major and minor version of the Playwright instance that connects needs to match the version of Playwright that launches the browser (1.2.3 → is compatible with 1.2.x). </para> </remarks> <param name="wsEndpoint"> A Playwright browser websocket endpoint to connect to. You obtain this endpoint via <c>BrowserServer.wsEndpoint</c>. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IBrowserType.ConnectOverCDPAsync(System.String,Microsoft.Playwright.BrowserTypeConnectOverCDPOptions)"> <summary> <para> This method attaches Playwright to an existing browser instance using the Chrome DevTools Protocol. </para> <para>The default browser context is accessible via <see cref="P:Microsoft.Playwright.IBrowser.Contexts"/>.</para> <para> Connecting over the Chrome DevTools Protocol is only supported for Chromium-based browsers. </para> <para> This connection is significantly lower fidelity than the Playwright protocol connection via <see cref="M:Microsoft.Playwright.IBrowserType.ConnectAsync(System.String,Microsoft.Playwright.BrowserTypeConnectOptions)"/>. If you are experiencing issues or attempting to use advanced functionality, you probably want to use <see cref="M:Microsoft.Playwright.IBrowserType.ConnectAsync(System.String,Microsoft.Playwright.BrowserTypeConnectOptions)"/>. </para> <para>**Usage**</para> <code> var browser = await playwright.Chromium.ConnectOverCDPAsync("http://localhost:9222");<br/> var defaultContext = browser.Contexts[0];<br/> var page = defaultContext.Pages[0]; </code> </summary> <remarks> <para> Connecting over the Chrome DevTools Protocol is only supported for Chromium-based browsers. </para> <para> This connection is significantly lower fidelity than the Playwright protocol connection via <see cref="M:Microsoft.Playwright.IBrowserType.ConnectAsync(System.String,Microsoft.Playwright.BrowserTypeConnectOptions)"/>. If you are experiencing issues or attempting to use advanced functionality, you probably want to use <see cref="M:Microsoft.Playwright.IBrowserType.ConnectAsync(System.String,Microsoft.Playwright.BrowserTypeConnectOptions)"/>. </para> </remarks> <param name="endpointURL"> A CDP websocket endpoint or http url to connect to. For example <c>http://localhost:9222/</c> or <c>ws://127.0.0.1:9222/devtools/browser/387adf4c-243f-4051-a181-46798f4a46f4</c>. </param> <param name="options">Call options</param> </member> <member name="P:Microsoft.Playwright.IBrowserType.ExecutablePath"> <summary><para>A path where Playwright expects to find a bundled browser executable.</para></summary> </member> <member name="M:Microsoft.Playwright.IBrowserType.LaunchAsync(Microsoft.Playwright.BrowserTypeLaunchOptions)"> <summary> <para>Returns the browser instance.</para> <para>**Usage**</para> <para> You can use <see cref="M:Microsoft.Playwright.IBrowserType.LaunchAsync(Microsoft.Playwright.BrowserTypeLaunchOptions)"/> to filter out <c>--mute-audio</c> from default arguments: </para> <code> var browser = await playwright.Chromium.LaunchAsync(new() {<br/> IgnoreDefaultArgs = new[] { "--mute-audio" }<br/> }); </code> <para> > **Chromium-only** Playwright can also be used to control the Google Chrome or Microsoft Edge browsers, but it works best with the version of Chromium it is bundled with. There is no guarantee it will work with any other version. Use <see cref="M:Microsoft.Playwright.IBrowserType.LaunchAsync(Microsoft.Playwright.BrowserTypeLaunchOptions)"/> option with extreme caution. </para> <para>></para> <para> > If Google Chrome (rather than Chromium) is preferred, a <a href="https://www.google.com/chrome/browser/canary.html">Chrome Canary</a> or <a href="https://www.chromium.org/getting-involved/dev-channel">Dev Channel</a> build is suggested. </para> <para>></para> <para> > Stock browsers like Google Chrome and Microsoft Edge are suitable for tests that require proprietary media codecs for video playback. See <a href="https://www.howtogeek.com/202825/what%E2%80%99s-the-difference-between-chromium-and-chrome/">this article</a> for other differences between Chromium and Chrome. <a href="https://chromium.googlesource.com/chromium/src/+/lkgr/docs/chromium_browser_vs_google_chrome.md">This article</a> describes some differences for Linux users. </para> </summary> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IBrowserType.LaunchPersistentContextAsync(System.String,Microsoft.Playwright.BrowserTypeLaunchPersistentContextOptions)"> <summary> <para>Returns the persistent browser context instance.</para> <para> Launches browser that uses persistent storage located at <see cref="M:Microsoft.Playwright.IBrowserType.LaunchPersistentContextAsync(System.String,Microsoft.Playwright.BrowserTypeLaunchPersistentContextOptions)"/> and returns the only context. Closing this context will automatically close the browser. </para> </summary> <param name="userDataDir"> Path to a User Data Directory, which stores browser session data like cookies and local storage. Pass an empty string to create a temporary directory. More details for <a href="https://chromium.googlesource.com/chromium/src/+/master/docs/user_data_dir.md#introduction">Chromium</a> and <a href="https://wiki.mozilla.org/Firefox/CommandLineOptions#User_profile">Firefox</a>. Chromium's user data directory is the **parent** directory of the "Profile Path" seen at <c>chrome://version</c>. Note that browsers do not allow launching multiple instances with the same User Data Directory. </param> <param name="options">Call options</param> </member> <member name="P:Microsoft.Playwright.IBrowserType.Name"> <summary><para>Returns browser name. For example: <c>'chromium'</c>, <c>'webkit'</c> or <c>'firefox'</c>.</para></summary> </member> <member name="T:Microsoft.Playwright.ICDPSession"> <summary> <para>The <c>CDPSession</c> instances are used to talk raw Chrome Devtools Protocol:</para> <list type="bullet"> <item><description>protocol methods can be called with <c>session.send</c> method.</description></item> <item><description>protocol events can be subscribed to with <c>session.on</c> method.</description></item> </list> <para>Useful links:</para> <list type="bullet"> <item><description> Documentation on DevTools Protocol can be found here: <a href="https://chromedevtools.github.io/devtools-protocol/">DevTools Protocol Viewer</a>. </description></item> <item><description>Getting Started with DevTools Protocol: https://github.com/aslushnikov/getting-started-with-cdp/blob/master/README.md</description></item> </list> <code> var client = await Page.Context.NewCDPSessionAsync(Page);<br/> await client.SendAsync("Runtime.enable");<br/> client.Event("Animation.animationCreated").OnEvent += (_, _) => Console.WriteLine("Animation created!");<br/> var response = await client.SendAsync("Animation.getPlaybackRate");<br/> var playbackRate = response.Value.GetProperty("playbackRate").GetDouble();<br/> Console.WriteLine("playback rate is " + playbackRate);<br/> await client.SendAsync("Animation.setPlaybackRate", new() { { "playbackRate", playbackRate / 2 } }); </code> </summary> </member> <member name="M:Microsoft.Playwright.ICDPSession.DetachAsync"> <summary> <para> Detaches the CDPSession from the target. Once detached, the CDPSession object won't emit any events and can't be used to send messages. </para> </summary> </member> <member name="M:Microsoft.Playwright.ICDPSession.SendAsync(System.String,System.Collections.Generic.Dictionary{System.String,System.Object})"> <param name="method">Protocol method name.</param> <param name="args">Optional method parameters.</param> </member> <member name="M:Microsoft.Playwright.ICDPSession.Event(System.String)"> <summary><para>Returns an event emitter for the given CDP event name.</para></summary> <param name="eventName">CDP event name.</param> </member> <member name="T:Microsoft.Playwright.ICDPSessionEvent"> <summary> <para> <see cref="T:Microsoft.Playwright.ICDPSessionEvent"/> objects are returned by page via the <see cref="M:Microsoft.Playwright.ICDPSession.Event(System.String)"/> method. </para> <para> Each object represents a named event and allows handling of the event when it is raised. </para> </summary> </member> <member name="T:Microsoft.Playwright.IClock"> <summary> <para> Accurately simulating time-dependent behavior is essential for verifying the correctness of applications. Learn more about <a href="https://playwright.dev/dotnet/docs/clock">clock emulation</a>. </para> <para> Note that clock is installed for the entire <see cref="T:Microsoft.Playwright.IBrowserContext"/>, so the time in all the pages and iframes is controlled by the same clock. </para> </summary> </member> <member name="M:Microsoft.Playwright.IClock.FastForwardAsync(System.Int64)"> <summary> <para> Advance the clock by jumping forward in time. Only fires due timers at most once. This is equivalent to user closing the laptop lid for a while and reopening it later, after given time. </para> <para>**Usage**</para> <code> await page.Clock.FastForwardAsync(1000);<br/> await page.Clock.FastForwardAsync("30:00"); </code> </summary> <param name="ticks"> Time may be the number of milliseconds to advance the clock by or a human-readable string. Valid string formats are "08" for eight seconds, "01:00" for one minute and "02:34:10" for two hours, 34 minutes and ten seconds. </param> </member> <member name="M:Microsoft.Playwright.IClock.FastForwardAsync(System.String)"> <summary> <para> Advance the clock by jumping forward in time. Only fires due timers at most once. This is equivalent to user closing the laptop lid for a while and reopening it later, after given time. </para> <para>**Usage**</para> <code> await page.Clock.FastForwardAsync(1000);<br/> await page.Clock.FastForwardAsync("30:00"); </code> </summary> <param name="ticks"> Time may be the number of milliseconds to advance the clock by or a human-readable string. Valid string formats are "08" for eight seconds, "01:00" for one minute and "02:34:10" for two hours, 34 minutes and ten seconds. </param> </member> <member name="M:Microsoft.Playwright.IClock.InstallAsync(Microsoft.Playwright.ClockInstallOptions)"> <summary> <para>Install fake implementations for the following time-related functions:</para> <list type="bullet"> <item><description><c>Date</c></description></item> <item><description><c>setTimeout</c></description></item> <item><description><c>clearTimeout</c></description></item> <item><description><c>setInterval</c></description></item> <item><description><c>clearInterval</c></description></item> <item><description><c>requestAnimationFrame</c></description></item> <item><description><c>cancelAnimationFrame</c></description></item> <item><description><c>requestIdleCallback</c></description></item> <item><description><c>cancelIdleCallback</c></description></item> <item><description><c>performance</c></description></item> </list> <para> Fake timers are used to manually control the flow of time in tests. They allow you to advance time, fire timers, and control the behavior of time-dependent functions. See <see cref="M:Microsoft.Playwright.IClock.RunForAsync(System.Int64)"/> and <see cref="M:Microsoft.Playwright.IClock.FastForwardAsync(System.Int64)"/> for more information. </para> </summary> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IClock.RunForAsync(System.Int64)"> <summary> <para>Advance the clock, firing all the time-related callbacks.</para> <para>**Usage**</para> <code> await page.Clock.RunForAsync(1000);<br/> await page.Clock.RunForAsync("30:00"); </code> </summary> <param name="ticks"> Time may be the number of milliseconds to advance the clock by or a human-readable string. Valid string formats are "08" for eight seconds, "01:00" for one minute and "02:34:10" for two hours, 34 minutes and ten seconds. </param> </member> <member name="M:Microsoft.Playwright.IClock.RunForAsync(System.String)"> <summary> <para>Advance the clock, firing all the time-related callbacks.</para> <para>**Usage**</para> <code> await page.Clock.RunForAsync(1000);<br/> await page.Clock.RunForAsync("30:00"); </code> </summary> <param name="ticks"> Time may be the number of milliseconds to advance the clock by or a human-readable string. Valid string formats are "08" for eight seconds, "01:00" for one minute and "02:34:10" for two hours, 34 minutes and ten seconds. </param> </member> <member name="M:Microsoft.Playwright.IClock.PauseAtAsync(System.DateTime)"> <summary> <para> Advance the clock by jumping forward in time and pause the time. Once this method is called, no timers are fired unless <see cref="M:Microsoft.Playwright.IClock.RunForAsync(System.Int64)"/>, <see cref="M:Microsoft.Playwright.IClock.FastForwardAsync(System.Int64)"/>, <see cref="M:Microsoft.Playwright.IClock.PauseAtAsync(System.DateTime)"/> or <see cref="M:Microsoft.Playwright.IClock.ResumeAsync"/> is called. </para> <para> Only fires due timers at most once. This is equivalent to user closing the laptop lid for a while and reopening it at the specified time and pausing. </para> <para>**Usage**</para> <code> await page.Clock.PauseAtAsync(DateTime.Parse("2020-02-02"));<br/> await page.Clock.PauseAtAsync("2020-02-02"); </code> <para> For best results, install the clock before navigating the page and set it to a time slightly before the intended test time. This ensures that all timers run normally during page loading, preventing the page from getting stuck. Once the page has fully loaded, you can safely use <see cref="M:Microsoft.Playwright.IClock.PauseAtAsync(System.DateTime)"/> to pause the clock. </para> </summary> <param name="time">Time to pause at.</param> </member> <member name="M:Microsoft.Playwright.IClock.PauseAtAsync(System.String)"> <summary> <para> Advance the clock by jumping forward in time and pause the time. Once this method is called, no timers are fired unless <see cref="M:Microsoft.Playwright.IClock.RunForAsync(System.Int64)"/>, <see cref="M:Microsoft.Playwright.IClock.FastForwardAsync(System.Int64)"/>, <see cref="M:Microsoft.Playwright.IClock.PauseAtAsync(System.DateTime)"/> or <see cref="M:Microsoft.Playwright.IClock.ResumeAsync"/> is called. </para> <para> Only fires due timers at most once. This is equivalent to user closing the laptop lid for a while and reopening it at the specified time and pausing. </para> <para>**Usage**</para> <code> await page.Clock.PauseAtAsync(DateTime.Parse("2020-02-02"));<br/> await page.Clock.PauseAtAsync("2020-02-02"); </code> <para> For best results, install the clock before navigating the page and set it to a time slightly before the intended test time. This ensures that all timers run normally during page loading, preventing the page from getting stuck. Once the page has fully loaded, you can safely use <see cref="M:Microsoft.Playwright.IClock.PauseAtAsync(System.DateTime)"/> to pause the clock. </para> </summary> <param name="time">Time to pause at.</param> </member> <member name="M:Microsoft.Playwright.IClock.ResumeAsync"> <summary> <para> Resumes timers. Once this method is called, time resumes flowing, timers are fired as usual. </para> </summary> </member> <member name="M:Microsoft.Playwright.IClock.SetFixedTimeAsync(System.String)"> <summary> <para> Makes <c>Date.now</c> and <c>new Date()</c> return fixed fake time at all times, keeps all the timers running. </para> <para> Use this method for simple scenarios where you only need to test with a predefined time. For more advanced scenarios, use <see cref="M:Microsoft.Playwright.IClock.InstallAsync(Microsoft.Playwright.ClockInstallOptions)"/> instead. Read docs on <a href="https://playwright.dev/dotnet/docs/clock">clock emulation</a> to learn more. </para> <para>**Usage**</para> <code> await page.Clock.SetFixedTimeAsync(DateTime.Now);<br/> await page.Clock.SetFixedTimeAsync(new DateTime(2020, 2, 2));<br/> await page.Clock.SetFixedTimeAsync("2020-02-02"); </code> </summary> <param name="time">Time to be set.</param> </member> <member name="M:Microsoft.Playwright.IClock.SetFixedTimeAsync(System.DateTime)"> <summary> <para> Makes <c>Date.now</c> and <c>new Date()</c> return fixed fake time at all times, keeps all the timers running. </para> <para> Use this method for simple scenarios where you only need to test with a predefined time. For more advanced scenarios, use <see cref="M:Microsoft.Playwright.IClock.InstallAsync(Microsoft.Playwright.ClockInstallOptions)"/> instead. Read docs on <a href="https://playwright.dev/dotnet/docs/clock">clock emulation</a> to learn more. </para> <para>**Usage**</para> <code> await page.Clock.SetFixedTimeAsync(DateTime.Now);<br/> await page.Clock.SetFixedTimeAsync(new DateTime(2020, 2, 2));<br/> await page.Clock.SetFixedTimeAsync("2020-02-02"); </code> </summary> <param name="time">Time to be set.</param> </member> <member name="M:Microsoft.Playwright.IClock.SetSystemTimeAsync(System.String)"> <summary> <para> Sets system time, but does not trigger any timers. Use this to test how the web page reacts to a time shift, for example switching from summer to winter time, or changing time zones. </para> <para>**Usage**</para> <code> await page.Clock.SetSystemTimeAsync(DateTime.Now);<br/> await page.Clock.SetSystemTimeAsync(new DateTime(2020, 2, 2));<br/> await page.Clock.SetSystemTimeAsync("2020-02-02"); </code> </summary> <param name="time">Time to be set.</param> </member> <member name="M:Microsoft.Playwright.IClock.SetSystemTimeAsync(System.DateTime)"> <summary> <para> Sets system time, but does not trigger any timers. Use this to test how the web page reacts to a time shift, for example switching from summer to winter time, or changing time zones. </para> <para>**Usage**</para> <code> await page.Clock.SetSystemTimeAsync(DateTime.Now);<br/> await page.Clock.SetSystemTimeAsync(new DateTime(2020, 2, 2));<br/> await page.Clock.SetSystemTimeAsync("2020-02-02"); </code> </summary> <param name="time">Time to be set.</param> </member> <member name="T:Microsoft.Playwright.IConsoleMessage"> <summary> <para> <see cref="T:Microsoft.Playwright.IConsoleMessage"/> objects are dispatched by page via the <see cref="E:Microsoft.Playwright.IPage.Console"/> event. For each console message logged in the page there will be corresponding event in the Playwright context. </para> <code> // Listen for all console messages and print them to the standard output.<br/> page.Console += (_, msg) => Console.WriteLine(msg.Text);<br/> <br/> // Listen for all console messages and print errors to the standard output.<br/> page.Console += (_, msg) =><br/> {<br/> if ("error".Equals(msg.Type))<br/> Console.WriteLine("Error text: " + msg.Text);<br/> };<br/> <br/> // Get the next console message<br/> var waitForMessageTask = page.WaitForConsoleMessageAsync();<br/> await page.EvaluateAsync("console.log('hello', 42, { foo: 'bar' });");<br/> var message = await waitForMessageTask;<br/> // Deconstruct console.log arguments<br/> await message.Args.ElementAt(0).JsonValueAsync<string>(); // hello<br/> await message.Args.ElementAt(1).JsonValueAsync<int>(); // 42 </code> </summary> </member> <member name="P:Microsoft.Playwright.IConsoleMessage.Args"> <summary><para>List of arguments passed to a <c>console</c> function call. See also <see cref="E:Microsoft.Playwright.IPage.Console"/>.</para></summary> </member> <member name="P:Microsoft.Playwright.IConsoleMessage.Location"> <summary> <para> URL of the resource followed by 0-based line and column numbers in the resource formatted as <c>URL:line:column</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.IConsoleMessage.Page"> <summary><para>The page that produced this console message, if any.</para></summary> </member> <member name="P:Microsoft.Playwright.IConsoleMessage.Text"> <summary><para>The text of the console message.</para></summary> </member> <member name="P:Microsoft.Playwright.IConsoleMessage.Type"> <summary> <para> One of the following values: <c>'log'</c>, <c>'debug'</c>, <c>'info'</c>, <c>'error'</c>, <c>'warning'</c>, <c>'dir'</c>, <c>'dirxml'</c>, <c>'table'</c>, <c>'trace'</c>, <c>'clear'</c>, <c>'startGroup'</c>, <c>'startGroupCollapsed'</c>, <c>'endGroup'</c>, <c>'assert'</c>, <c>'profile'</c>, <c>'profileEnd'</c>, <c>'count'</c>, <c>'timeEnd'</c>. </para> </summary> </member> <member name="T:Microsoft.Playwright.IDialog"> <summary> <para> <see cref="T:Microsoft.Playwright.IDialog"/> objects are dispatched by page via the <see cref="E:Microsoft.Playwright.IPage.Dialog"/> event. </para> <para>An example of using <c>Dialog</c> class:</para> <code> using Microsoft.Playwright;<br/> using System.Threading.Tasks;<br/> <br/> class DialogExample<br/> {<br/> public static async Task Run()<br/> {<br/> using var playwright = await Playwright.CreateAsync();<br/> await using var browser = await playwright.Chromium.LaunchAsync();<br/> var page = await browser.NewPageAsync();<br/> <br/> page.Dialog += async (_, dialog) =><br/> {<br/> System.Console.WriteLine(dialog.Message);<br/> await dialog.DismissAsync();<br/> };<br/> <br/> await page.EvaluateAsync("alert('1');");<br/> }<br/> } </code> <para> Dialogs are dismissed automatically, unless there is a <see cref="E:Microsoft.Playwright.IPage.Dialog"/> listener. When listener is present, it **must** either <see cref="M:Microsoft.Playwright.IDialog.AcceptAsync(System.String)"/> or <see cref="M:Microsoft.Playwright.IDialog.DismissAsync"/> the dialog - otherwise the page will <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/EventLoop#never_blocking">freeze</a> waiting for the dialog, and actions like click will never finish. </para> </summary> <remarks> <para> Dialogs are dismissed automatically, unless there is a <see cref="E:Microsoft.Playwright.IPage.Dialog"/> listener. When listener is present, it **must** either <see cref="M:Microsoft.Playwright.IDialog.AcceptAsync(System.String)"/> or <see cref="M:Microsoft.Playwright.IDialog.DismissAsync"/> the dialog - otherwise the page will <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/EventLoop#never_blocking">freeze</a> waiting for the dialog, and actions like click will never finish. </para> </remarks> </member> <member name="M:Microsoft.Playwright.IDialog.AcceptAsync(System.String)"> <summary><para>Returns when the dialog has been accepted.</para></summary> <param name="promptText"> A text to enter in prompt. Does not cause any effects if the dialog's <c>type</c> is not prompt. Optional. </param> </member> <member name="P:Microsoft.Playwright.IDialog.DefaultValue"> <summary><para>If dialog is prompt, returns default prompt value. Otherwise, returns empty string.</para></summary> </member> <member name="M:Microsoft.Playwright.IDialog.DismissAsync"> <summary><para>Returns when the dialog has been dismissed.</para></summary> </member> <member name="P:Microsoft.Playwright.IDialog.Message"> <summary><para>A message displayed in the dialog.</para></summary> </member> <member name="P:Microsoft.Playwright.IDialog.Page"> <summary><para>The page that initiated this dialog, if available.</para></summary> </member> <member name="P:Microsoft.Playwright.IDialog.Type"> <summary> <para> Returns dialog's type, can be one of <c>alert</c>, <c>beforeunload</c>, <c>confirm</c> or <c>prompt</c>. </para> </summary> </member> <member name="T:Microsoft.Playwright.IDownload"> <summary> <para> <see cref="T:Microsoft.Playwright.IDownload"/> objects are dispatched by page via the <see cref="E:Microsoft.Playwright.IPage.Download"/> event. </para> <para> All the downloaded files belonging to the browser context are deleted when the browser context is closed. </para> <para> Download event is emitted once the download starts. Download path becomes available once download completes. </para> <code> // Start the task of waiting for the download before clicking<br/> var waitForDownloadTask = page.WaitForDownloadAsync();<br/> await page.GetByText("Download file").ClickAsync();<br/> var download = await waitForDownloadTask;<br/> <br/> // Wait for the download process to complete and save the downloaded file somewhere<br/> await download.SaveAsAsync("/path/to/save/at/" + download.SuggestedFilename); </code> </summary> </member> <member name="M:Microsoft.Playwright.IDownload.CancelAsync"> <summary> <para> Cancels a download. Will not fail if the download is already finished or canceled. Upon successful cancellations, <c>download.failure()</c> would resolve to <c>'canceled'</c>. </para> </summary> </member> <member name="M:Microsoft.Playwright.IDownload.CreateReadStreamAsync"> <summary> <para> Returns a readable stream for a successful download, or throws for a failed/canceled download. </para> </summary> </member> <member name="M:Microsoft.Playwright.IDownload.DeleteAsync"> <summary><para>Deletes the downloaded file. Will wait for the download to finish if necessary.</para></summary> </member> <member name="M:Microsoft.Playwright.IDownload.FailureAsync"> <summary><para>Returns download error if any. Will wait for the download to finish if necessary.</para></summary> </member> <member name="P:Microsoft.Playwright.IDownload.Page"> <summary><para>Get the page that the download belongs to.</para></summary> </member> <member name="M:Microsoft.Playwright.IDownload.PathAsync"> <summary> <para> Returns path to the downloaded file for a successful download, or throws for a failed/canceled download. The method will wait for the download to finish if necessary. The method throws when connected remotely. </para> <para> Note that the download's file name is a random GUID, use <see cref="P:Microsoft.Playwright.IDownload.SuggestedFilename"/> to get suggested file name. </para> </summary> </member> <member name="M:Microsoft.Playwright.IDownload.SaveAsAsync(System.String)"> <summary> <para> Copy the download to a user-specified path. It is safe to call this method while the download is still in progress. Will wait for the download to finish if necessary. </para> <para>**Usage**</para> <code>await download.SaveAsAsync("/path/to/save/at/" + download.SuggestedFilename);</code> </summary> <param name="path">Path where the download should be copied.</param> </member> <member name="P:Microsoft.Playwright.IDownload.SuggestedFilename"> <summary> <para> Returns suggested filename for this download. It is typically computed by the browser from the <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition"><c>Content-Disposition</c></a> response header or the <c>download</c> attribute. See the spec on <a href="https://html.spec.whatwg.org/#downloading-resources">whatwg</a>. Different browsers can use different logic for computing it. </para> </summary> </member> <member name="P:Microsoft.Playwright.IDownload.Url"> <summary><para>Returns downloaded url.</para></summary> </member> <member name="T:Microsoft.Playwright.IElementHandle"> <summary> <para> ElementHandle represents an in-page DOM element. ElementHandles can be created with the <see cref="M:Microsoft.Playwright.IPage.QuerySelectorAsync(System.String,Microsoft.Playwright.PageQuerySelectorOptions)"/> method. </para> <para> The use of ElementHandle is discouraged, use <see cref="T:Microsoft.Playwright.ILocator"/> objects and web-first assertions instead. </para> <code> var handle = await page.QuerySelectorAsync("a");<br/> await handle.ClickAsync(); </code> <para> ElementHandle prevents DOM element from garbage collection unless the handle is disposed with <see cref="!:IJSHandle.DisposeAsync"/>. ElementHandles are auto-disposed when their origin frame gets navigated. </para> <para> ElementHandle instances can be used as an argument in <see cref="M:Microsoft.Playwright.IPage.EvalOnSelectorAsync(System.String,System.String,System.Object)"/> and <see cref="M:Microsoft.Playwright.IPage.EvaluateAsync(System.String,System.Object)"/> methods. </para> <para> The difference between the <see cref="T:Microsoft.Playwright.ILocator"/> and ElementHandle is that the ElementHandle points to a particular element, while <see cref="T:Microsoft.Playwright.ILocator"/> captures the logic of how to retrieve an element. </para> <para> In the example below, handle points to a particular DOM element on page. If that element changes text or is used by React to render an entirely different component, handle is still pointing to that very DOM element. This can lead to unexpected behaviors. </para> <code> var handle = await page.QuerySelectorAsync("text=Submit");<br/> await handle.HoverAsync();<br/> await handle.ClickAsync(); </code> <para> With the locator, every time the <c>element</c> is used, up-to-date DOM element is located in the page using the selector. So in the snippet below, underlying DOM element is going to be located twice. </para> <code> var locator = page.GetByText("Submit");<br/> await locator.HoverAsync();<br/> await locator.ClickAsync(); </code> </summary> <remarks> Inherits from <see cref="T:Microsoft.Playwright.IJSHandle"/> <para> The use of ElementHandle is discouraged, use <see cref="T:Microsoft.Playwright.ILocator"/> objects and web-first assertions instead. </para> </remarks> </member> <member name="M:Microsoft.Playwright.IElementHandle.BoundingBoxAsync"> <summary> <para> This method returns the bounding box of the element, or <c>null</c> if the element is not visible. The bounding box is calculated relative to the main frame viewport - which is usually the same as the browser window. </para> <para> Scrolling affects the returned bounding box, similarly to <a href="https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect">Element.getBoundingClientRect</a>. That means <c>x</c> and/or <c>y</c> may be negative. </para> <para> Elements from child frames return the bounding box relative to the main frame, unlike the <a href="https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect">Element.getBoundingClientRect</a>. </para> <para> Assuming the page is static, it is safe to use bounding box coordinates to perform input. For example, the following snippet should click the center of the element. </para> <para>**Usage**</para> <code> var box = await elementHandle.BoundingBoxAsync();<br/> await page.Mouse.ClickAsync(box.X + box.Width / 2, box.Y + box.Height / 2); </code> </summary> </member> <member name="M:Microsoft.Playwright.IElementHandle.CheckAsync(Microsoft.Playwright.ElementHandleCheckOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.CheckAsync(Microsoft.Playwright.LocatorCheckOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para>This method checks the element by performing the following steps:</para> <list type="ordinal"> <item><description> Ensure that element is a checkbox or a radio input. If not, this method throws. If the element is already checked, this method returns immediately. </description></item> <item><description> Wait for <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks on the element, unless <see cref="M:Microsoft.Playwright.IElementHandle.CheckAsync(Microsoft.Playwright.ElementHandleCheckOptions)"/> option is set. </description></item> <item><description>Scroll the element into view if needed.</description></item> <item><description>Use <see cref="P:Microsoft.Playwright.IPage.Mouse"/> to click in the center of the element.</description></item> <item><description>Ensure that the element is now checked. If not, this method throws.</description></item> </list> <para> If the element is detached from the DOM at any moment during the action, this method throws. </para> <para> When all steps combined have not finished during the specified <see cref="M:Microsoft.Playwright.IElementHandle.CheckAsync(Microsoft.Playwright.ElementHandleCheckOptions)"/>, this method throws a <see cref="T:System.TimeoutException"/>. Passing zero timeout disables this. </para> </summary> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IElementHandle.ClickAsync(Microsoft.Playwright.ElementHandleClickOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.ClickAsync(Microsoft.Playwright.LocatorClickOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para>This method clicks the element by performing the following steps:</para> <list type="ordinal"> <item><description> Wait for <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks on the element, unless <see cref="M:Microsoft.Playwright.IElementHandle.ClickAsync(Microsoft.Playwright.ElementHandleClickOptions)"/> option is set. </description></item> <item><description>Scroll the element into view if needed.</description></item> <item><description> Use <see cref="P:Microsoft.Playwright.IPage.Mouse"/> to click in the center of the element, or the specified <see cref="M:Microsoft.Playwright.IElementHandle.ClickAsync(Microsoft.Playwright.ElementHandleClickOptions)"/>. </description></item> <item><description> Wait for initiated navigations to either succeed or fail, unless <see cref="M:Microsoft.Playwright.IElementHandle.ClickAsync(Microsoft.Playwright.ElementHandleClickOptions)"/> option is set. </description></item> </list> <para> If the element is detached from the DOM at any moment during the action, this method throws. </para> <para> When all steps combined have not finished during the specified <see cref="M:Microsoft.Playwright.IElementHandle.ClickAsync(Microsoft.Playwright.ElementHandleClickOptions)"/>, this method throws a <see cref="T:System.TimeoutException"/>. Passing zero timeout disables this. </para> </summary> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IElementHandle.ContentFrameAsync"> <summary> <para> Returns the content frame for element handles referencing iframe nodes, or <c>null</c> otherwise </para> </summary> </member> <member name="M:Microsoft.Playwright.IElementHandle.DblClickAsync(Microsoft.Playwright.ElementHandleDblClickOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.DblClickAsync(Microsoft.Playwright.LocatorDblClickOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para>This method double clicks the element by performing the following steps:</para> <list type="ordinal"> <item><description> Wait for <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks on the element, unless <see cref="M:Microsoft.Playwright.IElementHandle.DblClickAsync(Microsoft.Playwright.ElementHandleDblClickOptions)"/> option is set. </description></item> <item><description>Scroll the element into view if needed.</description></item> <item><description> Use <see cref="P:Microsoft.Playwright.IPage.Mouse"/> to double click in the center of the element, or the specified <see cref="M:Microsoft.Playwright.IElementHandle.DblClickAsync(Microsoft.Playwright.ElementHandleDblClickOptions)"/>. </description></item> </list> <para> If the element is detached from the DOM at any moment during the action, this method throws. </para> <para> When all steps combined have not finished during the specified <see cref="M:Microsoft.Playwright.IElementHandle.DblClickAsync(Microsoft.Playwright.ElementHandleDblClickOptions)"/>, this method throws a <see cref="T:System.TimeoutException"/>. Passing zero timeout disables this. </para> <para> <c>elementHandle.dblclick()</c> dispatches two <c>click</c> events and a single <c>dblclick</c> event. </para> </summary> <remarks> <para> <c>elementHandle.dblclick()</c> dispatches two <c>click</c> events and a single <c>dblclick</c> event. </para> </remarks> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IElementHandle.DispatchEventAsync(System.String,System.Object)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.DispatchEventAsync(System.String,System.Object,Microsoft.Playwright.LocatorDispatchEventOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para> The snippet below dispatches the <c>click</c> event on the element. Regardless of the visibility state of the element, <c>click</c> is dispatched. This is equivalent to calling <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/click">element.click()</a>. </para> <para>**Usage**</para> <code>await elementHandle.DispatchEventAsync("click");</code> <para> Under the hood, it creates an instance of an event based on the given <see cref="M:Microsoft.Playwright.IElementHandle.DispatchEventAsync(System.String,System.Object)"/>, initializes it with <see cref="M:Microsoft.Playwright.IElementHandle.DispatchEventAsync(System.String,System.Object)"/> properties and dispatches it on the element. Events are <c>composed</c>, <c>cancelable</c> and bubble by default. </para> <para> Since <see cref="M:Microsoft.Playwright.IElementHandle.DispatchEventAsync(System.String,System.Object)"/> is event-specific, please refer to the events documentation for the lists of initial properties: </para> <list type="bullet"> <item><description><a href="https://developer.mozilla.org/en-US/docs/Web/API/DeviceMotionEvent/DeviceMotionEvent">DeviceMotionEvent</a></description></item> <item><description><a href="https://developer.mozilla.org/en-US/docs/Web/API/DeviceOrientationEvent/DeviceOrientationEvent">DeviceOrientationEvent</a></description></item> <item><description><a href="https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/DragEvent">DragEvent</a></description></item> <item><description><a href="https://developer.mozilla.org/en-US/docs/Web/API/Event/Event">Event</a></description></item> <item><description><a href="https://developer.mozilla.org/en-US/docs/Web/API/FocusEvent/FocusEvent">FocusEvent</a></description></item> <item><description><a href="https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/KeyboardEvent">KeyboardEvent</a></description></item> <item><description><a href="https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/MouseEvent">MouseEvent</a></description></item> <item><description><a href="https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/PointerEvent">PointerEvent</a></description></item> <item><description><a href="https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/TouchEvent">TouchEvent</a></description></item> <item><description><a href="https://developer.mozilla.org/en-US/docs/Web/API/WheelEvent/WheelEvent">WheelEvent</a></description></item> </list> <para> You can also specify <c>JSHandle</c> as the property value if you want live objects to be passed into the event: </para> <code> var dataTransfer = await page.EvaluateHandleAsync("() => new DataTransfer()");<br/> await elementHandle.DispatchEventAsync("dragstart", new Dictionary<string, object><br/> {<br/> { "dataTransfer", dataTransfer }<br/> }); </code> </summary> <param name="type">DOM event type: <c>"click"</c>, <c>"dragstart"</c>, etc.</param> <param name="eventInit">Optional event-specific initialization properties.</param> </member> <member name="M:Microsoft.Playwright.IElementHandle.EvalOnSelectorAsync``1(System.String,System.String,System.Object)"> <summary> <para> This method does not wait for the element to pass actionability checks and therefore can lead to the flaky tests. Use <see cref="M:Microsoft.Playwright.ILocator.EvaluateAsync(System.String,System.Object,Microsoft.Playwright.LocatorEvaluateOptions)"/>, other <see cref="T:Microsoft.Playwright.ILocator"/> helper methods or web-first assertions instead. </para> <para>Returns the return value of <see cref="M:Microsoft.Playwright.IElementHandle.EvalOnSelectorAsync(System.String,System.String,System.Object)"/>.</para> <para> The method finds an element matching the specified selector in the <c>ElementHandle</c>s subtree and passes it as a first argument to <see cref="M:Microsoft.Playwright.IElementHandle.EvalOnSelectorAsync(System.String,System.String,System.Object)"/>. If no elements match the selector, the method throws an error. </para> <para> If <see cref="M:Microsoft.Playwright.IElementHandle.EvalOnSelectorAsync(System.String,System.String,System.Object)"/> returns a <see cref="T:System.Threading.Tasks.Task"/>, then <see cref="M:Microsoft.Playwright.IElementHandle.EvalOnSelectorAsync(System.String,System.String,System.Object)"/> would wait for the promise to resolve and return its value. </para> <para>**Usage**</para> <code> var tweetHandle = await page.QuerySelectorAsync(".tweet");<br/> Assert.AreEqual("100", await tweetHandle.EvalOnSelectorAsync(".like", "node => node.innerText"));<br/> Assert.AreEqual("10", await tweetHandle.EvalOnSelectorAsync(".retweets", "node => node.innerText")); </code> </summary> <param name="selector">A selector to query for.</param> <param name="expression"> JavaScript expression to be evaluated in the browser context. If the expression evaluates to a function, the function is automatically invoked. </param> <param name="arg">Optional argument to pass to <see cref="M:Microsoft.Playwright.IElementHandle.EvalOnSelectorAsync(System.String,System.String,System.Object)"/>.</param> </member> <member name="M:Microsoft.Playwright.IElementHandle.EvalOnSelectorAllAsync``1(System.String,System.String,System.Object)"> <summary> <para> In most cases, <see cref="M:Microsoft.Playwright.ILocator.EvaluateAllAsync``1(System.String,System.Object)"/>, other <see cref="T:Microsoft.Playwright.ILocator"/> helper methods and web-first assertions do a better job. </para> <para>Returns the return value of <see cref="M:Microsoft.Playwright.IElementHandle.EvalOnSelectorAllAsync``1(System.String,System.String,System.Object)"/>.</para> <para> The method finds all elements matching the specified selector in the <c>ElementHandle</c>'s subtree and passes an array of matched elements as a first argument to <see cref="M:Microsoft.Playwright.IElementHandle.EvalOnSelectorAllAsync``1(System.String,System.String,System.Object)"/>. </para> <para> If <see cref="M:Microsoft.Playwright.IElementHandle.EvalOnSelectorAllAsync``1(System.String,System.String,System.Object)"/> returns a <see cref="T:System.Threading.Tasks.Task"/>, then <see cref="M:Microsoft.Playwright.IElementHandle.EvalOnSelectorAllAsync``1(System.String,System.String,System.Object)"/> would wait for the promise to resolve and return its value. </para> <para>**Usage**</para> <code> var feedHandle = await page.QuerySelectorAsync(".feed");<br/> Assert.AreEqual(new [] { "Hello!", "Hi!" }, await feedHandle.EvalOnSelectorAllAsync<string[]>(".tweet", "nodes => nodes.map(n => n.innerText)")); </code> </summary> <param name="selector">A selector to query for.</param> <param name="expression"> JavaScript expression to be evaluated in the browser context. If the expression evaluates to a function, the function is automatically invoked. </param> <param name="arg">Optional argument to pass to <see cref="M:Microsoft.Playwright.IElementHandle.EvalOnSelectorAllAsync``1(System.String,System.String,System.Object)"/>.</param> </member> <member name="M:Microsoft.Playwright.IElementHandle.FillAsync(System.String,Microsoft.Playwright.ElementHandleFillOptions)"> <summary> <para>Use locator-based <see cref="M:Microsoft.Playwright.ILocator.FillAsync(System.String,Microsoft.Playwright.LocatorFillOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>.</para> <para> This method waits for <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks, focuses the element, fills it and triggers an <c>input</c> event after filling. Note that you can pass an empty string to clear the input field. </para> <para> If the target element is not an <c><input></c>, <c><textarea></c> or <c>[contenteditable]</c> element, this method throws an error. However, if the element is inside the <c><label></c> element that has an associated <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control">control</a>, the control will be filled instead. </para> <para>To send fine-grained keyboard events, use <see cref="M:Microsoft.Playwright.ILocator.PressSequentiallyAsync(System.String,Microsoft.Playwright.LocatorPressSequentiallyOptions)"/>.</para> </summary> <param name="value"> Value to set for the <c><input></c>, <c><textarea></c> or <c>[contenteditable]</c> element. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IElementHandle.FocusAsync"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.FocusAsync(Microsoft.Playwright.LocatorFocusOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para> Calls <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus">focus</a> on the element. </para> </summary> </member> <member name="M:Microsoft.Playwright.IElementHandle.GetAttributeAsync(System.String)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.GetAttributeAsync(System.String,Microsoft.Playwright.LocatorGetAttributeOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para>Returns element attribute value.</para> </summary> <param name="name">Attribute name to get the value for.</param> </member> <member name="M:Microsoft.Playwright.IElementHandle.HoverAsync(Microsoft.Playwright.ElementHandleHoverOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.HoverAsync(Microsoft.Playwright.LocatorHoverOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para>This method hovers over the element by performing the following steps:</para> <list type="ordinal"> <item><description> Wait for <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks on the element, unless <see cref="M:Microsoft.Playwright.IElementHandle.HoverAsync(Microsoft.Playwright.ElementHandleHoverOptions)"/> option is set. </description></item> <item><description>Scroll the element into view if needed.</description></item> <item><description> Use <see cref="P:Microsoft.Playwright.IPage.Mouse"/> to hover over the center of the element, or the specified <see cref="M:Microsoft.Playwright.IElementHandle.HoverAsync(Microsoft.Playwright.ElementHandleHoverOptions)"/>. </description></item> </list> <para> If the element is detached from the DOM at any moment during the action, this method throws. </para> <para> When all steps combined have not finished during the specified <see cref="M:Microsoft.Playwright.IElementHandle.HoverAsync(Microsoft.Playwright.ElementHandleHoverOptions)"/>, this method throws a <see cref="T:System.TimeoutException"/>. Passing zero timeout disables this. </para> </summary> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IElementHandle.InnerHTMLAsync"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.InnerHTMLAsync(Microsoft.Playwright.LocatorInnerHTMLOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para>Returns the <c>element.innerHTML</c>.</para> </summary> </member> <member name="M:Microsoft.Playwright.IElementHandle.InnerTextAsync"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.InnerTextAsync(Microsoft.Playwright.LocatorInnerTextOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para>Returns the <c>element.innerText</c>.</para> </summary> </member> <member name="M:Microsoft.Playwright.IElementHandle.InputValueAsync(Microsoft.Playwright.ElementHandleInputValueOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.InputValueAsync(Microsoft.Playwright.LocatorInputValueOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para> Returns <c>input.value</c> for the selected <c><input></c> or <c><textarea></c> or <c><select></c> element. </para> <para> Throws for non-input elements. However, if the element is inside the <c><label></c> element that has an associated <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control">control</a>, returns the value of the control. </para> </summary> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IElementHandle.IsCheckedAsync"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.IsCheckedAsync(Microsoft.Playwright.LocatorIsCheckedOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para> Returns whether the element is checked. Throws if the element is not a checkbox or radio input. </para> </summary> </member> <member name="M:Microsoft.Playwright.IElementHandle.IsDisabledAsync"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.IsDisabledAsync(Microsoft.Playwright.LocatorIsDisabledOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para>Returns whether the element is disabled, the opposite of <a href="https://playwright.dev/dotnet/docs/actionability#enabled">enabled</a>.</para> </summary> </member> <member name="M:Microsoft.Playwright.IElementHandle.IsEditableAsync"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.IsEditableAsync(Microsoft.Playwright.LocatorIsEditableOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para>Returns whether the element is <a href="https://playwright.dev/dotnet/docs/actionability#editable">editable</a>.</para> </summary> </member> <member name="M:Microsoft.Playwright.IElementHandle.IsEnabledAsync"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.IsEnabledAsync(Microsoft.Playwright.LocatorIsEnabledOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para>Returns whether the element is <a href="https://playwright.dev/dotnet/docs/actionability#enabled">enabled</a>.</para> </summary> </member> <member name="M:Microsoft.Playwright.IElementHandle.IsHiddenAsync"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.IsHiddenAsync(Microsoft.Playwright.LocatorIsHiddenOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para>Returns whether the element is hidden, the opposite of <a href="https://playwright.dev/dotnet/docs/actionability#visible">visible</a>.</para> </summary> </member> <member name="M:Microsoft.Playwright.IElementHandle.IsVisibleAsync"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.IsVisibleAsync(Microsoft.Playwright.LocatorIsVisibleOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para>Returns whether the element is <a href="https://playwright.dev/dotnet/docs/actionability#visible">visible</a>.</para> </summary> </member> <member name="M:Microsoft.Playwright.IElementHandle.OwnerFrameAsync"> <summary><para>Returns the frame containing the given element.</para></summary> </member> <member name="M:Microsoft.Playwright.IElementHandle.PressAsync(System.String,Microsoft.Playwright.ElementHandlePressOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.PressAsync(System.String,Microsoft.Playwright.LocatorPressOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para>Focuses the element, and then uses <see cref="M:Microsoft.Playwright.IKeyboard.DownAsync(System.String)"/> and <see cref="M:Microsoft.Playwright.IKeyboard.UpAsync(System.String)"/>.</para> <para> <see cref="M:Microsoft.Playwright.IElementHandle.PressAsync(System.String,Microsoft.Playwright.ElementHandlePressOptions)"/> can specify the intended <a href="https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key">keyboardEvent.key</a> value or a single character to generate the text for. A superset of the <see cref="M:Microsoft.Playwright.IElementHandle.PressAsync(System.String,Microsoft.Playwright.ElementHandlePressOptions)"/> values can be found <a href="https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values">here</a>. Examples of the keys are: </para> <para> <c>F1</c> - <c>F12</c>, <c>Digit0</c>- <c>Digit9</c>, <c>KeyA</c>- <c>KeyZ</c>, <c>Backquote</c>, <c>Minus</c>, <c>Equal</c>, <c>Backslash</c>, <c>Backspace</c>, <c>Tab</c>, <c>Delete</c>, <c>Escape</c>, <c>ArrowDown</c>, <c>End</c>, <c>Enter</c>, <c>Home</c>, <c>Insert</c>, <c>PageDown</c>, <c>PageUp</c>, <c>ArrowRight</c>, <c>ArrowUp</c>, etc. </para> <para> Following modification shortcuts are also supported: <c>Shift</c>, <c>Control</c>, <c>Alt</c>, <c>Meta</c>, <c>ShiftLeft</c>, <c>ControlOrMeta</c>. </para> <para> Holding down <c>Shift</c> will type the text that corresponds to the <see cref="M:Microsoft.Playwright.IElementHandle.PressAsync(System.String,Microsoft.Playwright.ElementHandlePressOptions)"/> in the upper case. </para> <para> If <see cref="M:Microsoft.Playwright.IElementHandle.PressAsync(System.String,Microsoft.Playwright.ElementHandlePressOptions)"/> is a single character, it is case-sensitive, so the values <c>a</c> and <c>A</c> will generate different respective texts. </para> <para> Shortcuts such as <c>key: "Control+o"</c>, <c>key: "Control++</c> or <c>key: "Control+Shift+T"</c> are supported as well. When specified with the modifier, modifier is pressed and being held while the subsequent key is being pressed. </para> </summary> <param name="key"> Name of the key to press or a character to generate, such as <c>ArrowLeft</c> or <c>a</c>. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IElementHandle.QuerySelectorAsync(System.String)"> <summary> <para>Use locator-based <see cref="M:Microsoft.Playwright.IPage.Locator(System.String,Microsoft.Playwright.PageLocatorOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>.</para> <para> The method finds an element matching the specified selector in the <c>ElementHandle</c>'s subtree. If no elements match the selector, returns <c>null</c>. </para> </summary> <param name="selector">A selector to query for.</param> </member> <member name="M:Microsoft.Playwright.IElementHandle.QuerySelectorAllAsync(System.String)"> <summary> <para>Use locator-based <see cref="M:Microsoft.Playwright.IPage.Locator(System.String,Microsoft.Playwright.PageLocatorOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>.</para> <para> The method finds all elements matching the specified selector in the <c>ElementHandle</c>s subtree. If no elements match the selector, returns empty array. </para> </summary> <param name="selector">A selector to query for.</param> </member> <member name="M:Microsoft.Playwright.IElementHandle.ScreenshotAsync(Microsoft.Playwright.ElementHandleScreenshotOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.ScreenshotAsync(Microsoft.Playwright.LocatorScreenshotOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para> This method captures a screenshot of the page, clipped to the size and position of this particular element. If the element is covered by other elements, it will not be actually visible on the screenshot. If the element is a scrollable container, only the currently scrolled content will be visible on the screenshot. </para> <para> This method waits for the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks, then scrolls element into view before taking a screenshot. If the element is detached from DOM, the method throws an error. </para> <para>Returns the buffer with the captured screenshot.</para> </summary> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IElementHandle.ScrollIntoViewIfNeededAsync(Microsoft.Playwright.ElementHandleScrollIntoViewIfNeededOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.ScrollIntoViewIfNeededAsync(Microsoft.Playwright.LocatorScrollIntoViewIfNeededOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para> This method waits for <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks, then tries to scroll element into view, unless it is completely visible as defined by <a href="https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API">IntersectionObserver</a>'s <c>ratio</c>. </para> <para> Throws when <c>elementHandle</c> does not point to an element <a href="https://developer.mozilla.org/en-US/docs/Web/API/Node/isConnected">connected</a> to a Document or a ShadowRoot. </para> <para> See <a href="https://playwright.dev/dotnet/docs/input#scrolling">scrolling</a> for alternative ways to scroll. </para> </summary> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IElementHandle.SelectOptionAsync(System.String,Microsoft.Playwright.ElementHandleSelectOptionOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.SelectOptionAsync(System.String,Microsoft.Playwright.LocatorSelectOptionOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para> This method waits for <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks, waits until all specified options are present in the <c><select></c> element and selects these options. </para> <para> If the target element is not a <c><select></c> element, this method throws an error. However, if the element is inside the <c><label></c> element that has an associated <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control">control</a>, the control will be used instead. </para> <para>Returns the array of option values that have been successfully selected.</para> <para> Triggers a <c>change</c> and <c>input</c> event once all the provided options have been selected. </para> <para>**Usage**</para> <code> // Single selection matching the value or label<br/> await handle.SelectOptionAsync(new[] { "blue" });<br/> // single selection matching the label<br/> await handle.SelectOptionAsync(new[] { new SelectOptionValue() { Label = "blue" } });<br/> // multiple selection<br/> await handle.SelectOptionAsync(new[] { "red", "green", "blue" });<br/> // multiple selection for blue, red and second option<br/> await handle.SelectOptionAsync(new[] {<br/> new SelectOptionValue() { Label = "blue" },<br/> new SelectOptionValue() { Index = 2 },<br/> new SelectOptionValue() { Value = "red" }}); </code> </summary> <param name="values"> Options to select. If the <c><select></c> has the <c>multiple</c> attribute, all matching options are selected, otherwise only the first option matching one of the passed options is selected. String values are matching both values and labels. Option is considered matching if all specified properties match. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IElementHandle.SelectOptionAsync(Microsoft.Playwright.IElementHandle,Microsoft.Playwright.ElementHandleSelectOptionOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.SelectOptionAsync(System.String,Microsoft.Playwright.LocatorSelectOptionOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para> This method waits for <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks, waits until all specified options are present in the <c><select></c> element and selects these options. </para> <para> If the target element is not a <c><select></c> element, this method throws an error. However, if the element is inside the <c><label></c> element that has an associated <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control">control</a>, the control will be used instead. </para> <para>Returns the array of option values that have been successfully selected.</para> <para> Triggers a <c>change</c> and <c>input</c> event once all the provided options have been selected. </para> <para>**Usage**</para> <code> // Single selection matching the value or label<br/> await handle.SelectOptionAsync(new[] { "blue" });<br/> // single selection matching the label<br/> await handle.SelectOptionAsync(new[] { new SelectOptionValue() { Label = "blue" } });<br/> // multiple selection<br/> await handle.SelectOptionAsync(new[] { "red", "green", "blue" });<br/> // multiple selection for blue, red and second option<br/> await handle.SelectOptionAsync(new[] {<br/> new SelectOptionValue() { Label = "blue" },<br/> new SelectOptionValue() { Index = 2 },<br/> new SelectOptionValue() { Value = "red" }}); </code> </summary> <param name="values"> Options to select. If the <c><select></c> has the <c>multiple</c> attribute, all matching options are selected, otherwise only the first option matching one of the passed options is selected. String values are matching both values and labels. Option is considered matching if all specified properties match. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IElementHandle.SelectOptionAsync(System.Collections.Generic.IEnumerable{System.String},Microsoft.Playwright.ElementHandleSelectOptionOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.SelectOptionAsync(System.String,Microsoft.Playwright.LocatorSelectOptionOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para> This method waits for <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks, waits until all specified options are present in the <c><select></c> element and selects these options. </para> <para> If the target element is not a <c><select></c> element, this method throws an error. However, if the element is inside the <c><label></c> element that has an associated <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control">control</a>, the control will be used instead. </para> <para>Returns the array of option values that have been successfully selected.</para> <para> Triggers a <c>change</c> and <c>input</c> event once all the provided options have been selected. </para> <para>**Usage**</para> <code> // Single selection matching the value or label<br/> await handle.SelectOptionAsync(new[] { "blue" });<br/> // single selection matching the label<br/> await handle.SelectOptionAsync(new[] { new SelectOptionValue() { Label = "blue" } });<br/> // multiple selection<br/> await handle.SelectOptionAsync(new[] { "red", "green", "blue" });<br/> // multiple selection for blue, red and second option<br/> await handle.SelectOptionAsync(new[] {<br/> new SelectOptionValue() { Label = "blue" },<br/> new SelectOptionValue() { Index = 2 },<br/> new SelectOptionValue() { Value = "red" }}); </code> </summary> <param name="values"> Options to select. If the <c><select></c> has the <c>multiple</c> attribute, all matching options are selected, otherwise only the first option matching one of the passed options is selected. String values are matching both values and labels. Option is considered matching if all specified properties match. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IElementHandle.SelectOptionAsync(Microsoft.Playwright.SelectOptionValue,Microsoft.Playwright.ElementHandleSelectOptionOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.SelectOptionAsync(System.String,Microsoft.Playwright.LocatorSelectOptionOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para> This method waits for <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks, waits until all specified options are present in the <c><select></c> element and selects these options. </para> <para> If the target element is not a <c><select></c> element, this method throws an error. However, if the element is inside the <c><label></c> element that has an associated <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control">control</a>, the control will be used instead. </para> <para>Returns the array of option values that have been successfully selected.</para> <para> Triggers a <c>change</c> and <c>input</c> event once all the provided options have been selected. </para> <para>**Usage**</para> <code> // Single selection matching the value or label<br/> await handle.SelectOptionAsync(new[] { "blue" });<br/> // single selection matching the label<br/> await handle.SelectOptionAsync(new[] { new SelectOptionValue() { Label = "blue" } });<br/> // multiple selection<br/> await handle.SelectOptionAsync(new[] { "red", "green", "blue" });<br/> // multiple selection for blue, red and second option<br/> await handle.SelectOptionAsync(new[] {<br/> new SelectOptionValue() { Label = "blue" },<br/> new SelectOptionValue() { Index = 2 },<br/> new SelectOptionValue() { Value = "red" }}); </code> </summary> <param name="values"> Options to select. If the <c><select></c> has the <c>multiple</c> attribute, all matching options are selected, otherwise only the first option matching one of the passed options is selected. String values are matching both values and labels. Option is considered matching if all specified properties match. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IElementHandle.SelectOptionAsync(System.Collections.Generic.IEnumerable{Microsoft.Playwright.IElementHandle},Microsoft.Playwright.ElementHandleSelectOptionOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.SelectOptionAsync(System.String,Microsoft.Playwright.LocatorSelectOptionOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para> This method waits for <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks, waits until all specified options are present in the <c><select></c> element and selects these options. </para> <para> If the target element is not a <c><select></c> element, this method throws an error. However, if the element is inside the <c><label></c> element that has an associated <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control">control</a>, the control will be used instead. </para> <para>Returns the array of option values that have been successfully selected.</para> <para> Triggers a <c>change</c> and <c>input</c> event once all the provided options have been selected. </para> <para>**Usage**</para> <code> // Single selection matching the value or label<br/> await handle.SelectOptionAsync(new[] { "blue" });<br/> // single selection matching the label<br/> await handle.SelectOptionAsync(new[] { new SelectOptionValue() { Label = "blue" } });<br/> // multiple selection<br/> await handle.SelectOptionAsync(new[] { "red", "green", "blue" });<br/> // multiple selection for blue, red and second option<br/> await handle.SelectOptionAsync(new[] {<br/> new SelectOptionValue() { Label = "blue" },<br/> new SelectOptionValue() { Index = 2 },<br/> new SelectOptionValue() { Value = "red" }}); </code> </summary> <param name="values"> Options to select. If the <c><select></c> has the <c>multiple</c> attribute, all matching options are selected, otherwise only the first option matching one of the passed options is selected. String values are matching both values and labels. Option is considered matching if all specified properties match. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IElementHandle.SelectOptionAsync(System.Collections.Generic.IEnumerable{Microsoft.Playwright.SelectOptionValue},Microsoft.Playwright.ElementHandleSelectOptionOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.SelectOptionAsync(System.String,Microsoft.Playwright.LocatorSelectOptionOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para> This method waits for <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks, waits until all specified options are present in the <c><select></c> element and selects these options. </para> <para> If the target element is not a <c><select></c> element, this method throws an error. However, if the element is inside the <c><label></c> element that has an associated <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control">control</a>, the control will be used instead. </para> <para>Returns the array of option values that have been successfully selected.</para> <para> Triggers a <c>change</c> and <c>input</c> event once all the provided options have been selected. </para> <para>**Usage**</para> <code> // Single selection matching the value or label<br/> await handle.SelectOptionAsync(new[] { "blue" });<br/> // single selection matching the label<br/> await handle.SelectOptionAsync(new[] { new SelectOptionValue() { Label = "blue" } });<br/> // multiple selection<br/> await handle.SelectOptionAsync(new[] { "red", "green", "blue" });<br/> // multiple selection for blue, red and second option<br/> await handle.SelectOptionAsync(new[] {<br/> new SelectOptionValue() { Label = "blue" },<br/> new SelectOptionValue() { Index = 2 },<br/> new SelectOptionValue() { Value = "red" }}); </code> </summary> <param name="values"> Options to select. If the <c><select></c> has the <c>multiple</c> attribute, all matching options are selected, otherwise only the first option matching one of the passed options is selected. String values are matching both values and labels. Option is considered matching if all specified properties match. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IElementHandle.SelectTextAsync(Microsoft.Playwright.ElementHandleSelectTextOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.SelectTextAsync(Microsoft.Playwright.LocatorSelectTextOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para> This method waits for <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks, then focuses the element and selects all its text content. </para> <para> If the element is inside the <c><label></c> element that has an associated <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control">control</a>, focuses and selects text in the control instead. </para> </summary> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IElementHandle.SetCheckedAsync(System.Boolean,Microsoft.Playwright.ElementHandleSetCheckedOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.SetCheckedAsync(System.Boolean,Microsoft.Playwright.LocatorSetCheckedOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para>This method checks or unchecks an element by performing the following steps:</para> <list type="ordinal"> <item><description>Ensure that element is a checkbox or a radio input. If not, this method throws.</description></item> <item><description>If the element already has the right checked state, this method returns immediately.</description></item> <item><description> Wait for <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks on the matched element, unless <see cref="M:Microsoft.Playwright.IElementHandle.SetCheckedAsync(System.Boolean,Microsoft.Playwright.ElementHandleSetCheckedOptions)"/> option is set. If the element is detached during the checks, the whole action is retried. </description></item> <item><description>Scroll the element into view if needed.</description></item> <item><description>Use <see cref="P:Microsoft.Playwright.IPage.Mouse"/> to click in the center of the element.</description></item> <item><description>Ensure that the element is now checked or unchecked. If not, this method throws.</description></item> </list> <para> When all steps combined have not finished during the specified <see cref="M:Microsoft.Playwright.IElementHandle.SetCheckedAsync(System.Boolean,Microsoft.Playwright.ElementHandleSetCheckedOptions)"/>, this method throws a <see cref="T:System.TimeoutException"/>. Passing zero timeout disables this. </para> </summary> <param name="checkedState">Whether to check or uncheck the checkbox.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IElementHandle.SetInputFilesAsync(System.String,Microsoft.Playwright.ElementHandleSetInputFilesOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.SetInputFilesAsync(System.String,Microsoft.Playwright.LocatorSetInputFilesOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para> Sets the value of the file input to these file paths or files. If some of the <c>filePaths</c> are relative paths, then they are resolved relative to the current working directory. For empty array, clears the selected files. For inputs with a <c>[webkitdirectory]</c> attribute, only a single directory path is supported. </para> <para> This method expects <see cref="T:Microsoft.Playwright.IElementHandle"/> to point to an <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input">input element</a>. However, if the element is inside the <c><label></c> element that has an associated <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control">control</a>, targets the control instead. </para> </summary> <param name="files"> </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IElementHandle.SetInputFilesAsync(System.Collections.Generic.IEnumerable{System.String},Microsoft.Playwright.ElementHandleSetInputFilesOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.SetInputFilesAsync(System.String,Microsoft.Playwright.LocatorSetInputFilesOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para> Sets the value of the file input to these file paths or files. If some of the <c>filePaths</c> are relative paths, then they are resolved relative to the current working directory. For empty array, clears the selected files. For inputs with a <c>[webkitdirectory]</c> attribute, only a single directory path is supported. </para> <para> This method expects <see cref="T:Microsoft.Playwright.IElementHandle"/> to point to an <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input">input element</a>. However, if the element is inside the <c><label></c> element that has an associated <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control">control</a>, targets the control instead. </para> </summary> <param name="files"> </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IElementHandle.SetInputFilesAsync(Microsoft.Playwright.FilePayload,Microsoft.Playwright.ElementHandleSetInputFilesOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.SetInputFilesAsync(System.String,Microsoft.Playwright.LocatorSetInputFilesOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para> Sets the value of the file input to these file paths or files. If some of the <c>filePaths</c> are relative paths, then they are resolved relative to the current working directory. For empty array, clears the selected files. For inputs with a <c>[webkitdirectory]</c> attribute, only a single directory path is supported. </para> <para> This method expects <see cref="T:Microsoft.Playwright.IElementHandle"/> to point to an <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input">input element</a>. However, if the element is inside the <c><label></c> element that has an associated <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control">control</a>, targets the control instead. </para> </summary> <param name="files"> </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IElementHandle.SetInputFilesAsync(System.Collections.Generic.IEnumerable{Microsoft.Playwright.FilePayload},Microsoft.Playwright.ElementHandleSetInputFilesOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.SetInputFilesAsync(System.String,Microsoft.Playwright.LocatorSetInputFilesOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para> Sets the value of the file input to these file paths or files. If some of the <c>filePaths</c> are relative paths, then they are resolved relative to the current working directory. For empty array, clears the selected files. For inputs with a <c>[webkitdirectory]</c> attribute, only a single directory path is supported. </para> <para> This method expects <see cref="T:Microsoft.Playwright.IElementHandle"/> to point to an <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input">input element</a>. However, if the element is inside the <c><label></c> element that has an associated <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control">control</a>, targets the control instead. </para> </summary> <param name="files"> </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IElementHandle.TapAsync(Microsoft.Playwright.ElementHandleTapOptions)"> <summary> <para>Use locator-based <see cref="M:Microsoft.Playwright.ILocator.TapAsync(Microsoft.Playwright.LocatorTapOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>.</para> <para>This method taps the element by performing the following steps:</para> <list type="ordinal"> <item><description> Wait for <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks on the element, unless <see cref="M:Microsoft.Playwright.IElementHandle.TapAsync(Microsoft.Playwright.ElementHandleTapOptions)"/> option is set. </description></item> <item><description>Scroll the element into view if needed.</description></item> <item><description> Use <see cref="P:Microsoft.Playwright.IPage.Touchscreen"/> to tap the center of the element, or the specified <see cref="M:Microsoft.Playwright.IElementHandle.TapAsync(Microsoft.Playwright.ElementHandleTapOptions)"/>. </description></item> </list> <para> If the element is detached from the DOM at any moment during the action, this method throws. </para> <para> When all steps combined have not finished during the specified <see cref="M:Microsoft.Playwright.IElementHandle.TapAsync(Microsoft.Playwright.ElementHandleTapOptions)"/>, this method throws a <see cref="T:System.TimeoutException"/>. Passing zero timeout disables this. </para> <para> <c>elementHandle.tap()</c> requires that the <c>hasTouch</c> option of the browser context be set to true. </para> </summary> <remarks> <para> <c>elementHandle.tap()</c> requires that the <c>hasTouch</c> option of the browser context be set to true. </para> </remarks> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IElementHandle.TextContentAsync"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.TextContentAsync(Microsoft.Playwright.LocatorTextContentOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para>Returns the <c>node.textContent</c>.</para> </summary> </member> <member name="M:Microsoft.Playwright.IElementHandle.TypeAsync(System.String,Microsoft.Playwright.ElementHandleTypeOptions)"> <summary> <para> **DEPRECATED** In most cases, you should use <see cref="M:Microsoft.Playwright.ILocator.FillAsync(System.String,Microsoft.Playwright.LocatorFillOptions)"/> instead. You only need to press keys one by one if there is special keyboard handling on the page - in this case use <see cref="M:Microsoft.Playwright.ILocator.PressSequentiallyAsync(System.String,Microsoft.Playwright.LocatorPressSequentiallyOptions)"/>. </para> <para> Focuses the element, and then sends a <c>keydown</c>, <c>keypress</c>/<c>input</c>, and <c>keyup</c> event for each character in the text. </para> <para>To press a special key, like <c>Control</c> or <c>ArrowDown</c>, use <see cref="M:Microsoft.Playwright.IElementHandle.PressAsync(System.String,Microsoft.Playwright.ElementHandlePressOptions)"/>.</para> <para>**Usage**</para> </summary> <param name="text">A text to type into a focused element.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IElementHandle.UncheckAsync(Microsoft.Playwright.ElementHandleUncheckOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.UncheckAsync(Microsoft.Playwright.LocatorUncheckOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para>This method checks the element by performing the following steps:</para> <list type="ordinal"> <item><description> Ensure that element is a checkbox or a radio input. If not, this method throws. If the element is already unchecked, this method returns immediately. </description></item> <item><description> Wait for <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks on the element, unless <see cref="M:Microsoft.Playwright.IElementHandle.UncheckAsync(Microsoft.Playwright.ElementHandleUncheckOptions)"/> option is set. </description></item> <item><description>Scroll the element into view if needed.</description></item> <item><description>Use <see cref="P:Microsoft.Playwright.IPage.Mouse"/> to click in the center of the element.</description></item> <item><description>Ensure that the element is now unchecked. If not, this method throws.</description></item> </list> <para> If the element is detached from the DOM at any moment during the action, this method throws. </para> <para> When all steps combined have not finished during the specified <see cref="M:Microsoft.Playwright.IElementHandle.UncheckAsync(Microsoft.Playwright.ElementHandleUncheckOptions)"/>, this method throws a <see cref="T:System.TimeoutException"/>. Passing zero timeout disables this. </para> </summary> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IElementHandle.WaitForElementStateAsync(Microsoft.Playwright.ElementState,Microsoft.Playwright.ElementHandleWaitForElementStateOptions)"> <summary> <para>Returns when the element satisfies the <see cref="M:Microsoft.Playwright.IElementHandle.WaitForElementStateAsync(Microsoft.Playwright.ElementState,Microsoft.Playwright.ElementHandleWaitForElementStateOptions)"/>.</para> <para> Depending on the <see cref="M:Microsoft.Playwright.IElementHandle.WaitForElementStateAsync(Microsoft.Playwright.ElementState,Microsoft.Playwright.ElementHandleWaitForElementStateOptions)"/> parameter, this method waits for one of the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks to pass. This method throws when the element is detached while waiting, unless waiting for the <c>"hidden"</c> state. </para> <list type="bullet"> <item><description><c>"visible"</c> Wait until the element is <a href="https://playwright.dev/dotnet/docs/actionability#visible">visible</a>.</description></item> <item><description> <c>"hidden"</c> Wait until the element is <a href="https://playwright.dev/dotnet/docs/actionability#visible">not visible</a> or not attached. Note that waiting for hidden does not throw when the element detaches. </description></item> <item><description> <c>"stable"</c> Wait until the element is both <a href="https://playwright.dev/dotnet/docs/actionability#visible">visible</a> and <a href="https://playwright.dev/dotnet/docs/actionability#stable">stable</a>. </description></item> <item><description><c>"enabled"</c> Wait until the element is <a href="https://playwright.dev/dotnet/docs/actionability#enabled">enabled</a>.</description></item> <item><description> <c>"disabled"</c> Wait until the element is <a href="https://playwright.dev/dotnet/docs/actionability#enabled">not enabled</a>. </description></item> <item><description><c>"editable"</c> Wait until the element is <a href="https://playwright.dev/dotnet/docs/actionability#editable">editable</a>.</description></item> </list> <para> If the element does not satisfy the condition for the <see cref="M:Microsoft.Playwright.IElementHandle.WaitForElementStateAsync(Microsoft.Playwright.ElementState,Microsoft.Playwright.ElementHandleWaitForElementStateOptions)"/> milliseconds, this method will throw. </para> </summary> <param name="state">A state to wait for, see below for more details.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IElementHandle.WaitForSelectorAsync(System.String,Microsoft.Playwright.ElementHandleWaitForSelectorOptions)"> <summary> <para> Use web assertions that assert visibility or a locator-based <see cref="M:Microsoft.Playwright.ILocator.WaitForAsync(Microsoft.Playwright.LocatorWaitForOptions)"/> instead. </para> <para> Returns element specified by selector when it satisfies <see cref="M:Microsoft.Playwright.IElementHandle.WaitForSelectorAsync(System.String,Microsoft.Playwright.ElementHandleWaitForSelectorOptions)"/> option. Returns <c>null</c> if waiting for <c>hidden</c> or <c>detached</c>. </para> <para> Wait for the <see cref="M:Microsoft.Playwright.IElementHandle.WaitForSelectorAsync(System.String,Microsoft.Playwright.ElementHandleWaitForSelectorOptions)"/> relative to the element handle to satisfy <see cref="M:Microsoft.Playwright.IElementHandle.WaitForSelectorAsync(System.String,Microsoft.Playwright.ElementHandleWaitForSelectorOptions)"/> option (either appear/disappear from dom, or become visible/hidden). If at the moment of calling the method <see cref="M:Microsoft.Playwright.IElementHandle.WaitForSelectorAsync(System.String,Microsoft.Playwright.ElementHandleWaitForSelectorOptions)"/> already satisfies the condition, the method will return immediately. If the selector doesn't satisfy the condition for the <see cref="M:Microsoft.Playwright.IElementHandle.WaitForSelectorAsync(System.String,Microsoft.Playwright.ElementHandleWaitForSelectorOptions)"/> milliseconds, the function will throw. </para> <para>**Usage**</para> <code> await page.SetContentAsync("<div><span></span></div>");<br/> var div = await page.QuerySelectorAsync("div");<br/> // Waiting for the "span" selector relative to the div.<br/> var span = await page.WaitForSelectorAsync("span", WaitForSelectorState.Attached); </code> <para> This method does not work across navigations, use <see cref="M:Microsoft.Playwright.IPage.WaitForSelectorAsync(System.String,Microsoft.Playwright.PageWaitForSelectorOptions)"/> instead. </para> </summary> <remarks> <para> This method does not work across navigations, use <see cref="M:Microsoft.Playwright.IPage.WaitForSelectorAsync(System.String,Microsoft.Playwright.PageWaitForSelectorOptions)"/> instead. </para> </remarks> <param name="selector">A selector to query for.</param> <param name="options">Call options</param> </member> <member name="T:Microsoft.Playwright.IFileChooser"> <summary> <para> <see cref="T:Microsoft.Playwright.IFileChooser"/> objects are dispatched by the page in the <see cref="E:Microsoft.Playwright.IPage.FileChooser"/> event. </para> <code> var fileChooser = await page.RunAndWaitForFileChooserAsync(async () =><br/> {<br/> await page.GetByText("Upload file").ClickAsync();<br/> });<br/> await fileChooser.SetFilesAsync("temp.txt"); </code> </summary> </member> <member name="P:Microsoft.Playwright.IFileChooser.Element"> <summary><para>Returns input element associated with this file chooser.</para></summary> </member> <member name="P:Microsoft.Playwright.IFileChooser.IsMultiple"> <summary><para>Returns whether this file chooser accepts multiple files.</para></summary> </member> <member name="P:Microsoft.Playwright.IFileChooser.Page"> <summary><para>Returns page this file chooser belongs to.</para></summary> </member> <member name="M:Microsoft.Playwright.IFileChooser.SetFilesAsync(System.String,Microsoft.Playwright.FileChooserSetFilesOptions)"> <summary> <para> Sets the value of the file input this chooser is associated with. If some of the <c>filePaths</c> are relative paths, then they are resolved relative to the current working directory. For empty array, clears the selected files. </para> </summary> <param name="files"> </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFileChooser.SetFilesAsync(System.Collections.Generic.IEnumerable{System.String},Microsoft.Playwright.FileChooserSetFilesOptions)"> <summary> <para> Sets the value of the file input this chooser is associated with. If some of the <c>filePaths</c> are relative paths, then they are resolved relative to the current working directory. For empty array, clears the selected files. </para> </summary> <param name="files"> </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFileChooser.SetFilesAsync(Microsoft.Playwright.FilePayload,Microsoft.Playwright.FileChooserSetFilesOptions)"> <summary> <para> Sets the value of the file input this chooser is associated with. If some of the <c>filePaths</c> are relative paths, then they are resolved relative to the current working directory. For empty array, clears the selected files. </para> </summary> <param name="files"> </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFileChooser.SetFilesAsync(System.Collections.Generic.IEnumerable{Microsoft.Playwright.FilePayload},Microsoft.Playwright.FileChooserSetFilesOptions)"> <summary> <para> Sets the value of the file input this chooser is associated with. If some of the <c>filePaths</c> are relative paths, then they are resolved relative to the current working directory. For empty array, clears the selected files. </para> </summary> <param name="files"> </param> <param name="options">Call options</param> </member> <member name="T:Microsoft.Playwright.IFormData"> <summary><para>The <see cref="T:Microsoft.Playwright.IFormData"/> is used create form data that is sent via <see cref="T:Microsoft.Playwright.IAPIRequestContext"/>.</para></summary> </member> <member name="M:Microsoft.Playwright.IFormData.Append(System.String,System.String)"> <summary> <para> Appends a new value onto an existing key inside a FormData object, or adds the key if it does not already exist. File values can be passed either as <c>Path</c> or as <c>FilePayload</c>. Multiple fields with the same name can be added. </para> <para> The difference between <see cref="M:Microsoft.Playwright.IFormData.Set(System.String,System.String)"/> and <see cref="M:Microsoft.Playwright.IFormData.Append(System.String,System.String)"/> is that if the specified key already exists, <see cref="M:Microsoft.Playwright.IFormData.Set(System.String,System.String)"/> will overwrite all existing values with the new one, whereas <see cref="M:Microsoft.Playwright.IFormData.Append(System.String,System.String)"/> will append the new value onto the end of the existing set of values. </para> <code> var multipart = Context.APIRequest.CreateFormData();<br/> // Only name and value are set.<br/> multipart.Append("firstName", "John");<br/> // Name, value, filename and Content-Type are set.<br/> multipart.Append("attachment", new FilePayload()<br/> {<br/> Name = "pic.jpg",<br/> MimeType = "image/jpeg",<br/> Buffer = File.ReadAllBytes("john.jpg")<br/> });<br/> // Name, value, filename and Content-Type are set.<br/> multipart.Append("attachment", new FilePayload()<br/> {<br/> Name = "table.csv",<br/> MimeType = "text/csv",<br/> Buffer = File.ReadAllBytes("my-tble.csv")<br/> });<br/> await Page.APIRequest.PostAsync("https://localhost/submit", new() { Multipart = multipart }); </code> </summary> <param name="name">Field name.</param> <param name="value">Field value.</param> </member> <member name="M:Microsoft.Playwright.IFormData.Append(System.String,System.Boolean)"> <summary> <para> Appends a new value onto an existing key inside a FormData object, or adds the key if it does not already exist. File values can be passed either as <c>Path</c> or as <c>FilePayload</c>. Multiple fields with the same name can be added. </para> <para> The difference between <see cref="M:Microsoft.Playwright.IFormData.Set(System.String,System.String)"/> and <see cref="M:Microsoft.Playwright.IFormData.Append(System.String,System.String)"/> is that if the specified key already exists, <see cref="M:Microsoft.Playwright.IFormData.Set(System.String,System.String)"/> will overwrite all existing values with the new one, whereas <see cref="M:Microsoft.Playwright.IFormData.Append(System.String,System.String)"/> will append the new value onto the end of the existing set of values. </para> <code> var multipart = Context.APIRequest.CreateFormData();<br/> // Only name and value are set.<br/> multipart.Append("firstName", "John");<br/> // Name, value, filename and Content-Type are set.<br/> multipart.Append("attachment", new FilePayload()<br/> {<br/> Name = "pic.jpg",<br/> MimeType = "image/jpeg",<br/> Buffer = File.ReadAllBytes("john.jpg")<br/> });<br/> // Name, value, filename and Content-Type are set.<br/> multipart.Append("attachment", new FilePayload()<br/> {<br/> Name = "table.csv",<br/> MimeType = "text/csv",<br/> Buffer = File.ReadAllBytes("my-tble.csv")<br/> });<br/> await Page.APIRequest.PostAsync("https://localhost/submit", new() { Multipart = multipart }); </code> </summary> <param name="name">Field name.</param> <param name="value">Field value.</param> </member> <member name="M:Microsoft.Playwright.IFormData.Append(System.String,System.Int32)"> <summary> <para> Appends a new value onto an existing key inside a FormData object, or adds the key if it does not already exist. File values can be passed either as <c>Path</c> or as <c>FilePayload</c>. Multiple fields with the same name can be added. </para> <para> The difference between <see cref="M:Microsoft.Playwright.IFormData.Set(System.String,System.String)"/> and <see cref="M:Microsoft.Playwright.IFormData.Append(System.String,System.String)"/> is that if the specified key already exists, <see cref="M:Microsoft.Playwright.IFormData.Set(System.String,System.String)"/> will overwrite all existing values with the new one, whereas <see cref="M:Microsoft.Playwright.IFormData.Append(System.String,System.String)"/> will append the new value onto the end of the existing set of values. </para> <code> var multipart = Context.APIRequest.CreateFormData();<br/> // Only name and value are set.<br/> multipart.Append("firstName", "John");<br/> // Name, value, filename and Content-Type are set.<br/> multipart.Append("attachment", new FilePayload()<br/> {<br/> Name = "pic.jpg",<br/> MimeType = "image/jpeg",<br/> Buffer = File.ReadAllBytes("john.jpg")<br/> });<br/> // Name, value, filename and Content-Type are set.<br/> multipart.Append("attachment", new FilePayload()<br/> {<br/> Name = "table.csv",<br/> MimeType = "text/csv",<br/> Buffer = File.ReadAllBytes("my-tble.csv")<br/> });<br/> await Page.APIRequest.PostAsync("https://localhost/submit", new() { Multipart = multipart }); </code> </summary> <param name="name">Field name.</param> <param name="value">Field value.</param> </member> <member name="M:Microsoft.Playwright.IFormData.Append(System.String,Microsoft.Playwright.FilePayload)"> <summary> <para> Appends a new value onto an existing key inside a FormData object, or adds the key if it does not already exist. File values can be passed either as <c>Path</c> or as <c>FilePayload</c>. Multiple fields with the same name can be added. </para> <para> The difference between <see cref="M:Microsoft.Playwright.IFormData.Set(System.String,System.String)"/> and <see cref="M:Microsoft.Playwright.IFormData.Append(System.String,System.String)"/> is that if the specified key already exists, <see cref="M:Microsoft.Playwright.IFormData.Set(System.String,System.String)"/> will overwrite all existing values with the new one, whereas <see cref="M:Microsoft.Playwright.IFormData.Append(System.String,System.String)"/> will append the new value onto the end of the existing set of values. </para> <code> var multipart = Context.APIRequest.CreateFormData();<br/> // Only name and value are set.<br/> multipart.Append("firstName", "John");<br/> // Name, value, filename and Content-Type are set.<br/> multipart.Append("attachment", new FilePayload()<br/> {<br/> Name = "pic.jpg",<br/> MimeType = "image/jpeg",<br/> Buffer = File.ReadAllBytes("john.jpg")<br/> });<br/> // Name, value, filename and Content-Type are set.<br/> multipart.Append("attachment", new FilePayload()<br/> {<br/> Name = "table.csv",<br/> MimeType = "text/csv",<br/> Buffer = File.ReadAllBytes("my-tble.csv")<br/> });<br/> await Page.APIRequest.PostAsync("https://localhost/submit", new() { Multipart = multipart }); </code> </summary> <param name="name">Field name.</param> <param name="value">Field value.</param> </member> <member name="M:Microsoft.Playwright.IFormData.Set(System.String,System.String)"> <summary> <para> Sets a field on the form. File values can be passed either as <c>Path</c> or as <c>FilePayload</c>. </para> <code> var multipart = Context.APIRequest.CreateFormData();<br/> // Only name and value are set.<br/> multipart.Set("firstName", "John");<br/> // Name, value, filename and Content-Type are set.<br/> multipart.Set("profilePicture", new FilePayload()<br/> {<br/> Name = "john.jpg",<br/> MimeType = "image/jpeg",<br/> Buffer = File.ReadAllBytes("john.jpg")<br/> });<br/> multipart.Set("age", 30);<br/> await Page.APIRequest.PostAsync("https://localhost/submit", new() { Multipart = multipart }); </code> </summary> <param name="name">Field name.</param> <param name="value">Field value.</param> </member> <member name="M:Microsoft.Playwright.IFormData.Set(System.String,System.Boolean)"> <summary> <para> Sets a field on the form. File values can be passed either as <c>Path</c> or as <c>FilePayload</c>. </para> <code> var multipart = Context.APIRequest.CreateFormData();<br/> // Only name and value are set.<br/> multipart.Set("firstName", "John");<br/> // Name, value, filename and Content-Type are set.<br/> multipart.Set("profilePicture", new FilePayload()<br/> {<br/> Name = "john.jpg",<br/> MimeType = "image/jpeg",<br/> Buffer = File.ReadAllBytes("john.jpg")<br/> });<br/> multipart.Set("age", 30);<br/> await Page.APIRequest.PostAsync("https://localhost/submit", new() { Multipart = multipart }); </code> </summary> <param name="name">Field name.</param> <param name="value">Field value.</param> </member> <member name="M:Microsoft.Playwright.IFormData.Set(System.String,System.Int32)"> <summary> <para> Sets a field on the form. File values can be passed either as <c>Path</c> or as <c>FilePayload</c>. </para> <code> var multipart = Context.APIRequest.CreateFormData();<br/> // Only name and value are set.<br/> multipart.Set("firstName", "John");<br/> // Name, value, filename and Content-Type are set.<br/> multipart.Set("profilePicture", new FilePayload()<br/> {<br/> Name = "john.jpg",<br/> MimeType = "image/jpeg",<br/> Buffer = File.ReadAllBytes("john.jpg")<br/> });<br/> multipart.Set("age", 30);<br/> await Page.APIRequest.PostAsync("https://localhost/submit", new() { Multipart = multipart }); </code> </summary> <param name="name">Field name.</param> <param name="value">Field value.</param> </member> <member name="M:Microsoft.Playwright.IFormData.Set(System.String,Microsoft.Playwright.FilePayload)"> <summary> <para> Sets a field on the form. File values can be passed either as <c>Path</c> or as <c>FilePayload</c>. </para> <code> var multipart = Context.APIRequest.CreateFormData();<br/> // Only name and value are set.<br/> multipart.Set("firstName", "John");<br/> // Name, value, filename and Content-Type are set.<br/> multipart.Set("profilePicture", new FilePayload()<br/> {<br/> Name = "john.jpg",<br/> MimeType = "image/jpeg",<br/> Buffer = File.ReadAllBytes("john.jpg")<br/> });<br/> multipart.Set("age", 30);<br/> await Page.APIRequest.PostAsync("https://localhost/submit", new() { Multipart = multipart }); </code> </summary> <param name="name">Field name.</param> <param name="value">Field value.</param> </member> <member name="T:Microsoft.Playwright.IFrame"> <summary> <para> At every point of time, page exposes its current frame tree via the <see cref="P:Microsoft.Playwright.IPage.MainFrame"/> and <see cref="P:Microsoft.Playwright.IFrame.ChildFrames"/> methods. </para> <para> <see cref="T:Microsoft.Playwright.IFrame"/> object's lifecycle is controlled by three events, dispatched on the page object: </para> <list type="bullet"> <item><description> <see cref="E:Microsoft.Playwright.IPage.FrameAttached"/> - fired when the frame gets attached to the page. A Frame can be attached to the page only once. </description></item> <item><description> <see cref="E:Microsoft.Playwright.IPage.FrameNavigated"/> - fired when the frame commits navigation to a different URL. </description></item> <item><description> <see cref="E:Microsoft.Playwright.IPage.FrameDetached"/> - fired when the frame gets detached from the page. A Frame can be detached from the page only once. </description></item> </list> <para>An example of dumping frame tree:</para> <code> using Microsoft.Playwright;<br/> using System;<br/> using System.Threading.Tasks;<br/> <br/> class FrameExamples<br/> {<br/> public static async Task Main()<br/> {<br/> using var playwright = await Playwright.CreateAsync();<br/> await using var browser = await playwright.Firefox.LaunchAsync();<br/> var page = await browser.NewPageAsync();<br/> <br/> await page.GotoAsync("https://www.bing.com");<br/> DumpFrameTree(page.MainFrame, string.Empty);<br/> }<br/> <br/> private static void DumpFrameTree(IFrame frame, string indent)<br/> {<br/> Console.WriteLine($"{indent}{frame.Url}");<br/> foreach (var child in frame.ChildFrames)<br/> DumpFrameTree(child, indent + " ");<br/> }<br/> } </code> </summary> </member> <member name="M:Microsoft.Playwright.IFrame.AddScriptTagAsync(Microsoft.Playwright.FrameAddScriptTagOptions)"> <summary> <para> Returns the added tag when the script's onload fires or when the script content was injected into frame. </para> <para>Adds a <c><script></c> tag into the page with the desired url or content.</para> </summary> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrame.AddStyleTagAsync(Microsoft.Playwright.FrameAddStyleTagOptions)"> <summary> <para> Returns the added tag when the stylesheet's onload fires or when the CSS content was injected into frame. </para> <para> Adds a <c><link rel="stylesheet"></c> tag into the page with the desired url or a <c><style type="text/css"></c> tag with the content. </para> </summary> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrame.CheckAsync(System.String,Microsoft.Playwright.FrameCheckOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.CheckAsync(Microsoft.Playwright.LocatorCheckOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para> This method checks an element matching <see cref="M:Microsoft.Playwright.IFrame.CheckAsync(System.String,Microsoft.Playwright.FrameCheckOptions)"/> by performing the following steps: </para> <list type="ordinal"> <item><description> Find an element matching <see cref="M:Microsoft.Playwright.IFrame.CheckAsync(System.String,Microsoft.Playwright.FrameCheckOptions)"/>. If there is none, wait until a matching element is attached to the DOM. </description></item> <item><description> Ensure that matched element is a checkbox or a radio input. If not, this method throws. If the element is already checked, this method returns immediately. </description></item> <item><description> Wait for <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks on the matched element, unless <see cref="M:Microsoft.Playwright.IFrame.CheckAsync(System.String,Microsoft.Playwright.FrameCheckOptions)"/> option is set. If the element is detached during the checks, the whole action is retried. </description></item> <item><description>Scroll the element into view if needed.</description></item> <item><description>Use <see cref="P:Microsoft.Playwright.IPage.Mouse"/> to click in the center of the element.</description></item> <item><description>Ensure that the element is now checked. If not, this method throws.</description></item> </list> <para> When all steps combined have not finished during the specified <see cref="M:Microsoft.Playwright.IFrame.CheckAsync(System.String,Microsoft.Playwright.FrameCheckOptions)"/>, this method throws a <see cref="T:System.TimeoutException"/>. Passing zero timeout disables this. </para> </summary> <param name="selector"> A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrame.ClickAsync(System.String,Microsoft.Playwright.FrameClickOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.ClickAsync(Microsoft.Playwright.LocatorClickOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para> This method clicks an element matching <see cref="M:Microsoft.Playwright.IFrame.ClickAsync(System.String,Microsoft.Playwright.FrameClickOptions)"/> by performing the following steps: </para> <list type="ordinal"> <item><description> Find an element matching <see cref="M:Microsoft.Playwright.IFrame.ClickAsync(System.String,Microsoft.Playwright.FrameClickOptions)"/>. If there is none, wait until a matching element is attached to the DOM. </description></item> <item><description> Wait for <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks on the matched element, unless <see cref="M:Microsoft.Playwright.IFrame.ClickAsync(System.String,Microsoft.Playwright.FrameClickOptions)"/> option is set. If the element is detached during the checks, the whole action is retried. </description></item> <item><description>Scroll the element into view if needed.</description></item> <item><description> Use <see cref="P:Microsoft.Playwright.IPage.Mouse"/> to click in the center of the element, or the specified <see cref="M:Microsoft.Playwright.IFrame.ClickAsync(System.String,Microsoft.Playwright.FrameClickOptions)"/>. </description></item> <item><description> Wait for initiated navigations to either succeed or fail, unless <see cref="M:Microsoft.Playwright.IFrame.ClickAsync(System.String,Microsoft.Playwright.FrameClickOptions)"/> option is set. </description></item> </list> <para> When all steps combined have not finished during the specified <see cref="M:Microsoft.Playwright.IFrame.ClickAsync(System.String,Microsoft.Playwright.FrameClickOptions)"/>, this method throws a <see cref="T:System.TimeoutException"/>. Passing zero timeout disables this. </para> </summary> <param name="selector"> A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrame.ContentAsync"> <summary><para>Gets the full HTML contents of the frame, including the doctype.</para></summary> </member> <member name="M:Microsoft.Playwright.IFrame.DblClickAsync(System.String,Microsoft.Playwright.FrameDblClickOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.DblClickAsync(Microsoft.Playwright.LocatorDblClickOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para> This method double clicks an element matching <see cref="M:Microsoft.Playwright.IFrame.DblClickAsync(System.String,Microsoft.Playwright.FrameDblClickOptions)"/> by performing the following steps: </para> <list type="ordinal"> <item><description> Find an element matching <see cref="M:Microsoft.Playwright.IFrame.DblClickAsync(System.String,Microsoft.Playwright.FrameDblClickOptions)"/>. If there is none, wait until a matching element is attached to the DOM. </description></item> <item><description> Wait for <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks on the matched element, unless <see cref="M:Microsoft.Playwright.IFrame.DblClickAsync(System.String,Microsoft.Playwright.FrameDblClickOptions)"/> option is set. If the element is detached during the checks, the whole action is retried. </description></item> <item><description>Scroll the element into view if needed.</description></item> <item><description> Use <see cref="P:Microsoft.Playwright.IPage.Mouse"/> to double click in the center of the element, or the specified <see cref="M:Microsoft.Playwright.IFrame.DblClickAsync(System.String,Microsoft.Playwright.FrameDblClickOptions)"/>. if the first click of the <c>dblclick()</c> triggers a navigation event, this method will throw. </description></item> </list> <para> When all steps combined have not finished during the specified <see cref="M:Microsoft.Playwright.IFrame.DblClickAsync(System.String,Microsoft.Playwright.FrameDblClickOptions)"/>, this method throws a <see cref="T:System.TimeoutException"/>. Passing zero timeout disables this. </para> <para> <c>frame.dblclick()</c> dispatches two <c>click</c> events and a single <c>dblclick</c> event. </para> </summary> <remarks> <para> <c>frame.dblclick()</c> dispatches two <c>click</c> events and a single <c>dblclick</c> event. </para> </remarks> <param name="selector"> A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrame.DispatchEventAsync(System.String,System.String,System.Object,Microsoft.Playwright.FrameDispatchEventOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.DispatchEventAsync(System.String,System.Object,Microsoft.Playwright.LocatorDispatchEventOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para> The snippet below dispatches the <c>click</c> event on the element. Regardless of the visibility state of the element, <c>click</c> is dispatched. This is equivalent to calling <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/click">element.click()</a>. </para> <para>**Usage**</para> <code>await frame.DispatchEventAsync("button#submit", "click");</code> <para> Under the hood, it creates an instance of an event based on the given <see cref="M:Microsoft.Playwright.IFrame.DispatchEventAsync(System.String,System.String,System.Object,Microsoft.Playwright.FrameDispatchEventOptions)"/>, initializes it with <see cref="M:Microsoft.Playwright.IFrame.DispatchEventAsync(System.String,System.String,System.Object,Microsoft.Playwright.FrameDispatchEventOptions)"/> properties and dispatches it on the element. Events are <c>composed</c>, <c>cancelable</c> and bubble by default. </para> <para> Since <see cref="M:Microsoft.Playwright.IFrame.DispatchEventAsync(System.String,System.String,System.Object,Microsoft.Playwright.FrameDispatchEventOptions)"/> is event-specific, please refer to the events documentation for the lists of initial properties: </para> <list type="bullet"> <item><description><a href="https://developer.mozilla.org/en-US/docs/Web/API/DeviceMotionEvent/DeviceMotionEvent">DeviceMotionEvent</a></description></item> <item><description><a href="https://developer.mozilla.org/en-US/docs/Web/API/DeviceOrientationEvent/DeviceOrientationEvent">DeviceOrientationEvent</a></description></item> <item><description><a href="https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/DragEvent">DragEvent</a></description></item> <item><description><a href="https://developer.mozilla.org/en-US/docs/Web/API/Event/Event">Event</a></description></item> <item><description><a href="https://developer.mozilla.org/en-US/docs/Web/API/FocusEvent/FocusEvent">FocusEvent</a></description></item> <item><description><a href="https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/KeyboardEvent">KeyboardEvent</a></description></item> <item><description><a href="https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/MouseEvent">MouseEvent</a></description></item> <item><description><a href="https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/PointerEvent">PointerEvent</a></description></item> <item><description><a href="https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/TouchEvent">TouchEvent</a></description></item> <item><description><a href="https://developer.mozilla.org/en-US/docs/Web/API/WheelEvent/WheelEvent">WheelEvent</a></description></item> </list> <para> You can also specify <c>JSHandle</c> as the property value if you want live objects to be passed into the event: </para> <code> // Note you can only create DataTransfer in Chromium and Firefox<br/> var dataTransfer = await frame.EvaluateHandleAsync("() => new DataTransfer()");<br/> await frame.DispatchEventAsync("#source", "dragstart", new { dataTransfer }); </code> </summary> <param name="selector"> A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used. </param> <param name="type">DOM event type: <c>"click"</c>, <c>"dragstart"</c>, etc.</param> <param name="eventInit">Optional event-specific initialization properties.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrame.DragAndDropAsync(System.String,System.String,Microsoft.Playwright.FrameDragAndDropOptions)"> <param name="source"> A selector to search for an element to drag. If there are multiple elements satisfying the selector, the first will be used. </param> <param name="target"> A selector to search for an element to drop onto. If there are multiple elements satisfying the selector, the first will be used. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrame.EvalOnSelectorAsync``1(System.String,System.String,System.Object,Microsoft.Playwright.FrameEvalOnSelectorOptions)"> <summary> <para> This method does not wait for the element to pass the actionability checks and therefore can lead to the flaky tests. Use <see cref="M:Microsoft.Playwright.ILocator.EvaluateAsync(System.String,System.Object,Microsoft.Playwright.LocatorEvaluateOptions)"/>, other <see cref="T:Microsoft.Playwright.ILocator"/> helper methods or web-first assertions instead. </para> <para>Returns the return value of <see cref="M:Microsoft.Playwright.IFrame.EvalOnSelectorAsync(System.String,System.String,System.Object)"/>.</para> <para> The method finds an element matching the specified selector within the frame and passes it as a first argument to <see cref="M:Microsoft.Playwright.IFrame.EvalOnSelectorAsync(System.String,System.String,System.Object)"/>. If no elements match the selector, the method throws an error. </para> <para> If <see cref="M:Microsoft.Playwright.IFrame.EvalOnSelectorAsync(System.String,System.String,System.Object)"/> returns a <see cref="T:System.Threading.Tasks.Task"/>, then <see cref="M:Microsoft.Playwright.IFrame.EvalOnSelectorAsync(System.String,System.String,System.Object)"/> would wait for the promise to resolve and return its value. </para> <para>**Usage**</para> <code> var searchValue = await frame.EvalOnSelectorAsync<string>("#search", "el => el.value");<br/> var preloadHref = await frame.EvalOnSelectorAsync<string>("link[rel=preload]", "el => el.href");<br/> var html = await frame.EvalOnSelectorAsync(".main-container", "(e, suffix) => e.outerHTML + suffix", "hello"); </code> </summary> <param name="selector">A selector to query for.</param> <param name="expression"> JavaScript expression to be evaluated in the browser context. If the expression evaluates to a function, the function is automatically invoked. </param> <param name="arg">Optional argument to pass to <see cref="M:Microsoft.Playwright.IFrame.EvalOnSelectorAsync(System.String,System.String,System.Object)"/>.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrame.EvalOnSelectorAllAsync``1(System.String,System.String,System.Object)"> <summary> <para> In most cases, <see cref="M:Microsoft.Playwright.ILocator.EvaluateAllAsync``1(System.String,System.Object)"/>, other <see cref="T:Microsoft.Playwright.ILocator"/> helper methods and web-first assertions do a better job. </para> <para>Returns the return value of <see cref="M:Microsoft.Playwright.IFrame.EvalOnSelectorAllAsync(System.String,System.String,System.Object)"/>.</para> <para> The method finds all elements matching the specified selector within the frame and passes an array of matched elements as a first argument to <see cref="M:Microsoft.Playwright.IFrame.EvalOnSelectorAllAsync(System.String,System.String,System.Object)"/>. </para> <para> If <see cref="M:Microsoft.Playwright.IFrame.EvalOnSelectorAllAsync(System.String,System.String,System.Object)"/> returns a <see cref="T:System.Threading.Tasks.Task"/>, then <see cref="M:Microsoft.Playwright.IFrame.EvalOnSelectorAllAsync(System.String,System.String,System.Object)"/> would wait for the promise to resolve and return its value. </para> <para>**Usage**</para> <code>var divsCount = await frame.EvalOnSelectorAllAsync<bool>("div", "(divs, min) => divs.length >= min", 10);</code> </summary> <param name="selector">A selector to query for.</param> <param name="expression"> JavaScript expression to be evaluated in the browser context. If the expression evaluates to a function, the function is automatically invoked. </param> <param name="arg">Optional argument to pass to <see cref="M:Microsoft.Playwright.IFrame.EvalOnSelectorAllAsync(System.String,System.String,System.Object)"/>.</param> </member> <member name="M:Microsoft.Playwright.IFrame.EvaluateAsync``1(System.String,System.Object)"> <summary> <para>Returns the return value of <see cref="M:Microsoft.Playwright.IFrame.EvaluateAsync(System.String,System.Object)"/>.</para> <para> If the function passed to the <see cref="M:Microsoft.Playwright.IFrame.EvaluateAsync(System.String,System.Object)"/> returns a <see cref="T:System.Threading.Tasks.Task"/>, then <see cref="M:Microsoft.Playwright.IFrame.EvaluateAsync(System.String,System.Object)"/> would wait for the promise to resolve and return its value. </para> <para> If the function passed to the <see cref="M:Microsoft.Playwright.IFrame.EvaluateAsync(System.String,System.Object)"/> returns a non-<see cref="!:Serializable"/> value, then <see cref="M:Microsoft.Playwright.IFrame.EvaluateAsync(System.String,System.Object)"/> returns <c>undefined</c>. Playwright also supports transferring some additional values that are not serializable by <c>JSON</c>: <c>-0</c>, <c>NaN</c>, <c>Infinity</c>, <c>-Infinity</c>. </para> <para>**Usage**</para> <code> var result = await frame.EvaluateAsync<int>("([x, y]) => Promise.resolve(x * y)", new[] { 7, 8 });<br/> Console.WriteLine(result); </code> <para>A string can also be passed in instead of a function.</para> <code>Console.WriteLine(await frame.EvaluateAsync<int>("1 + 2")); // prints "3"</code> <para> <see cref="T:Microsoft.Playwright.IElementHandle"/> instances can be passed as an argument to the <see cref="M:Microsoft.Playwright.IFrame.EvaluateAsync(System.String,System.Object)"/>: </para> <code> var bodyHandle = await frame.EvaluateAsync("document.body");<br/> var html = await frame.EvaluateAsync<string>("([body, suffix]) => body.innerHTML + suffix", new object [] { bodyHandle, "hello" });<br/> await bodyHandle.DisposeAsync(); </code> </summary> <param name="expression"> JavaScript expression to be evaluated in the browser context. If the expression evaluates to a function, the function is automatically invoked. </param> <param name="arg">Optional argument to pass to <see cref="M:Microsoft.Playwright.IFrame.EvaluateAsync(System.String,System.Object)"/>.</param> </member> <member name="M:Microsoft.Playwright.IFrame.EvaluateHandleAsync(System.String,System.Object)"> <summary> <para>Returns the return value of <see cref="M:Microsoft.Playwright.IFrame.EvaluateHandleAsync(System.String,System.Object)"/> as a <see cref="T:Microsoft.Playwright.IJSHandle"/>.</para> <para> The only difference between <see cref="M:Microsoft.Playwright.IFrame.EvaluateAsync(System.String,System.Object)"/> and <see cref="M:Microsoft.Playwright.IFrame.EvaluateHandleAsync(System.String,System.Object)"/> is that <see cref="M:Microsoft.Playwright.IFrame.EvaluateHandleAsync(System.String,System.Object)"/> returns <see cref="T:Microsoft.Playwright.IJSHandle"/>. </para> <para> If the function, passed to the <see cref="M:Microsoft.Playwright.IFrame.EvaluateHandleAsync(System.String,System.Object)"/>, returns a <see cref="T:System.Threading.Tasks.Task"/>, then <see cref="M:Microsoft.Playwright.IFrame.EvaluateHandleAsync(System.String,System.Object)"/> would wait for the promise to resolve and return its value. </para> <para>**Usage**</para> <code> // Handle for the window object.<br/> var aWindowHandle = await frame.EvaluateHandleAsync("() => Promise.resolve(window)"); </code> <para>A string can also be passed in instead of a function.</para> <code>var docHandle = await frame.EvaluateHandleAsync("document"); // Handle for the `document`</code> <para><see cref="T:Microsoft.Playwright.IJSHandle"/> instances can be passed as an argument to the <see cref="M:Microsoft.Playwright.IFrame.EvaluateHandleAsync(System.String,System.Object)"/>:</para> <code> var handle = await frame.EvaluateHandleAsync("() => document.body");<br/> var resultHandle = await frame.EvaluateHandleAsync("([body, suffix]) => body.innerHTML + suffix", new object[] { handle, "hello" });<br/> Console.WriteLine(await resultHandle.JsonValueAsync<string>());<br/> await resultHandle.DisposeAsync(); </code> </summary> <param name="expression"> JavaScript expression to be evaluated in the browser context. If the expression evaluates to a function, the function is automatically invoked. </param> <param name="arg">Optional argument to pass to <see cref="M:Microsoft.Playwright.IFrame.EvaluateHandleAsync(System.String,System.Object)"/>.</param> </member> <member name="M:Microsoft.Playwright.IFrame.FillAsync(System.String,System.String,Microsoft.Playwright.FrameFillOptions)"> <summary> <para>Use locator-based <see cref="M:Microsoft.Playwright.ILocator.FillAsync(System.String,Microsoft.Playwright.LocatorFillOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>.</para> <para> This method waits for an element matching <see cref="M:Microsoft.Playwright.IFrame.FillAsync(System.String,System.String,Microsoft.Playwright.FrameFillOptions)"/>, waits for <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks, focuses the element, fills it and triggers an <c>input</c> event after filling. Note that you can pass an empty string to clear the input field. </para> <para> If the target element is not an <c><input></c>, <c><textarea></c> or <c>[contenteditable]</c> element, this method throws an error. However, if the element is inside the <c><label></c> element that has an associated <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control">control</a>, the control will be filled instead. </para> <para>To send fine-grained keyboard events, use <see cref="M:Microsoft.Playwright.ILocator.PressSequentiallyAsync(System.String,Microsoft.Playwright.LocatorPressSequentiallyOptions)"/>.</para> </summary> <param name="selector"> A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used. </param> <param name="value"> Value to fill for the <c><input></c>, <c><textarea></c> or <c>[contenteditable]</c> element. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrame.FocusAsync(System.String,Microsoft.Playwright.FrameFocusOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.FocusAsync(Microsoft.Playwright.LocatorFocusOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para> This method fetches an element with <see cref="M:Microsoft.Playwright.IFrame.FocusAsync(System.String,Microsoft.Playwright.FrameFocusOptions)"/> and focuses it. If there's no element matching <see cref="M:Microsoft.Playwright.IFrame.FocusAsync(System.String,Microsoft.Playwright.FrameFocusOptions)"/>, the method waits until a matching element appears in the DOM. </para> </summary> <param name="selector"> A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrame.FrameElementAsync"> <summary> <para> Returns the <c>frame</c> or <c>iframe</c> element handle which corresponds to this frame. </para> <para> This is an inverse of <see cref="M:Microsoft.Playwright.IElementHandle.ContentFrameAsync"/>. Note that returned handle actually belongs to the parent frame. </para> <para> This method throws an error if the frame has been detached before <c>frameElement()</c> returns. </para> <para>**Usage**</para> <code> var frameElement = await frame.FrameElementAsync();<br/> var contentFrame = await frameElement.ContentFrameAsync();<br/> Console.WriteLine(frame == contentFrame); // -> True </code> </summary> </member> <member name="M:Microsoft.Playwright.IFrame.FrameLocator(System.String)"> <summary> <para> When working with iframes, you can create a frame locator that will enter the iframe and allow selecting elements in that iframe. </para> <para>**Usage**</para> <para> Following snippet locates element with text "Submit" in the iframe with id <c>my-frame</c>, like <c><iframe id="my-frame"></c>: </para> <code> var locator = frame.FrameLocator("#my-iframe").GetByText("Submit");<br/> await locator.ClickAsync(); </code> </summary> <param name="selector">A selector to use when resolving DOM element.</param> </member> <member name="M:Microsoft.Playwright.IFrame.GetAttributeAsync(System.String,System.String,Microsoft.Playwright.FrameGetAttributeOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.GetAttributeAsync(System.String,Microsoft.Playwright.LocatorGetAttributeOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para>Returns element attribute value.</para> </summary> <param name="selector"> A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used. </param> <param name="name">Attribute name to get the value for.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrame.GetByAltText(System.String,Microsoft.Playwright.FrameGetByAltTextOptions)"> <summary> <para>Allows locating elements by their alt text.</para> <para>**Usage**</para> <para>For example, this method will find the image by alt text "Playwright logo":</para> <code>await page.GetByAltText("Playwright logo").ClickAsync();</code> </summary> <param name="text">Text to locate the element for.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrame.GetByAltText(System.Text.RegularExpressions.Regex,Microsoft.Playwright.FrameGetByAltTextOptions)"> <summary> <para>Allows locating elements by their alt text.</para> <para>**Usage**</para> <para>For example, this method will find the image by alt text "Playwright logo":</para> <code>await page.GetByAltText("Playwright logo").ClickAsync();</code> </summary> <param name="text">Text to locate the element for.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrame.GetByLabel(System.String,Microsoft.Playwright.FrameGetByLabelOptions)"> <summary> <para> Allows locating input elements by the text of the associated <c><label></c> or <c>aria-labelledby</c> element, or by the <c>aria-label</c> attribute. </para> <para>**Usage**</para> <para> For example, this method will find inputs by label "Username" and "Password" in the following DOM: </para> <code> await page.GetByLabel("Username").FillAsync("john");<br/> await page.GetByLabel("Password").FillAsync("secret"); </code> </summary> <param name="text">Text to locate the element for.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrame.GetByLabel(System.Text.RegularExpressions.Regex,Microsoft.Playwright.FrameGetByLabelOptions)"> <summary> <para> Allows locating input elements by the text of the associated <c><label></c> or <c>aria-labelledby</c> element, or by the <c>aria-label</c> attribute. </para> <para>**Usage**</para> <para> For example, this method will find inputs by label "Username" and "Password" in the following DOM: </para> <code> await page.GetByLabel("Username").FillAsync("john");<br/> await page.GetByLabel("Password").FillAsync("secret"); </code> </summary> <param name="text">Text to locate the element for.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrame.GetByPlaceholder(System.String,Microsoft.Playwright.FrameGetByPlaceholderOptions)"> <summary> <para>Allows locating input elements by the placeholder text.</para> <para>**Usage**</para> <para>For example, consider the following DOM structure.</para> <para>You can fill the input after locating it by the placeholder text:</para> <code> await page<br/> .GetByPlaceholder("name@example.com")<br/> .FillAsync("playwright@microsoft.com"); </code> </summary> <param name="text">Text to locate the element for.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrame.GetByPlaceholder(System.Text.RegularExpressions.Regex,Microsoft.Playwright.FrameGetByPlaceholderOptions)"> <summary> <para>Allows locating input elements by the placeholder text.</para> <para>**Usage**</para> <para>For example, consider the following DOM structure.</para> <para>You can fill the input after locating it by the placeholder text:</para> <code> await page<br/> .GetByPlaceholder("name@example.com")<br/> .FillAsync("playwright@microsoft.com"); </code> </summary> <param name="text">Text to locate the element for.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrame.GetByRole(Microsoft.Playwright.AriaRole,Microsoft.Playwright.FrameGetByRoleOptions)"> <summary> <para> Allows locating elements by their <a href="https://www.w3.org/TR/wai-aria-1.2/#roles">ARIA role</a>, <a href="https://www.w3.org/TR/wai-aria-1.2/#aria-attributes">ARIA attributes</a> and <a href="https://w3c.github.io/accname/#dfn-accessible-name">accessible name</a>. </para> <para>**Usage**</para> <para>Consider the following DOM structure.</para> <para>You can locate each element by it's implicit role:</para> <code> await Expect(Page<br/> .GetByRole(AriaRole.Heading, new() { Name = "Sign up" }))<br/> .ToBeVisibleAsync();<br/> <br/> await page<br/> .GetByRole(AriaRole.Checkbox, new() { Name = "Subscribe" })<br/> .CheckAsync();<br/> <br/> await page<br/> .GetByRole(AriaRole.Button, new() {<br/> NameRegex = new Regex("submit", RegexOptions.IgnoreCase)<br/> })<br/> .ClickAsync(); </code> <para>**Details**</para> <para> Role selector **does not replace** accessibility audits and conformance tests, but rather gives early feedback about the ARIA guidelines. </para> <para> Many html elements have an implicitly <a href="https://w3c.github.io/html-aam/#html-element-role-mappings">defined role</a> that is recognized by the role selector. You can find all the <a href="https://www.w3.org/TR/wai-aria-1.2/#role_definitions">supported roles here</a>. ARIA guidelines **do not recommend** duplicating implicit roles and attributes by setting <c>role</c> and/or <c>aria-*</c> attributes to default values. </para> </summary> <param name="role">Required aria role.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrame.GetByTestId(System.String)"> <summary> <para>Locate element by the test id.</para> <para>**Usage**</para> <para>Consider the following DOM structure.</para> <para>You can locate the element by it's test id:</para> <code>await page.GetByTestId("directions").ClickAsync();</code> <para>**Details**</para> <para> By default, the <c>data-testid</c> attribute is used as a test id. Use <see cref="M:Microsoft.Playwright.ISelectors.SetTestIdAttribute(System.String)"/> to configure a different test id attribute if necessary. </para> </summary> <param name="testId">Id to locate the element by.</param> </member> <member name="M:Microsoft.Playwright.IFrame.GetByTestId(System.Text.RegularExpressions.Regex)"> <summary> <para>Locate element by the test id.</para> <para>**Usage**</para> <para>Consider the following DOM structure.</para> <para>You can locate the element by it's test id:</para> <code>await page.GetByTestId("directions").ClickAsync();</code> <para>**Details**</para> <para> By default, the <c>data-testid</c> attribute is used as a test id. Use <see cref="M:Microsoft.Playwright.ISelectors.SetTestIdAttribute(System.String)"/> to configure a different test id attribute if necessary. </para> </summary> <param name="testId">Id to locate the element by.</param> </member> <member name="M:Microsoft.Playwright.IFrame.GetByText(System.String,Microsoft.Playwright.FrameGetByTextOptions)"> <summary> <para>Allows locating elements that contain given text.</para> <para> See also <see cref="M:Microsoft.Playwright.ILocator.Filter(Microsoft.Playwright.LocatorFilterOptions)"/> that allows to match by another criteria, like an accessible role, and then filter by the text content. </para> <para>**Usage**</para> <para>Consider the following DOM structure:</para> <para>You can locate by text substring, exact string, or a regular expression:</para> <code> // Matches <span><br/> page.GetByText("world");<br/> <br/> // Matches first <div><br/> page.GetByText("Hello world");<br/> <br/> // Matches second <div><br/> page.GetByText("Hello", new() { Exact = true });<br/> <br/> // Matches both <div>s<br/> page.GetByText(new Regex("Hello"));<br/> <br/> // Matches second <div><br/> page.GetByText(new Regex("^hello$", RegexOptions.IgnoreCase)); </code> <para>**Details**</para> <para> Matching by text always normalizes whitespace, even with exact match. For example, it turns multiple spaces into one, turns line breaks into spaces and ignores leading and trailing whitespace. </para> <para> Input elements of the type <c>button</c> and <c>submit</c> are matched by their <c>value</c> instead of the text content. For example, locating by text <c>"Log in"</c> matches <c><input type=button value="Log in"></c>. </para> </summary> <param name="text">Text to locate the element for.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrame.GetByText(System.Text.RegularExpressions.Regex,Microsoft.Playwright.FrameGetByTextOptions)"> <summary> <para>Allows locating elements that contain given text.</para> <para> See also <see cref="M:Microsoft.Playwright.ILocator.Filter(Microsoft.Playwright.LocatorFilterOptions)"/> that allows to match by another criteria, like an accessible role, and then filter by the text content. </para> <para>**Usage**</para> <para>Consider the following DOM structure:</para> <para>You can locate by text substring, exact string, or a regular expression:</para> <code> // Matches <span><br/> page.GetByText("world");<br/> <br/> // Matches first <div><br/> page.GetByText("Hello world");<br/> <br/> // Matches second <div><br/> page.GetByText("Hello", new() { Exact = true });<br/> <br/> // Matches both <div>s<br/> page.GetByText(new Regex("Hello"));<br/> <br/> // Matches second <div><br/> page.GetByText(new Regex("^hello$", RegexOptions.IgnoreCase)); </code> <para>**Details**</para> <para> Matching by text always normalizes whitespace, even with exact match. For example, it turns multiple spaces into one, turns line breaks into spaces and ignores leading and trailing whitespace. </para> <para> Input elements of the type <c>button</c> and <c>submit</c> are matched by their <c>value</c> instead of the text content. For example, locating by text <c>"Log in"</c> matches <c><input type=button value="Log in"></c>. </para> </summary> <param name="text">Text to locate the element for.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrame.GetByTitle(System.String,Microsoft.Playwright.FrameGetByTitleOptions)"> <summary> <para>Allows locating elements by their title attribute.</para> <para>**Usage**</para> <para>Consider the following DOM structure.</para> <para>You can check the issues count after locating it by the title text:</para> <code>await Expect(Page.GetByTitle("Issues count")).toHaveText("25 issues");</code> </summary> <param name="text">Text to locate the element for.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrame.GetByTitle(System.Text.RegularExpressions.Regex,Microsoft.Playwright.FrameGetByTitleOptions)"> <summary> <para>Allows locating elements by their title attribute.</para> <para>**Usage**</para> <para>Consider the following DOM structure.</para> <para>You can check the issues count after locating it by the title text:</para> <code>await Expect(Page.GetByTitle("Issues count")).toHaveText("25 issues");</code> </summary> <param name="text">Text to locate the element for.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrame.GotoAsync(System.String,Microsoft.Playwright.FrameGotoOptions)"> <summary> <para> Returns the main resource response. In case of multiple redirects, the navigation will resolve with the response of the last redirect. </para> <para>The method will throw an error if:</para> <list type="bullet"> <item><description>there's an SSL error (e.g. in case of self-signed certificates).</description></item> <item><description>target URL is invalid.</description></item> <item><description>the <see cref="M:Microsoft.Playwright.IFrame.GotoAsync(System.String,Microsoft.Playwright.FrameGotoOptions)"/> is exceeded during navigation.</description></item> <item><description>the remote server does not respond or is unreachable.</description></item> <item><description>the main resource failed to load.</description></item> </list> <para> The method will not throw an error when any valid HTTP status code is returned by the remote server, including 404 "Not Found" and 500 "Internal Server Error". The status code for such responses can be retrieved by calling <see cref="P:Microsoft.Playwright.IResponse.Status"/>. </para> <para> The method either throws an error or returns a main resource response. The only exceptions are navigation to <c>about:blank</c> or navigation to the same URL with a different hash, which would succeed and return <c>null</c>. </para> <para> Headless mode doesn't support navigation to a PDF document. See the <a href="https://bugs.chromium.org/p/chromium/issues/detail?id=761295">upstream issue</a>. </para> </summary> <remarks> <para> The method either throws an error or returns a main resource response. The only exceptions are navigation to <c>about:blank</c> or navigation to the same URL with a different hash, which would succeed and return <c>null</c>. </para> <para> Headless mode doesn't support navigation to a PDF document. See the <a href="https://bugs.chromium.org/p/chromium/issues/detail?id=761295">upstream issue</a>. </para> </remarks> <param name="url">URL to navigate frame to. The url should include scheme, e.g. <c>https://</c>.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrame.HoverAsync(System.String,Microsoft.Playwright.FrameHoverOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.HoverAsync(Microsoft.Playwright.LocatorHoverOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para> This method hovers over an element matching <see cref="M:Microsoft.Playwright.IFrame.HoverAsync(System.String,Microsoft.Playwright.FrameHoverOptions)"/> by performing the following steps: </para> <list type="ordinal"> <item><description> Find an element matching <see cref="M:Microsoft.Playwright.IFrame.HoverAsync(System.String,Microsoft.Playwright.FrameHoverOptions)"/>. If there is none, wait until a matching element is attached to the DOM. </description></item> <item><description> Wait for <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks on the matched element, unless <see cref="M:Microsoft.Playwright.IFrame.HoverAsync(System.String,Microsoft.Playwright.FrameHoverOptions)"/> option is set. If the element is detached during the checks, the whole action is retried. </description></item> <item><description>Scroll the element into view if needed.</description></item> <item><description> Use <see cref="P:Microsoft.Playwright.IPage.Mouse"/> to hover over the center of the element, or the specified <see cref="M:Microsoft.Playwright.IFrame.HoverAsync(System.String,Microsoft.Playwright.FrameHoverOptions)"/>. </description></item> </list> <para> When all steps combined have not finished during the specified <see cref="M:Microsoft.Playwright.IFrame.HoverAsync(System.String,Microsoft.Playwright.FrameHoverOptions)"/>, this method throws a <see cref="T:System.TimeoutException"/>. Passing zero timeout disables this. </para> </summary> <param name="selector"> A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrame.InnerHTMLAsync(System.String,Microsoft.Playwright.FrameInnerHTMLOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.InnerHTMLAsync(Microsoft.Playwright.LocatorInnerHTMLOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para>Returns <c>element.innerHTML</c>.</para> </summary> <param name="selector"> A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrame.InnerTextAsync(System.String,Microsoft.Playwright.FrameInnerTextOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.InnerTextAsync(Microsoft.Playwright.LocatorInnerTextOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para>Returns <c>element.innerText</c>.</para> </summary> <param name="selector"> A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrame.InputValueAsync(System.String,Microsoft.Playwright.FrameInputValueOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.InputValueAsync(Microsoft.Playwright.LocatorInputValueOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para> Returns <c>input.value</c> for the selected <c><input></c> or <c><textarea></c> or <c><select></c> element. </para> <para> Throws for non-input elements. However, if the element is inside the <c><label></c> element that has an associated <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control">control</a>, returns the value of the control. </para> </summary> <param name="selector"> A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrame.IsCheckedAsync(System.String,Microsoft.Playwright.FrameIsCheckedOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.IsCheckedAsync(Microsoft.Playwright.LocatorIsCheckedOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para> Returns whether the element is checked. Throws if the element is not a checkbox or radio input. </para> </summary> <param name="selector"> A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used. </param> <param name="options">Call options</param> </member> <member name="P:Microsoft.Playwright.IFrame.IsDetached"> <summary><para>Returns <c>true</c> if the frame has been detached, or <c>false</c> otherwise.</para></summary> </member> <member name="M:Microsoft.Playwright.IFrame.IsDisabledAsync(System.String,Microsoft.Playwright.FrameIsDisabledOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.IsDisabledAsync(Microsoft.Playwright.LocatorIsDisabledOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para>Returns whether the element is disabled, the opposite of <a href="https://playwright.dev/dotnet/docs/actionability#enabled">enabled</a>.</para> </summary> <param name="selector"> A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrame.IsEditableAsync(System.String,Microsoft.Playwright.FrameIsEditableOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.IsEditableAsync(Microsoft.Playwright.LocatorIsEditableOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para>Returns whether the element is <a href="https://playwright.dev/dotnet/docs/actionability#editable">editable</a>.</para> </summary> <param name="selector"> A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrame.IsEnabledAsync(System.String,Microsoft.Playwright.FrameIsEnabledOptions)"> <summary><para>Returns whether the element is <a href="https://playwright.dev/dotnet/docs/actionability#enabled">enabled</a>.</para></summary> <param name="selector"> A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrame.IsHiddenAsync(System.String,Microsoft.Playwright.FrameIsHiddenOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.IsHiddenAsync(Microsoft.Playwright.LocatorIsHiddenOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para> Returns whether the element is hidden, the opposite of <a href="https://playwright.dev/dotnet/docs/actionability#visible">visible</a>. <see cref="M:Microsoft.Playwright.IFrame.IsHiddenAsync(System.String,Microsoft.Playwright.FrameIsHiddenOptions)"/> that does not match any elements is considered hidden. </para> </summary> <param name="selector"> A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrame.IsVisibleAsync(System.String,Microsoft.Playwright.FrameIsVisibleOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.IsVisibleAsync(Microsoft.Playwright.LocatorIsVisibleOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para> Returns whether the element is <a href="https://playwright.dev/dotnet/docs/actionability#visible">visible</a>. <see cref="M:Microsoft.Playwright.IFrame.IsVisibleAsync(System.String,Microsoft.Playwright.FrameIsVisibleOptions)"/> that does not match any elements is considered not visible. </para> </summary> <param name="selector"> A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrame.Locator(System.String,Microsoft.Playwright.FrameLocatorOptions)"> <summary> <para> The method returns an element locator that can be used to perform actions on this page / frame. Locator is resolved to the element immediately before performing an action, so a series of actions on the same locator can in fact be performed on different DOM elements. That would happen if the DOM structure between those actions has changed. </para> <para><a href="https://playwright.dev/dotnet/docs/locators">Learn more about locators</a>.</para> <para><a href="https://playwright.dev/dotnet/docs/locators">Learn more about locators</a>.</para> </summary> <param name="selector">A selector to use when resolving DOM element.</param> <param name="options">Call options</param> </member> <member name="P:Microsoft.Playwright.IFrame.Name"> <summary> <para>Returns frame's name attribute as specified in the tag.</para> <para>If the name is empty, returns the id attribute instead.</para> <para> This value is calculated once when the frame is created, and will not update if the attribute is changed later. </para> </summary> <remarks> <para> This value is calculated once when the frame is created, and will not update if the attribute is changed later. </para> </remarks> </member> <member name="P:Microsoft.Playwright.IFrame.Page"> <summary><para>Returns the page containing this frame.</para></summary> </member> <member name="P:Microsoft.Playwright.IFrame.ParentFrame"> <summary><para>Parent frame, if any. Detached frames and main frames return <c>null</c>.</para></summary> </member> <member name="M:Microsoft.Playwright.IFrame.PressAsync(System.String,System.String,Microsoft.Playwright.FramePressOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.PressAsync(System.String,Microsoft.Playwright.LocatorPressOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para> <see cref="M:Microsoft.Playwright.IFrame.PressAsync(System.String,System.String,Microsoft.Playwright.FramePressOptions)"/> can specify the intended <a href="https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key">keyboardEvent.key</a> value or a single character to generate the text for. A superset of the <see cref="M:Microsoft.Playwright.IFrame.PressAsync(System.String,System.String,Microsoft.Playwright.FramePressOptions)"/> values can be found <a href="https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values">here</a>. Examples of the keys are: </para> <para> <c>F1</c> - <c>F12</c>, <c>Digit0</c>- <c>Digit9</c>, <c>KeyA</c>- <c>KeyZ</c>, <c>Backquote</c>, <c>Minus</c>, <c>Equal</c>, <c>Backslash</c>, <c>Backspace</c>, <c>Tab</c>, <c>Delete</c>, <c>Escape</c>, <c>ArrowDown</c>, <c>End</c>, <c>Enter</c>, <c>Home</c>, <c>Insert</c>, <c>PageDown</c>, <c>PageUp</c>, <c>ArrowRight</c>, <c>ArrowUp</c>, etc. </para> <para> Following modification shortcuts are also supported: <c>Shift</c>, <c>Control</c>, <c>Alt</c>, <c>Meta</c>, <c>ShiftLeft</c>, <c>ControlOrMeta</c>. <c>ControlOrMeta</c> resolves to <c>Control</c> on Windows and Linux and to <c>Meta</c> on macOS. </para> <para> Holding down <c>Shift</c> will type the text that corresponds to the <see cref="M:Microsoft.Playwright.IFrame.PressAsync(System.String,System.String,Microsoft.Playwright.FramePressOptions)"/> in the upper case. </para> <para> If <see cref="M:Microsoft.Playwright.IFrame.PressAsync(System.String,System.String,Microsoft.Playwright.FramePressOptions)"/> is a single character, it is case-sensitive, so the values <c>a</c> and <c>A</c> will generate different respective texts. </para> <para> Shortcuts such as <c>key: "Control+o"</c>, <c>key: "Control++</c> or <c>key: "Control+Shift+T"</c> are supported as well. When specified with the modifier, modifier is pressed and being held while the subsequent key is being pressed. </para> </summary> <param name="selector"> A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used. </param> <param name="key"> Name of the key to press or a character to generate, such as <c>ArrowLeft</c> or <c>a</c>. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrame.QuerySelectorAsync(System.String,Microsoft.Playwright.FrameQuerySelectorOptions)"> <summary> <para>Use locator-based <see cref="M:Microsoft.Playwright.IFrame.Locator(System.String,Microsoft.Playwright.FrameLocatorOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>.</para> <para>Returns the ElementHandle pointing to the frame element.</para> <para> The use of <see cref="T:Microsoft.Playwright.IElementHandle"/> is discouraged, use <see cref="T:Microsoft.Playwright.ILocator"/> objects and web-first assertions instead. </para> <para> The method finds an element matching the specified selector within the frame. If no elements match the selector, returns <c>null</c>. </para> </summary> <remarks> <para> The use of <see cref="T:Microsoft.Playwright.IElementHandle"/> is discouraged, use <see cref="T:Microsoft.Playwright.ILocator"/> objects and web-first assertions instead. </para> </remarks> <param name="selector">A selector to query for.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrame.QuerySelectorAllAsync(System.String)"> <summary> <para>Use locator-based <see cref="M:Microsoft.Playwright.IFrame.Locator(System.String,Microsoft.Playwright.FrameLocatorOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>.</para> <para>Returns the ElementHandles pointing to the frame elements.</para> <para> The use of <see cref="T:Microsoft.Playwright.IElementHandle"/> is discouraged, use <see cref="T:Microsoft.Playwright.ILocator"/> objects instead. </para> <para> The method finds all elements matching the specified selector within the frame. If no elements match the selector, returns empty array. </para> </summary> <remarks> <para> The use of <see cref="T:Microsoft.Playwright.IElementHandle"/> is discouraged, use <see cref="T:Microsoft.Playwright.ILocator"/> objects instead. </para> </remarks> <param name="selector">A selector to query for.</param> </member> <member name="M:Microsoft.Playwright.IFrame.SelectOptionAsync(System.String,System.String,Microsoft.Playwright.FrameSelectOptionOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.SelectOptionAsync(System.String,Microsoft.Playwright.LocatorSelectOptionOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para> This method waits for an element matching <see cref="M:Microsoft.Playwright.IFrame.SelectOptionAsync(System.String,System.String,Microsoft.Playwright.FrameSelectOptionOptions)"/>, waits for <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks, waits until all specified options are present in the <c><select></c> element and selects these options. </para> <para> If the target element is not a <c><select></c> element, this method throws an error. However, if the element is inside the <c><label></c> element that has an associated <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control">control</a>, the control will be used instead. </para> <para>Returns the array of option values that have been successfully selected.</para> <para> Triggers a <c>change</c> and <c>input</c> event once all the provided options have been selected. </para> <para>**Usage**</para> <code> // Single selection matching the value or label<br/> await frame.SelectOptionAsync("select#colors", new[] { "blue" });<br/> // single selection matching both the value and the label<br/> await frame.SelectOptionAsync("select#colors", new[] { new SelectOptionValue() { Label = "blue" } });<br/> // multiple selection<br/> await frame.SelectOptionAsync("select#colors", new[] { "red", "green", "blue" }); </code> </summary> <param name="selector">A selector to query for.</param> <param name="values"> Options to select. If the <c><select></c> has the <c>multiple</c> attribute, all matching options are selected, otherwise only the first option matching one of the passed options is selected. String values are matching both values and labels. Option is considered matching if all specified properties match. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrame.SelectOptionAsync(System.String,Microsoft.Playwright.IElementHandle,Microsoft.Playwright.FrameSelectOptionOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.SelectOptionAsync(System.String,Microsoft.Playwright.LocatorSelectOptionOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para> This method waits for an element matching <see cref="M:Microsoft.Playwright.IFrame.SelectOptionAsync(System.String,System.String,Microsoft.Playwright.FrameSelectOptionOptions)"/>, waits for <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks, waits until all specified options are present in the <c><select></c> element and selects these options. </para> <para> If the target element is not a <c><select></c> element, this method throws an error. However, if the element is inside the <c><label></c> element that has an associated <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control">control</a>, the control will be used instead. </para> <para>Returns the array of option values that have been successfully selected.</para> <para> Triggers a <c>change</c> and <c>input</c> event once all the provided options have been selected. </para> <para>**Usage**</para> <code> // Single selection matching the value or label<br/> await frame.SelectOptionAsync("select#colors", new[] { "blue" });<br/> // single selection matching both the value and the label<br/> await frame.SelectOptionAsync("select#colors", new[] { new SelectOptionValue() { Label = "blue" } });<br/> // multiple selection<br/> await frame.SelectOptionAsync("select#colors", new[] { "red", "green", "blue" }); </code> </summary> <param name="selector">A selector to query for.</param> <param name="values"> Options to select. If the <c><select></c> has the <c>multiple</c> attribute, all matching options are selected, otherwise only the first option matching one of the passed options is selected. String values are matching both values and labels. Option is considered matching if all specified properties match. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrame.SelectOptionAsync(System.String,System.Collections.Generic.IEnumerable{System.String},Microsoft.Playwright.FrameSelectOptionOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.SelectOptionAsync(System.String,Microsoft.Playwright.LocatorSelectOptionOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para> This method waits for an element matching <see cref="M:Microsoft.Playwright.IFrame.SelectOptionAsync(System.String,System.String,Microsoft.Playwright.FrameSelectOptionOptions)"/>, waits for <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks, waits until all specified options are present in the <c><select></c> element and selects these options. </para> <para> If the target element is not a <c><select></c> element, this method throws an error. However, if the element is inside the <c><label></c> element that has an associated <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control">control</a>, the control will be used instead. </para> <para>Returns the array of option values that have been successfully selected.</para> <para> Triggers a <c>change</c> and <c>input</c> event once all the provided options have been selected. </para> <para>**Usage**</para> <code> // Single selection matching the value or label<br/> await frame.SelectOptionAsync("select#colors", new[] { "blue" });<br/> // single selection matching both the value and the label<br/> await frame.SelectOptionAsync("select#colors", new[] { new SelectOptionValue() { Label = "blue" } });<br/> // multiple selection<br/> await frame.SelectOptionAsync("select#colors", new[] { "red", "green", "blue" }); </code> </summary> <param name="selector">A selector to query for.</param> <param name="values"> Options to select. If the <c><select></c> has the <c>multiple</c> attribute, all matching options are selected, otherwise only the first option matching one of the passed options is selected. String values are matching both values and labels. Option is considered matching if all specified properties match. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrame.SelectOptionAsync(System.String,Microsoft.Playwright.SelectOptionValue,Microsoft.Playwright.FrameSelectOptionOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.SelectOptionAsync(System.String,Microsoft.Playwright.LocatorSelectOptionOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para> This method waits for an element matching <see cref="M:Microsoft.Playwright.IFrame.SelectOptionAsync(System.String,System.String,Microsoft.Playwright.FrameSelectOptionOptions)"/>, waits for <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks, waits until all specified options are present in the <c><select></c> element and selects these options. </para> <para> If the target element is not a <c><select></c> element, this method throws an error. However, if the element is inside the <c><label></c> element that has an associated <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control">control</a>, the control will be used instead. </para> <para>Returns the array of option values that have been successfully selected.</para> <para> Triggers a <c>change</c> and <c>input</c> event once all the provided options have been selected. </para> <para>**Usage**</para> <code> // Single selection matching the value or label<br/> await frame.SelectOptionAsync("select#colors", new[] { "blue" });<br/> // single selection matching both the value and the label<br/> await frame.SelectOptionAsync("select#colors", new[] { new SelectOptionValue() { Label = "blue" } });<br/> // multiple selection<br/> await frame.SelectOptionAsync("select#colors", new[] { "red", "green", "blue" }); </code> </summary> <param name="selector">A selector to query for.</param> <param name="values"> Options to select. If the <c><select></c> has the <c>multiple</c> attribute, all matching options are selected, otherwise only the first option matching one of the passed options is selected. String values are matching both values and labels. Option is considered matching if all specified properties match. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrame.SelectOptionAsync(System.String,System.Collections.Generic.IEnumerable{Microsoft.Playwright.IElementHandle},Microsoft.Playwright.FrameSelectOptionOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.SelectOptionAsync(System.String,Microsoft.Playwright.LocatorSelectOptionOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para> This method waits for an element matching <see cref="M:Microsoft.Playwright.IFrame.SelectOptionAsync(System.String,System.String,Microsoft.Playwright.FrameSelectOptionOptions)"/>, waits for <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks, waits until all specified options are present in the <c><select></c> element and selects these options. </para> <para> If the target element is not a <c><select></c> element, this method throws an error. However, if the element is inside the <c><label></c> element that has an associated <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control">control</a>, the control will be used instead. </para> <para>Returns the array of option values that have been successfully selected.</para> <para> Triggers a <c>change</c> and <c>input</c> event once all the provided options have been selected. </para> <para>**Usage**</para> <code> // Single selection matching the value or label<br/> await frame.SelectOptionAsync("select#colors", new[] { "blue" });<br/> // single selection matching both the value and the label<br/> await frame.SelectOptionAsync("select#colors", new[] { new SelectOptionValue() { Label = "blue" } });<br/> // multiple selection<br/> await frame.SelectOptionAsync("select#colors", new[] { "red", "green", "blue" }); </code> </summary> <param name="selector">A selector to query for.</param> <param name="values"> Options to select. If the <c><select></c> has the <c>multiple</c> attribute, all matching options are selected, otherwise only the first option matching one of the passed options is selected. String values are matching both values and labels. Option is considered matching if all specified properties match. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrame.SelectOptionAsync(System.String,System.Collections.Generic.IEnumerable{Microsoft.Playwright.SelectOptionValue},Microsoft.Playwright.FrameSelectOptionOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.SelectOptionAsync(System.String,Microsoft.Playwright.LocatorSelectOptionOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para> This method waits for an element matching <see cref="M:Microsoft.Playwright.IFrame.SelectOptionAsync(System.String,System.String,Microsoft.Playwright.FrameSelectOptionOptions)"/>, waits for <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks, waits until all specified options are present in the <c><select></c> element and selects these options. </para> <para> If the target element is not a <c><select></c> element, this method throws an error. However, if the element is inside the <c><label></c> element that has an associated <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control">control</a>, the control will be used instead. </para> <para>Returns the array of option values that have been successfully selected.</para> <para> Triggers a <c>change</c> and <c>input</c> event once all the provided options have been selected. </para> <para>**Usage**</para> <code> // Single selection matching the value or label<br/> await frame.SelectOptionAsync("select#colors", new[] { "blue" });<br/> // single selection matching both the value and the label<br/> await frame.SelectOptionAsync("select#colors", new[] { new SelectOptionValue() { Label = "blue" } });<br/> // multiple selection<br/> await frame.SelectOptionAsync("select#colors", new[] { "red", "green", "blue" }); </code> </summary> <param name="selector">A selector to query for.</param> <param name="values"> Options to select. If the <c><select></c> has the <c>multiple</c> attribute, all matching options are selected, otherwise only the first option matching one of the passed options is selected. String values are matching both values and labels. Option is considered matching if all specified properties match. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrame.SetCheckedAsync(System.String,System.Boolean,Microsoft.Playwright.FrameSetCheckedOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.SetCheckedAsync(System.Boolean,Microsoft.Playwright.LocatorSetCheckedOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para> This method checks or unchecks an element matching <see cref="M:Microsoft.Playwright.IFrame.SetCheckedAsync(System.String,System.Boolean,Microsoft.Playwright.FrameSetCheckedOptions)"/> by performing the following steps: </para> <list type="ordinal"> <item><description> Find an element matching <see cref="M:Microsoft.Playwright.IFrame.SetCheckedAsync(System.String,System.Boolean,Microsoft.Playwright.FrameSetCheckedOptions)"/>. If there is none, wait until a matching element is attached to the DOM. </description></item> <item><description> Ensure that matched element is a checkbox or a radio input. If not, this method throws. </description></item> <item><description>If the element already has the right checked state, this method returns immediately.</description></item> <item><description> Wait for <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks on the matched element, unless <see cref="M:Microsoft.Playwright.IFrame.SetCheckedAsync(System.String,System.Boolean,Microsoft.Playwright.FrameSetCheckedOptions)"/> option is set. If the element is detached during the checks, the whole action is retried. </description></item> <item><description>Scroll the element into view if needed.</description></item> <item><description>Use <see cref="P:Microsoft.Playwright.IPage.Mouse"/> to click in the center of the element.</description></item> <item><description>Ensure that the element is now checked or unchecked. If not, this method throws.</description></item> </list> <para> When all steps combined have not finished during the specified <see cref="M:Microsoft.Playwright.IFrame.SetCheckedAsync(System.String,System.Boolean,Microsoft.Playwright.FrameSetCheckedOptions)"/>, this method throws a <see cref="T:System.TimeoutException"/>. Passing zero timeout disables this. </para> </summary> <param name="selector"> A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used. </param> <param name="checkedState">Whether to check or uncheck the checkbox.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrame.SetContentAsync(System.String,Microsoft.Playwright.FrameSetContentOptions)"> <summary> <para> This method internally calls <a href="https://developer.mozilla.org/en-US/docs/Web/API/Document/write">document.write()</a>, inheriting all its specific characteristics and behaviors. </para> </summary> <param name="html">HTML markup to assign to the page.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrame.SetInputFilesAsync(System.String,System.String,Microsoft.Playwright.FrameSetInputFilesOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.SetInputFilesAsync(System.String,Microsoft.Playwright.LocatorSetInputFilesOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para> Sets the value of the file input to these file paths or files. If some of the <c>filePaths</c> are relative paths, then they are resolved relative to the current working directory. For empty array, clears the selected files. </para> <para> This method expects <see cref="M:Microsoft.Playwright.IFrame.SetInputFilesAsync(System.String,System.String,Microsoft.Playwright.FrameSetInputFilesOptions)"/> to point to an <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input">input element</a>. However, if the element is inside the <c><label></c> element that has an associated <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control">control</a>, targets the control instead. </para> </summary> <param name="selector"> A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used. </param> <param name="files"> </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrame.SetInputFilesAsync(System.String,System.Collections.Generic.IEnumerable{System.String},Microsoft.Playwright.FrameSetInputFilesOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.SetInputFilesAsync(System.String,Microsoft.Playwright.LocatorSetInputFilesOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para> Sets the value of the file input to these file paths or files. If some of the <c>filePaths</c> are relative paths, then they are resolved relative to the current working directory. For empty array, clears the selected files. </para> <para> This method expects <see cref="M:Microsoft.Playwright.IFrame.SetInputFilesAsync(System.String,System.String,Microsoft.Playwright.FrameSetInputFilesOptions)"/> to point to an <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input">input element</a>. However, if the element is inside the <c><label></c> element that has an associated <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control">control</a>, targets the control instead. </para> </summary> <param name="selector"> A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used. </param> <param name="files"> </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrame.SetInputFilesAsync(System.String,Microsoft.Playwright.FilePayload,Microsoft.Playwright.FrameSetInputFilesOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.SetInputFilesAsync(System.String,Microsoft.Playwright.LocatorSetInputFilesOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para> Sets the value of the file input to these file paths or files. If some of the <c>filePaths</c> are relative paths, then they are resolved relative to the current working directory. For empty array, clears the selected files. </para> <para> This method expects <see cref="M:Microsoft.Playwright.IFrame.SetInputFilesAsync(System.String,System.String,Microsoft.Playwright.FrameSetInputFilesOptions)"/> to point to an <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input">input element</a>. However, if the element is inside the <c><label></c> element that has an associated <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control">control</a>, targets the control instead. </para> </summary> <param name="selector"> A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used. </param> <param name="files"> </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrame.SetInputFilesAsync(System.String,System.Collections.Generic.IEnumerable{Microsoft.Playwright.FilePayload},Microsoft.Playwright.FrameSetInputFilesOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.SetInputFilesAsync(System.String,Microsoft.Playwright.LocatorSetInputFilesOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para> Sets the value of the file input to these file paths or files. If some of the <c>filePaths</c> are relative paths, then they are resolved relative to the current working directory. For empty array, clears the selected files. </para> <para> This method expects <see cref="M:Microsoft.Playwright.IFrame.SetInputFilesAsync(System.String,System.String,Microsoft.Playwright.FrameSetInputFilesOptions)"/> to point to an <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input">input element</a>. However, if the element is inside the <c><label></c> element that has an associated <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control">control</a>, targets the control instead. </para> </summary> <param name="selector"> A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used. </param> <param name="files"> </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrame.TapAsync(System.String,Microsoft.Playwright.FrameTapOptions)"> <summary> <para>Use locator-based <see cref="M:Microsoft.Playwright.ILocator.TapAsync(Microsoft.Playwright.LocatorTapOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>.</para> <para> This method taps an element matching <see cref="M:Microsoft.Playwright.IFrame.TapAsync(System.String,Microsoft.Playwright.FrameTapOptions)"/> by performing the following steps: </para> <list type="ordinal"> <item><description> Find an element matching <see cref="M:Microsoft.Playwright.IFrame.TapAsync(System.String,Microsoft.Playwright.FrameTapOptions)"/>. If there is none, wait until a matching element is attached to the DOM. </description></item> <item><description> Wait for <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks on the matched element, unless <see cref="M:Microsoft.Playwright.IFrame.TapAsync(System.String,Microsoft.Playwright.FrameTapOptions)"/> option is set. If the element is detached during the checks, the whole action is retried. </description></item> <item><description>Scroll the element into view if needed.</description></item> <item><description> Use <see cref="P:Microsoft.Playwright.IPage.Touchscreen"/> to tap the center of the element, or the specified <see cref="M:Microsoft.Playwright.IFrame.TapAsync(System.String,Microsoft.Playwright.FrameTapOptions)"/>. </description></item> </list> <para> When all steps combined have not finished during the specified <see cref="M:Microsoft.Playwright.IFrame.TapAsync(System.String,Microsoft.Playwright.FrameTapOptions)"/>, this method throws a <see cref="T:System.TimeoutException"/>. Passing zero timeout disables this. </para> <para> <c>frame.tap()</c> requires that the <c>hasTouch</c> option of the browser context be set to true. </para> </summary> <remarks> <para> <c>frame.tap()</c> requires that the <c>hasTouch</c> option of the browser context be set to true. </para> </remarks> <param name="selector"> A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrame.TextContentAsync(System.String,Microsoft.Playwright.FrameTextContentOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.TextContentAsync(Microsoft.Playwright.LocatorTextContentOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para>Returns <c>element.textContent</c>.</para> </summary> <param name="selector"> A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrame.TitleAsync"> <summary><para>Returns the page title.</para></summary> </member> <member name="M:Microsoft.Playwright.IFrame.TypeAsync(System.String,System.String,Microsoft.Playwright.FrameTypeOptions)"> <summary> <para> **DEPRECATED** In most cases, you should use <see cref="M:Microsoft.Playwright.ILocator.FillAsync(System.String,Microsoft.Playwright.LocatorFillOptions)"/> instead. You only need to press keys one by one if there is special keyboard handling on the page - in this case use <see cref="M:Microsoft.Playwright.ILocator.PressSequentiallyAsync(System.String,Microsoft.Playwright.LocatorPressSequentiallyOptions)"/>. </para> <para> Sends a <c>keydown</c>, <c>keypress</c>/<c>input</c>, and <c>keyup</c> event for each character in the text. <c>frame.type</c> can be used to send fine-grained keyboard events. To fill values in form fields, use <see cref="M:Microsoft.Playwright.IFrame.FillAsync(System.String,System.String,Microsoft.Playwright.FrameFillOptions)"/>. </para> <para>To press a special key, like <c>Control</c> or <c>ArrowDown</c>, use <see cref="M:Microsoft.Playwright.IKeyboard.PressAsync(System.String,Microsoft.Playwright.KeyboardPressOptions)"/>.</para> <para>**Usage**</para> </summary> <param name="selector"> A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used. </param> <param name="text">A text to type into a focused element.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrame.UncheckAsync(System.String,Microsoft.Playwright.FrameUncheckOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.UncheckAsync(Microsoft.Playwright.LocatorUncheckOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para> This method checks an element matching <see cref="M:Microsoft.Playwright.IFrame.UncheckAsync(System.String,Microsoft.Playwright.FrameUncheckOptions)"/> by performing the following steps: </para> <list type="ordinal"> <item><description> Find an element matching <see cref="M:Microsoft.Playwright.IFrame.UncheckAsync(System.String,Microsoft.Playwright.FrameUncheckOptions)"/>. If there is none, wait until a matching element is attached to the DOM. </description></item> <item><description> Ensure that matched element is a checkbox or a radio input. If not, this method throws. If the element is already unchecked, this method returns immediately. </description></item> <item><description> Wait for <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks on the matched element, unless <see cref="M:Microsoft.Playwright.IFrame.UncheckAsync(System.String,Microsoft.Playwright.FrameUncheckOptions)"/> option is set. If the element is detached during the checks, the whole action is retried. </description></item> <item><description>Scroll the element into view if needed.</description></item> <item><description>Use <see cref="P:Microsoft.Playwright.IPage.Mouse"/> to click in the center of the element.</description></item> <item><description>Ensure that the element is now unchecked. If not, this method throws.</description></item> </list> <para> When all steps combined have not finished during the specified <see cref="M:Microsoft.Playwright.IFrame.UncheckAsync(System.String,Microsoft.Playwright.FrameUncheckOptions)"/>, this method throws a <see cref="T:System.TimeoutException"/>. Passing zero timeout disables this. </para> </summary> <param name="selector"> A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used. </param> <param name="options">Call options</param> </member> <member name="P:Microsoft.Playwright.IFrame.Url"> <summary><para>Returns frame's url.</para></summary> </member> <member name="M:Microsoft.Playwright.IFrame.WaitForFunctionAsync(System.String,System.Object,Microsoft.Playwright.FrameWaitForFunctionOptions)"> <summary> <para> Returns when the <see cref="M:Microsoft.Playwright.IFrame.WaitForFunctionAsync(System.String,System.Object,Microsoft.Playwright.FrameWaitForFunctionOptions)"/> returns a truthy value, returns that value. </para> <para>**Usage**</para> <para> The <see cref="M:Microsoft.Playwright.IFrame.WaitForFunctionAsync(System.String,System.Object,Microsoft.Playwright.FrameWaitForFunctionOptions)"/> can be used to observe viewport size change: </para> <code> using Microsoft.Playwright;<br/> using System.Threading.Tasks;<br/> <br/> class FrameExamples<br/> {<br/> public static async Task Main()<br/> {<br/> using var playwright = await Playwright.CreateAsync();<br/> await using var browser = await playwright.Firefox.LaunchAsync();<br/> var page = await browser.NewPageAsync();<br/> await page.SetViewportSizeAsync(50, 50);<br/> await page.MainFrame.WaitForFunctionAsync("window.innerWidth < 100");<br/> }<br/> } </code> <para>To pass an argument to the predicate of <c>frame.waitForFunction</c> function:</para> <code> var selector = ".foo";<br/> await page.MainFrame.WaitForFunctionAsync("selector => !!document.querySelector(selector)", selector); </code> </summary> <param name="expression"> JavaScript expression to be evaluated in the browser context. If the expression evaluates to a function, the function is automatically invoked. </param> <param name="arg">Optional argument to pass to <see cref="M:Microsoft.Playwright.IFrame.WaitForFunctionAsync(System.String,System.Object,Microsoft.Playwright.FrameWaitForFunctionOptions)"/>.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrame.WaitForLoadStateAsync(System.Nullable{Microsoft.Playwright.LoadState},Microsoft.Playwright.FrameWaitForLoadStateOptions)"> <summary> <para>Waits for the required load state to be reached.</para> <para> This returns when the frame reaches a required load state, <c>load</c> by default. The navigation must have been committed when this method is called. If current document has already reached the required state, resolves immediately. </para> <para> Most of the time, this method is not needed because Playwright <a href="https://playwright.dev/dotnet/docs/actionability">auto-waits before every action</a>. </para> <para>**Usage**</para> <code> await frame.ClickAsync("button");<br/> await frame.WaitForLoadStateAsync(); // Defaults to LoadState.Load </code> </summary> <remarks> <para> Most of the time, this method is not needed because Playwright <a href="https://playwright.dev/dotnet/docs/actionability">auto-waits before every action</a>. </para> </remarks> <param name="state"> Optional load state to wait for, defaults to <c>load</c>. If the state has been already reached while loading current document, the method resolves immediately. Can be one of: <list type="bullet"> <item><description><c>'load'</c> - wait for the <c>load</c> event to be fired.</description></item> <item><description><c>'domcontentloaded'</c> - wait for the <c>DOMContentLoaded</c> event to be fired.</description></item> <item><description> <c>'networkidle'</c> - **DISCOURAGED** wait until there are no network connections for at least <c>500</c> ms. Don't use this method for testing, rely on web assertions to assess readiness instead. </description></item> </list> </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrame.WaitForNavigationAsync(Microsoft.Playwright.FrameWaitForNavigationOptions)"> <summary> <para> **DEPRECATED** This method is inherently racy, please use <see cref="M:Microsoft.Playwright.IFrame.WaitForURLAsync(System.String,Microsoft.Playwright.FrameWaitForURLOptions)"/> instead. </para> <para> Waits for the frame navigation and returns the main resource response. In case of multiple redirects, the navigation will resolve with the response of the last redirect. In case of navigation to a different anchor or navigation due to History API usage, the navigation will resolve with <c>null</c>. </para> <para>**Usage**</para> <para> This method waits for the frame to navigate to a new URL. It is useful for when you run code which will indirectly cause the frame to navigate. Consider this example: </para> <code> await frame.RunAndWaitForNavigationAsync(async () =><br/> {<br/> // Clicking the link will indirectly cause a navigation.<br/> await frame.ClickAsync("a.delayed-navigation");<br/> });<br/> <br/> // Resolves after navigation has finished </code> <para> Usage of the <a href="https://developer.mozilla.org/en-US/docs/Web/API/History_API">History API</a> to change the URL is considered a navigation. </para> </summary> <remarks> <para> Usage of the <a href="https://developer.mozilla.org/en-US/docs/Web/API/History_API">History API</a> to change the URL is considered a navigation. </para> </remarks> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrame.RunAndWaitForNavigationAsync(System.Func{System.Threading.Tasks.Task},Microsoft.Playwright.FrameRunAndWaitForNavigationOptions)"> <summary> <para> **DEPRECATED** This method is inherently racy, please use <see cref="M:Microsoft.Playwright.IFrame.WaitForURLAsync(System.String,Microsoft.Playwright.FrameWaitForURLOptions)"/> instead. </para> <para> Waits for the frame navigation and returns the main resource response. In case of multiple redirects, the navigation will resolve with the response of the last redirect. In case of navigation to a different anchor or navigation due to History API usage, the navigation will resolve with <c>null</c>. </para> <para>**Usage**</para> <para> This method waits for the frame to navigate to a new URL. It is useful for when you run code which will indirectly cause the frame to navigate. Consider this example: </para> <code> await frame.RunAndWaitForNavigationAsync(async () =><br/> {<br/> // Clicking the link will indirectly cause a navigation.<br/> await frame.ClickAsync("a.delayed-navigation");<br/> });<br/> <br/> // Resolves after navigation has finished </code> <para> Usage of the <a href="https://developer.mozilla.org/en-US/docs/Web/API/History_API">History API</a> to change the URL is considered a navigation. </para> </summary> <remarks> <para> Usage of the <a href="https://developer.mozilla.org/en-US/docs/Web/API/History_API">History API</a> to change the URL is considered a navigation. </para> </remarks> <param name="action">Action that triggers the event.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrame.WaitForSelectorAsync(System.String,Microsoft.Playwright.FrameWaitForSelectorOptions)"> <summary> <para> Use web assertions that assert visibility or a locator-based <see cref="M:Microsoft.Playwright.ILocator.WaitForAsync(Microsoft.Playwright.LocatorWaitForOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para> Returns when element specified by selector satisfies <see cref="M:Microsoft.Playwright.IFrame.WaitForSelectorAsync(System.String,Microsoft.Playwright.FrameWaitForSelectorOptions)"/> option. Returns <c>null</c> if waiting for <c>hidden</c> or <c>detached</c>. </para> <para> Playwright automatically waits for element to be ready before performing an action. Using <see cref="T:Microsoft.Playwright.ILocator"/> objects and web-first assertions make the code wait-for-selector-free. </para> <para> Wait for the <see cref="M:Microsoft.Playwright.IFrame.WaitForSelectorAsync(System.String,Microsoft.Playwright.FrameWaitForSelectorOptions)"/> to satisfy <see cref="M:Microsoft.Playwright.IFrame.WaitForSelectorAsync(System.String,Microsoft.Playwright.FrameWaitForSelectorOptions)"/> option (either appear/disappear from dom, or become visible/hidden). If at the moment of calling the method <see cref="M:Microsoft.Playwright.IFrame.WaitForSelectorAsync(System.String,Microsoft.Playwright.FrameWaitForSelectorOptions)"/> already satisfies the condition, the method will return immediately. If the selector doesn't satisfy the condition for the <see cref="M:Microsoft.Playwright.IFrame.WaitForSelectorAsync(System.String,Microsoft.Playwright.FrameWaitForSelectorOptions)"/> milliseconds, the function will throw. </para> <para>**Usage**</para> <para>This method works across navigations:</para> <code> using Microsoft.Playwright;<br/> using System;<br/> using System.Threading.Tasks;<br/> <br/> class FrameExamples<br/> {<br/> public static async Task Main()<br/> {<br/> using var playwright = await Playwright.CreateAsync();<br/> await using var browser = await playwright.Chromium.LaunchAsync();<br/> var page = await browser.NewPageAsync();<br/> <br/> foreach (var currentUrl in new[] { "https://www.google.com", "https://bbc.com" })<br/> {<br/> await page.GotoAsync(currentUrl);<br/> element = await page.MainFrame.WaitForSelectorAsync("img");<br/> Console.WriteLine($"Loaded image: {await element.GetAttributeAsync("src")}");<br/> }<br/> }<br/> } </code> </summary> <remarks> <para> Playwright automatically waits for element to be ready before performing an action. Using <see cref="T:Microsoft.Playwright.ILocator"/> objects and web-first assertions make the code wait-for-selector-free. </para> </remarks> <param name="selector">A selector to query for.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrame.WaitForTimeoutAsync(System.Single)"> <summary> <para> Never wait for timeout in production. Tests that wait for time are inherently flaky. Use <see cref="T:Microsoft.Playwright.ILocator"/> actions and web assertions that wait automatically. </para> <para>Waits for the given <see cref="M:Microsoft.Playwright.IFrame.WaitForTimeoutAsync(System.Single)"/> in milliseconds.</para> <para> Note that <c>frame.waitForTimeout()</c> should only be used for debugging. Tests using the timer in production are going to be flaky. Use signals such as network events, selectors becoming visible and others instead. </para> </summary> <param name="timeout">A timeout to wait for</param> </member> <member name="M:Microsoft.Playwright.IFrame.WaitForURLAsync(System.String,Microsoft.Playwright.FrameWaitForURLOptions)"> <summary> <para>Waits for the frame to navigate to the given URL.</para> <para>**Usage**</para> <code> await frame.ClickAsync("a.delayed-navigation"); // clicking the link will indirectly cause a navigation<br/> await frame.WaitForURLAsync("**/target.html"); </code> </summary> <param name="url"> A glob pattern, regex pattern or predicate receiving <see cref="!:URL"/> to match while waiting for the navigation. Note that if the parameter is a string without wildcard characters, the method will wait for navigation to URL that is exactly equal to the string. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrame.WaitForURLAsync(System.Text.RegularExpressions.Regex,Microsoft.Playwright.FrameWaitForURLOptions)"> <summary> <para>Waits for the frame to navigate to the given URL.</para> <para>**Usage**</para> <code> await frame.ClickAsync("a.delayed-navigation"); // clicking the link will indirectly cause a navigation<br/> await frame.WaitForURLAsync("**/target.html"); </code> </summary> <param name="url"> A glob pattern, regex pattern or predicate receiving <see cref="!:URL"/> to match while waiting for the navigation. Note that if the parameter is a string without wildcard characters, the method will wait for navigation to URL that is exactly equal to the string. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrame.WaitForURLAsync(System.Func{System.String,System.Boolean},Microsoft.Playwright.FrameWaitForURLOptions)"> <summary> <para>Waits for the frame to navigate to the given URL.</para> <para>**Usage**</para> <code> await frame.ClickAsync("a.delayed-navigation"); // clicking the link will indirectly cause a navigation<br/> await frame.WaitForURLAsync("**/target.html"); </code> </summary> <param name="url"> A glob pattern, regex pattern or predicate receiving <see cref="!:URL"/> to match while waiting for the navigation. Note that if the parameter is a string without wildcard characters, the method will wait for navigation to URL that is exactly equal to the string. </param> <param name="options">Call options</param> </member> <member name="T:Microsoft.Playwright.IFrameLocator"> <summary> <para> FrameLocator represents a view to the <c>iframe</c> on the page. It captures the logic sufficient to retrieve the <c>iframe</c> and locate elements in that iframe. FrameLocator can be created with either <see cref="P:Microsoft.Playwright.ILocator.ContentFrame"/>, <see cref="M:Microsoft.Playwright.IPage.FrameLocator(System.String)"/> or <see cref="M:Microsoft.Playwright.ILocator.FrameLocator(System.String)"/> method. </para> <code> var locator = page.Locator("#my-frame").ContentFrame.GetByText("Submit");<br/> await locator.ClickAsync(); </code> <para>**Strictness**</para> <para> Frame locators are strict. This means that all operations on frame locators will throw if more than one element matches a given selector. </para> <code> // Throws if there are several frames in DOM:<br/> await page.Locator(".result-frame").ContentFrame.GetByRole(AriaRole.Button).ClickAsync();<br/> <br/> // Works because we explicitly tell locator to pick the first frame:<br/> await page.Locator(".result-frame").First.ContentFrame.getByRole(AriaRole.Button).ClickAsync(); </code> <para>**Converting Locator to FrameLocator**</para> <para> If you have a <see cref="T:Microsoft.Playwright.ILocator"/> object pointing to an <c>iframe</c> it can be converted to <see cref="T:Microsoft.Playwright.IFrameLocator"/> using <see cref="P:Microsoft.Playwright.ILocator.ContentFrame"/>. </para> <para>**Converting FrameLocator to Locator**</para> <para> If you have a <see cref="T:Microsoft.Playwright.IFrameLocator"/> object it can be converted to <see cref="T:Microsoft.Playwright.ILocator"/> pointing to the same <c>iframe</c> using <see cref="P:Microsoft.Playwright.IFrameLocator.Owner"/>. </para> </summary> </member> <member name="P:Microsoft.Playwright.IFrameLocator.First"> <summary><para>Returns locator to the first matching frame.</para></summary> </member> <member name="M:Microsoft.Playwright.IFrameLocator.FrameLocator(System.String)"> <summary> <para> When working with iframes, you can create a frame locator that will enter the iframe and allow selecting elements in that iframe. </para> </summary> <param name="selector">A selector to use when resolving DOM element.</param> </member> <member name="M:Microsoft.Playwright.IFrameLocator.GetByAltText(System.String,Microsoft.Playwright.FrameLocatorGetByAltTextOptions)"> <summary> <para>Allows locating elements by their alt text.</para> <para>**Usage**</para> <para>For example, this method will find the image by alt text "Playwright logo":</para> <code>await page.GetByAltText("Playwright logo").ClickAsync();</code> </summary> <param name="text">Text to locate the element for.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrameLocator.GetByAltText(System.Text.RegularExpressions.Regex,Microsoft.Playwright.FrameLocatorGetByAltTextOptions)"> <summary> <para>Allows locating elements by their alt text.</para> <para>**Usage**</para> <para>For example, this method will find the image by alt text "Playwright logo":</para> <code>await page.GetByAltText("Playwright logo").ClickAsync();</code> </summary> <param name="text">Text to locate the element for.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrameLocator.GetByLabel(System.String,Microsoft.Playwright.FrameLocatorGetByLabelOptions)"> <summary> <para> Allows locating input elements by the text of the associated <c><label></c> or <c>aria-labelledby</c> element, or by the <c>aria-label</c> attribute. </para> <para>**Usage**</para> <para> For example, this method will find inputs by label "Username" and "Password" in the following DOM: </para> <code> await page.GetByLabel("Username").FillAsync("john");<br/> await page.GetByLabel("Password").FillAsync("secret"); </code> </summary> <param name="text">Text to locate the element for.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrameLocator.GetByLabel(System.Text.RegularExpressions.Regex,Microsoft.Playwright.FrameLocatorGetByLabelOptions)"> <summary> <para> Allows locating input elements by the text of the associated <c><label></c> or <c>aria-labelledby</c> element, or by the <c>aria-label</c> attribute. </para> <para>**Usage**</para> <para> For example, this method will find inputs by label "Username" and "Password" in the following DOM: </para> <code> await page.GetByLabel("Username").FillAsync("john");<br/> await page.GetByLabel("Password").FillAsync("secret"); </code> </summary> <param name="text">Text to locate the element for.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrameLocator.GetByPlaceholder(System.String,Microsoft.Playwright.FrameLocatorGetByPlaceholderOptions)"> <summary> <para>Allows locating input elements by the placeholder text.</para> <para>**Usage**</para> <para>For example, consider the following DOM structure.</para> <para>You can fill the input after locating it by the placeholder text:</para> <code> await page<br/> .GetByPlaceholder("name@example.com")<br/> .FillAsync("playwright@microsoft.com"); </code> </summary> <param name="text">Text to locate the element for.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrameLocator.GetByPlaceholder(System.Text.RegularExpressions.Regex,Microsoft.Playwright.FrameLocatorGetByPlaceholderOptions)"> <summary> <para>Allows locating input elements by the placeholder text.</para> <para>**Usage**</para> <para>For example, consider the following DOM structure.</para> <para>You can fill the input after locating it by the placeholder text:</para> <code> await page<br/> .GetByPlaceholder("name@example.com")<br/> .FillAsync("playwright@microsoft.com"); </code> </summary> <param name="text">Text to locate the element for.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrameLocator.GetByRole(Microsoft.Playwright.AriaRole,Microsoft.Playwright.FrameLocatorGetByRoleOptions)"> <summary> <para> Allows locating elements by their <a href="https://www.w3.org/TR/wai-aria-1.2/#roles">ARIA role</a>, <a href="https://www.w3.org/TR/wai-aria-1.2/#aria-attributes">ARIA attributes</a> and <a href="https://w3c.github.io/accname/#dfn-accessible-name">accessible name</a>. </para> <para>**Usage**</para> <para>Consider the following DOM structure.</para> <para>You can locate each element by it's implicit role:</para> <code> await Expect(Page<br/> .GetByRole(AriaRole.Heading, new() { Name = "Sign up" }))<br/> .ToBeVisibleAsync();<br/> <br/> await page<br/> .GetByRole(AriaRole.Checkbox, new() { Name = "Subscribe" })<br/> .CheckAsync();<br/> <br/> await page<br/> .GetByRole(AriaRole.Button, new() {<br/> NameRegex = new Regex("submit", RegexOptions.IgnoreCase)<br/> })<br/> .ClickAsync(); </code> <para>**Details**</para> <para> Role selector **does not replace** accessibility audits and conformance tests, but rather gives early feedback about the ARIA guidelines. </para> <para> Many html elements have an implicitly <a href="https://w3c.github.io/html-aam/#html-element-role-mappings">defined role</a> that is recognized by the role selector. You can find all the <a href="https://www.w3.org/TR/wai-aria-1.2/#role_definitions">supported roles here</a>. ARIA guidelines **do not recommend** duplicating implicit roles and attributes by setting <c>role</c> and/or <c>aria-*</c> attributes to default values. </para> </summary> <param name="role">Required aria role.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrameLocator.GetByTestId(System.String)"> <summary> <para>Locate element by the test id.</para> <para>**Usage**</para> <para>Consider the following DOM structure.</para> <para>You can locate the element by it's test id:</para> <code>await page.GetByTestId("directions").ClickAsync();</code> <para>**Details**</para> <para> By default, the <c>data-testid</c> attribute is used as a test id. Use <see cref="M:Microsoft.Playwright.ISelectors.SetTestIdAttribute(System.String)"/> to configure a different test id attribute if necessary. </para> </summary> <param name="testId">Id to locate the element by.</param> </member> <member name="M:Microsoft.Playwright.IFrameLocator.GetByTestId(System.Text.RegularExpressions.Regex)"> <summary> <para>Locate element by the test id.</para> <para>**Usage**</para> <para>Consider the following DOM structure.</para> <para>You can locate the element by it's test id:</para> <code>await page.GetByTestId("directions").ClickAsync();</code> <para>**Details**</para> <para> By default, the <c>data-testid</c> attribute is used as a test id. Use <see cref="M:Microsoft.Playwright.ISelectors.SetTestIdAttribute(System.String)"/> to configure a different test id attribute if necessary. </para> </summary> <param name="testId">Id to locate the element by.</param> </member> <member name="M:Microsoft.Playwright.IFrameLocator.GetByText(System.String,Microsoft.Playwright.FrameLocatorGetByTextOptions)"> <summary> <para>Allows locating elements that contain given text.</para> <para> See also <see cref="M:Microsoft.Playwright.ILocator.Filter(Microsoft.Playwright.LocatorFilterOptions)"/> that allows to match by another criteria, like an accessible role, and then filter by the text content. </para> <para>**Usage**</para> <para>Consider the following DOM structure:</para> <para>You can locate by text substring, exact string, or a regular expression:</para> <code> // Matches <span><br/> page.GetByText("world");<br/> <br/> // Matches first <div><br/> page.GetByText("Hello world");<br/> <br/> // Matches second <div><br/> page.GetByText("Hello", new() { Exact = true });<br/> <br/> // Matches both <div>s<br/> page.GetByText(new Regex("Hello"));<br/> <br/> // Matches second <div><br/> page.GetByText(new Regex("^hello$", RegexOptions.IgnoreCase)); </code> <para>**Details**</para> <para> Matching by text always normalizes whitespace, even with exact match. For example, it turns multiple spaces into one, turns line breaks into spaces and ignores leading and trailing whitespace. </para> <para> Input elements of the type <c>button</c> and <c>submit</c> are matched by their <c>value</c> instead of the text content. For example, locating by text <c>"Log in"</c> matches <c><input type=button value="Log in"></c>. </para> </summary> <param name="text">Text to locate the element for.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrameLocator.GetByText(System.Text.RegularExpressions.Regex,Microsoft.Playwright.FrameLocatorGetByTextOptions)"> <summary> <para>Allows locating elements that contain given text.</para> <para> See also <see cref="M:Microsoft.Playwright.ILocator.Filter(Microsoft.Playwright.LocatorFilterOptions)"/> that allows to match by another criteria, like an accessible role, and then filter by the text content. </para> <para>**Usage**</para> <para>Consider the following DOM structure:</para> <para>You can locate by text substring, exact string, or a regular expression:</para> <code> // Matches <span><br/> page.GetByText("world");<br/> <br/> // Matches first <div><br/> page.GetByText("Hello world");<br/> <br/> // Matches second <div><br/> page.GetByText("Hello", new() { Exact = true });<br/> <br/> // Matches both <div>s<br/> page.GetByText(new Regex("Hello"));<br/> <br/> // Matches second <div><br/> page.GetByText(new Regex("^hello$", RegexOptions.IgnoreCase)); </code> <para>**Details**</para> <para> Matching by text always normalizes whitespace, even with exact match. For example, it turns multiple spaces into one, turns line breaks into spaces and ignores leading and trailing whitespace. </para> <para> Input elements of the type <c>button</c> and <c>submit</c> are matched by their <c>value</c> instead of the text content. For example, locating by text <c>"Log in"</c> matches <c><input type=button value="Log in"></c>. </para> </summary> <param name="text">Text to locate the element for.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrameLocator.GetByTitle(System.String,Microsoft.Playwright.FrameLocatorGetByTitleOptions)"> <summary> <para>Allows locating elements by their title attribute.</para> <para>**Usage**</para> <para>Consider the following DOM structure.</para> <para>You can check the issues count after locating it by the title text:</para> <code>await Expect(Page.GetByTitle("Issues count")).toHaveText("25 issues");</code> </summary> <param name="text">Text to locate the element for.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrameLocator.GetByTitle(System.Text.RegularExpressions.Regex,Microsoft.Playwright.FrameLocatorGetByTitleOptions)"> <summary> <para>Allows locating elements by their title attribute.</para> <para>**Usage**</para> <para>Consider the following DOM structure.</para> <para>You can check the issues count after locating it by the title text:</para> <code>await Expect(Page.GetByTitle("Issues count")).toHaveText("25 issues");</code> </summary> <param name="text">Text to locate the element for.</param> <param name="options">Call options</param> </member> <member name="P:Microsoft.Playwright.IFrameLocator.Last"> <summary><para>Returns locator to the last matching frame.</para></summary> </member> <member name="M:Microsoft.Playwright.IFrameLocator.Locator(System.String,Microsoft.Playwright.FrameLocatorLocatorOptions)"> <summary> <para> The method finds an element matching the specified selector in the locator's subtree. It also accepts filter options, similar to <see cref="M:Microsoft.Playwright.ILocator.Filter(Microsoft.Playwright.LocatorFilterOptions)"/> method. </para> <para><a href="https://playwright.dev/dotnet/docs/locators">Learn more about locators</a>.</para> </summary> <param name="selectorOrLocator">A selector or locator to use when resolving DOM element.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrameLocator.Locator(Microsoft.Playwright.ILocator,Microsoft.Playwright.FrameLocatorLocatorOptions)"> <summary> <para> The method finds an element matching the specified selector in the locator's subtree. It also accepts filter options, similar to <see cref="M:Microsoft.Playwright.ILocator.Filter(Microsoft.Playwright.LocatorFilterOptions)"/> method. </para> <para><a href="https://playwright.dev/dotnet/docs/locators">Learn more about locators</a>.</para> </summary> <param name="selectorOrLocator">A selector or locator to use when resolving DOM element.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IFrameLocator.Nth(System.Int32)"> <summary> <para> **DEPRECATED** Use <see cref="M:Microsoft.Playwright.ILocator.Nth(System.Int32)"/> followed by <see cref="P:Microsoft.Playwright.ILocator.ContentFrame"/> instead. </para> <para> Returns locator to the n-th matching frame. It's zero based, <c>nth(0)</c> selects the first frame. </para> </summary> <param name="index"> </param> </member> <member name="P:Microsoft.Playwright.IFrameLocator.Owner"> <summary> <para> Returns a <see cref="T:Microsoft.Playwright.ILocator"/> object pointing to the same <c>iframe</c> as this frame locator. </para> <para> Useful when you have a <see cref="T:Microsoft.Playwright.IFrameLocator"/> object obtained somewhere, and later on would like to interact with the <c>iframe</c> element. </para> <para>For a reverse operation, use <see cref="P:Microsoft.Playwright.ILocator.ContentFrame"/>.</para> <para>**Usage**</para> <code> var frameLocator = Page.Locator("iframe[name=\"embedded\"]").ContentFrame;<br/> // ...<br/> var locator = frameLocator.Owner;<br/> await Expect(locator).ToBeVisibleAsync(); </code> </summary> </member> <member name="T:Microsoft.Playwright.IJSHandle"> <summary> <para> JSHandle represents an in-page JavaScript object. JSHandles can be created with the <see cref="M:Microsoft.Playwright.IPage.EvaluateHandleAsync(System.String,System.Object)"/> method. </para> <code>var windowHandle = await page.EvaluateHandleAsync("() => window");</code> <para> JSHandle prevents the referenced JavaScript object being garbage collected unless the handle is exposed with <see cref="!:IJSHandle.DisposeAsync"/>. JSHandles are auto-disposed when their origin frame gets navigated or the parent context gets destroyed. </para> <para> JSHandle instances can be used as an argument in <see cref="M:Microsoft.Playwright.IPage.EvalOnSelectorAsync(System.String,System.String,System.Object)"/>, <see cref="M:Microsoft.Playwright.IPage.EvaluateAsync(System.String,System.Object)"/> and <see cref="M:Microsoft.Playwright.IPage.EvaluateHandleAsync(System.String,System.Object)"/> methods. </para> </summary> </member> <member name="M:Microsoft.Playwright.IJSHandle.AsElement"> <summary> <para> Returns either <c>null</c> or the object handle itself, if the object handle is an instance of <see cref="T:Microsoft.Playwright.IElementHandle"/>. </para> </summary> </member> <member name="M:Microsoft.Playwright.IJSHandle.EvaluateAsync``1(System.String,System.Object)"> <summary> <para>Returns the return value of <see cref="M:Microsoft.Playwright.IJSHandle.EvaluateAsync(System.String,System.Object)"/>.</para> <para>This method passes this handle as the first argument to <see cref="M:Microsoft.Playwright.IJSHandle.EvaluateAsync(System.String,System.Object)"/>.</para> <para> If <see cref="M:Microsoft.Playwright.IJSHandle.EvaluateAsync(System.String,System.Object)"/> returns a <see cref="T:System.Threading.Tasks.Task"/>, then <c>handle.evaluate</c> would wait for the promise to resolve and return its value. </para> <para>**Usage**</para> <code> var tweetHandle = await page.QuerySelectorAsync(".tweet .retweets");<br/> Assert.AreEqual("10 retweets", await tweetHandle.EvaluateAsync("node => node.innerText")); </code> </summary> <param name="expression"> JavaScript expression to be evaluated in the browser context. If the expression evaluates to a function, the function is automatically invoked. </param> <param name="arg">Optional argument to pass to <see cref="M:Microsoft.Playwright.IJSHandle.EvaluateAsync(System.String,System.Object)"/>.</param> </member> <member name="M:Microsoft.Playwright.IJSHandle.EvaluateHandleAsync(System.String,System.Object)"> <summary> <para> Returns the return value of <see cref="M:Microsoft.Playwright.IJSHandle.EvaluateHandleAsync(System.String,System.Object)"/> as a <see cref="T:Microsoft.Playwright.IJSHandle"/>. </para> <para>This method passes this handle as the first argument to <see cref="M:Microsoft.Playwright.IJSHandle.EvaluateHandleAsync(System.String,System.Object)"/>.</para> <para> The only difference between <c>jsHandle.evaluate</c> and <c>jsHandle.evaluateHandle</c> is that <c>jsHandle.evaluateHandle</c> returns <see cref="T:Microsoft.Playwright.IJSHandle"/>. </para> <para> If the function passed to the <c>jsHandle.evaluateHandle</c> returns a <see cref="T:System.Threading.Tasks.Task"/>, then <c>jsHandle.evaluateHandle</c> would wait for the promise to resolve and return its value. </para> <para>See <see cref="M:Microsoft.Playwright.IPage.EvaluateHandleAsync(System.String,System.Object)"/> for more details.</para> </summary> <param name="expression"> JavaScript expression to be evaluated in the browser context. If the expression evaluates to a function, the function is automatically invoked. </param> <param name="arg">Optional argument to pass to <see cref="M:Microsoft.Playwright.IJSHandle.EvaluateHandleAsync(System.String,System.Object)"/>.</param> </member> <member name="M:Microsoft.Playwright.IJSHandle.GetPropertiesAsync"> <summary> <para> The method returns a map with **own property names** as keys and JSHandle instances for the property values. </para> <para>**Usage**</para> <code> var handle = await page.EvaluateHandleAsync("() => ({ window, document }");<br/> var properties = await handle.GetPropertiesAsync();<br/> var windowHandle = properties["window"];<br/> var documentHandle = properties["document"];<br/> await handle.DisposeAsync(); </code> </summary> </member> <member name="M:Microsoft.Playwright.IJSHandle.GetPropertyAsync(System.String)"> <summary><para>Fetches a single property from the referenced object.</para></summary> <param name="propertyName">property to get</param> </member> <member name="M:Microsoft.Playwright.IJSHandle.JsonValueAsync``1"> <summary> <para> Returns a JSON representation of the object. If the object has a <c>toJSON</c> function, it **will not be called**. </para> <para> The method will return an empty JSON object if the referenced object is not stringifiable. It will throw an error if the object has circular references. </para> </summary> <remarks> <para> The method will return an empty JSON object if the referenced object is not stringifiable. It will throw an error if the object has circular references. </para> </remarks> </member> <member name="M:Microsoft.Playwright.IJSHandle.EvaluateAsync(System.String,System.Object)"> <inheritdoc cref="M:Microsoft.Playwright.IJSHandle.EvaluateAsync``1(System.String,System.Object)" /> </member> <member name="T:Microsoft.Playwright.IKeyboard"> <summary> <para> Keyboard provides an api for managing a virtual keyboard. The high level api is <see cref="M:Microsoft.Playwright.IKeyboard.TypeAsync(System.String,Microsoft.Playwright.KeyboardTypeOptions)"/>, which takes raw characters and generates proper <c>keydown</c>, <c>keypress</c>/<c>input</c>, and <c>keyup</c> events on your page. </para> <para> For finer control, you can use <see cref="M:Microsoft.Playwright.IKeyboard.DownAsync(System.String)"/>, <see cref="M:Microsoft.Playwright.IKeyboard.UpAsync(System.String)"/>, and <see cref="M:Microsoft.Playwright.IKeyboard.InsertTextAsync(System.String)"/> to manually fire events as if they were generated from a real keyboard. </para> <para>An example of holding down <c>Shift</c> in order to select and delete some text:</para> <code> await page.Keyboard.TypeAsync("Hello World!");<br/> await page.Keyboard.PressAsync("ArrowLeft");<br/> <br/> await page.Keyboard.DownAsync("Shift");<br/> for (int i = 0; i < " World".Length; i++)<br/> await page.Keyboard.PressAsync("ArrowLeft");<br/> <br/> await page.Keyboard.UpAsync("Shift");<br/> <br/> await page.Keyboard.PressAsync("Backspace");<br/> // Result text will end up saying "Hello!" </code> <para>An example of pressing uppercase <c>A</c></para> <code> await page.Keyboard.PressAsync("Shift+KeyA");<br/> // or<br/> await page.Keyboard.PressAsync("Shift+A"); </code> <para>An example to trigger select-all with the keyboard</para> <code>await page.Keyboard.PressAsync("ControlOrMeta+A");</code> </summary> </member> <member name="M:Microsoft.Playwright.IKeyboard.DownAsync(System.String)"> <summary> <para>Dispatches a <c>keydown</c> event.</para> <para> <see cref="M:Microsoft.Playwright.IKeyboard.DownAsync(System.String)"/> can specify the intended <a href="https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key">keyboardEvent.key</a> value or a single character to generate the text for. A superset of the <see cref="M:Microsoft.Playwright.IKeyboard.DownAsync(System.String)"/> values can be found <a href="https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values">here</a>. Examples of the keys are: </para> <para> <c>F1</c> - <c>F12</c>, <c>Digit0</c>- <c>Digit9</c>, <c>KeyA</c>- <c>KeyZ</c>, <c>Backquote</c>, <c>Minus</c>, <c>Equal</c>, <c>Backslash</c>, <c>Backspace</c>, <c>Tab</c>, <c>Delete</c>, <c>Escape</c>, <c>ArrowDown</c>, <c>End</c>, <c>Enter</c>, <c>Home</c>, <c>Insert</c>, <c>PageDown</c>, <c>PageUp</c>, <c>ArrowRight</c>, <c>ArrowUp</c>, etc. </para> <para> Following modification shortcuts are also supported: <c>Shift</c>, <c>Control</c>, <c>Alt</c>, <c>Meta</c>, <c>ShiftLeft</c>, <c>ControlOrMeta</c>. <c>ControlOrMeta</c> resolves to <c>Control</c> on Windows and Linux and to <c>Meta</c> on macOS. </para> <para> Holding down <c>Shift</c> will type the text that corresponds to the <see cref="M:Microsoft.Playwright.IKeyboard.DownAsync(System.String)"/> in the upper case. </para> <para> If <see cref="M:Microsoft.Playwright.IKeyboard.DownAsync(System.String)"/> is a single character, it is case-sensitive, so the values <c>a</c> and <c>A</c> will generate different respective texts. </para> <para> If <see cref="M:Microsoft.Playwright.IKeyboard.DownAsync(System.String)"/> is a modifier key, <c>Shift</c>, <c>Meta</c>, <c>Control</c>, or <c>Alt</c>, subsequent key presses will be sent with that modifier active. To release the modifier key, use <see cref="M:Microsoft.Playwright.IKeyboard.UpAsync(System.String)"/>. </para> <para> After the key is pressed once, subsequent calls to <see cref="M:Microsoft.Playwright.IKeyboard.DownAsync(System.String)"/> will have <a href="https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/repeat">repeat</a> set to true. To release the key, use <see cref="M:Microsoft.Playwright.IKeyboard.UpAsync(System.String)"/>. </para> <para> Modifier keys DO influence <c>keyboard.down</c>. Holding down <c>Shift</c> will type the text in upper case. </para> </summary> <remarks> <para> Modifier keys DO influence <c>keyboard.down</c>. Holding down <c>Shift</c> will type the text in upper case. </para> </remarks> <param name="key"> Name of the key to press or a character to generate, such as <c>ArrowLeft</c> or <c>a</c>. </param> </member> <member name="M:Microsoft.Playwright.IKeyboard.InsertTextAsync(System.String)"> <summary> <para> Dispatches only <c>input</c> event, does not emit the <c>keydown</c>, <c>keyup</c> or <c>keypress</c> events. </para> <para>**Usage**</para> <code>await page.Keyboard.PressAsync("嗨");</code> <para> Modifier keys DO NOT effect <c>keyboard.insertText</c>. Holding down <c>Shift</c> will not type the text in upper case. </para> </summary> <remarks> <para> Modifier keys DO NOT effect <c>keyboard.insertText</c>. Holding down <c>Shift</c> will not type the text in upper case. </para> </remarks> <param name="text">Sets input to the specified text value.</param> </member> <member name="M:Microsoft.Playwright.IKeyboard.PressAsync(System.String,Microsoft.Playwright.KeyboardPressOptions)"> <summary> <para>In most cases, you should use <see cref="M:Microsoft.Playwright.ILocator.PressAsync(System.String,Microsoft.Playwright.LocatorPressOptions)"/> instead.</para> <para> <see cref="M:Microsoft.Playwright.IKeyboard.PressAsync(System.String,Microsoft.Playwright.KeyboardPressOptions)"/> can specify the intended <a href="https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key">keyboardEvent.key</a> value or a single character to generate the text for. A superset of the <see cref="M:Microsoft.Playwright.IKeyboard.PressAsync(System.String,Microsoft.Playwright.KeyboardPressOptions)"/> values can be found <a href="https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values">here</a>. Examples of the keys are: </para> <para> <c>F1</c> - <c>F12</c>, <c>Digit0</c>- <c>Digit9</c>, <c>KeyA</c>- <c>KeyZ</c>, <c>Backquote</c>, <c>Minus</c>, <c>Equal</c>, <c>Backslash</c>, <c>Backspace</c>, <c>Tab</c>, <c>Delete</c>, <c>Escape</c>, <c>ArrowDown</c>, <c>End</c>, <c>Enter</c>, <c>Home</c>, <c>Insert</c>, <c>PageDown</c>, <c>PageUp</c>, <c>ArrowRight</c>, <c>ArrowUp</c>, etc. </para> <para> Following modification shortcuts are also supported: <c>Shift</c>, <c>Control</c>, <c>Alt</c>, <c>Meta</c>, <c>ShiftLeft</c>, <c>ControlOrMeta</c>. <c>ControlOrMeta</c> resolves to <c>Control</c> on Windows and Linux and to <c>Meta</c> on macOS. </para> <para> Holding down <c>Shift</c> will type the text that corresponds to the <see cref="M:Microsoft.Playwright.IKeyboard.PressAsync(System.String,Microsoft.Playwright.KeyboardPressOptions)"/> in the upper case. </para> <para> If <see cref="M:Microsoft.Playwright.IKeyboard.PressAsync(System.String,Microsoft.Playwright.KeyboardPressOptions)"/> is a single character, it is case-sensitive, so the values <c>a</c> and <c>A</c> will generate different respective texts. </para> <para> Shortcuts such as <c>key: "Control+o"</c>, <c>key: "Control++</c> or <c>key: "Control+Shift+T"</c> are supported as well. When specified with the modifier, modifier is pressed and being held while the subsequent key is being pressed. </para> <para>**Usage**</para> <code> await page.GotoAsync("https://keycode.info");<br/> await page.Keyboard.PressAsync("A");<br/> await page.ScreenshotAsync(new() { Path = "A.png" });<br/> await page.Keyboard.PressAsync("ArrowLeft");<br/> await page.ScreenshotAsync(new() { Path = "ArrowLeft.png" });<br/> await page.Keyboard.PressAsync("Shift+O");<br/> await page.ScreenshotAsync(new() { Path = "O.png" });<br/> await browser.CloseAsync(); </code> <para>Shortcut for <see cref="M:Microsoft.Playwright.IKeyboard.DownAsync(System.String)"/> and <see cref="M:Microsoft.Playwright.IKeyboard.UpAsync(System.String)"/>.</para> </summary> <remarks><para>In most cases, you should use <see cref="M:Microsoft.Playwright.ILocator.PressAsync(System.String,Microsoft.Playwright.LocatorPressOptions)"/> instead.</para></remarks> <param name="key"> Name of the key to press or a character to generate, such as <c>ArrowLeft</c> or <c>a</c>. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IKeyboard.TypeAsync(System.String,Microsoft.Playwright.KeyboardTypeOptions)"> <summary> <para> In most cases, you should use <see cref="M:Microsoft.Playwright.ILocator.FillAsync(System.String,Microsoft.Playwright.LocatorFillOptions)"/> instead. You only need to press keys one by one if there is special keyboard handling on the page - in this case use <see cref="M:Microsoft.Playwright.ILocator.PressSequentiallyAsync(System.String,Microsoft.Playwright.LocatorPressSequentiallyOptions)"/>. </para> <para> Sends a <c>keydown</c>, <c>keypress</c>/<c>input</c>, and <c>keyup</c> event for each character in the text. </para> <para>To press a special key, like <c>Control</c> or <c>ArrowDown</c>, use <see cref="M:Microsoft.Playwright.IKeyboard.PressAsync(System.String,Microsoft.Playwright.KeyboardPressOptions)"/>.</para> <para>**Usage**</para> <code> await page.Keyboard.TypeAsync("Hello"); // types instantly<br/> await page.Keyboard.TypeAsync("World", new() { Delay = 100 }); // types slower, like a user </code> <para> Modifier keys DO NOT effect <c>keyboard.type</c>. Holding down <c>Shift</c> will not type the text in upper case. </para> <para> For characters that are not on a US keyboard, only an <c>input</c> event will be sent. </para> </summary> <remarks> <para> In most cases, you should use <see cref="M:Microsoft.Playwright.ILocator.FillAsync(System.String,Microsoft.Playwright.LocatorFillOptions)"/> instead. You only need to press keys one by one if there is special keyboard handling on the page - in this case use <see cref="M:Microsoft.Playwright.ILocator.PressSequentiallyAsync(System.String,Microsoft.Playwright.LocatorPressSequentiallyOptions)"/>. </para> <para> Modifier keys DO NOT effect <c>keyboard.type</c>. Holding down <c>Shift</c> will not type the text in upper case. </para> <para> For characters that are not on a US keyboard, only an <c>input</c> event will be sent. </para> </remarks> <param name="text">A text to type into a focused element.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IKeyboard.UpAsync(System.String)"> <summary><para>Dispatches a <c>keyup</c> event.</para></summary> <param name="key"> Name of the key to press or a character to generate, such as <c>ArrowLeft</c> or <c>a</c>. </param> </member> <member name="T:Microsoft.Playwright.ILocator"> <summary> <para> Locators are the central piece of Playwright's auto-waiting and retry-ability. In a nutshell, locators represent a way to find element(s) on the page at any moment. A locator can be created with the <see cref="M:Microsoft.Playwright.IPage.Locator(System.String,Microsoft.Playwright.PageLocatorOptions)"/> method. </para> <para><a href="https://playwright.dev/dotnet/docs/locators">Learn more about locators</a>.</para> </summary> </member> <member name="M:Microsoft.Playwright.ILocator.AllAsync"> <summary> <para> When the locator points to a list of elements, this returns an array of locators, pointing to their respective elements. </para> <para> <see cref="M:Microsoft.Playwright.ILocator.AllAsync"/> does not wait for elements to match the locator, and instead immediately returns whatever is present in the page. </para> <para> When the list of elements changes dynamically, <see cref="M:Microsoft.Playwright.ILocator.AllAsync"/> will produce unpredictable and flaky results. </para> <para> When the list of elements is stable, but loaded dynamically, wait for the full list to finish loading before calling <see cref="M:Microsoft.Playwright.ILocator.AllAsync"/>. </para> <para>**Usage**</para> <code> foreach (var li in await page.GetByRole("listitem").AllAsync())<br/> await li.ClickAsync(); </code> </summary> <remarks> <para> <see cref="M:Microsoft.Playwright.ILocator.AllAsync"/> does not wait for elements to match the locator, and instead immediately returns whatever is present in the page. When the list of elements changes dynamically, <see cref="M:Microsoft.Playwright.ILocator.AllAsync"/> will produce unpredictable and flaky results. When the list of elements is stable, but loaded dynamically, wait for the full list to finish loading before calling <see cref="M:Microsoft.Playwright.ILocator.AllAsync"/>. </para> </remarks> </member> <member name="M:Microsoft.Playwright.ILocator.AllInnerTextsAsync"> <summary> <para>Returns an array of <c>node.innerText</c> values for all matching nodes.</para> <para> If you need to assert text on the page, prefer <see cref="M:Microsoft.Playwright.ILocatorAssertions.ToHaveTextAsync(System.String,Microsoft.Playwright.LocatorAssertionsToHaveTextOptions)"/> with <see cref="M:Microsoft.Playwright.ILocatorAssertions.ToHaveTextAsync(System.String,Microsoft.Playwright.LocatorAssertionsToHaveTextOptions)"/> option to avoid flakiness. See <a href="https://playwright.dev/dotnet/docs/test-assertions">assertions guide</a> for more details. </para> <para>**Usage**</para> <code>var texts = await page.GetByRole(AriaRole.Link).AllInnerTextsAsync();</code> </summary> <remarks> <para> If you need to assert text on the page, prefer <see cref="M:Microsoft.Playwright.ILocatorAssertions.ToHaveTextAsync(System.String,Microsoft.Playwright.LocatorAssertionsToHaveTextOptions)"/> with <see cref="M:Microsoft.Playwright.ILocatorAssertions.ToHaveTextAsync(System.String,Microsoft.Playwright.LocatorAssertionsToHaveTextOptions)"/> option to avoid flakiness. See <a href="https://playwright.dev/dotnet/docs/test-assertions">assertions guide</a> for more details. </para> </remarks> </member> <member name="M:Microsoft.Playwright.ILocator.AllTextContentsAsync"> <summary> <para>Returns an array of <c>node.textContent</c> values for all matching nodes.</para> <para> If you need to assert text on the page, prefer <see cref="M:Microsoft.Playwright.ILocatorAssertions.ToHaveTextAsync(System.String,Microsoft.Playwright.LocatorAssertionsToHaveTextOptions)"/> to avoid flakiness. See <a href="https://playwright.dev/dotnet/docs/test-assertions">assertions guide</a> for more details. </para> <para>**Usage**</para> <code>var texts = await page.GetByRole(AriaRole.Link).AllTextContentsAsync();</code> </summary> <remarks> <para> If you need to assert text on the page, prefer <see cref="M:Microsoft.Playwright.ILocatorAssertions.ToHaveTextAsync(System.String,Microsoft.Playwright.LocatorAssertionsToHaveTextOptions)"/> to avoid flakiness. See <a href="https://playwright.dev/dotnet/docs/test-assertions">assertions guide</a> for more details. </para> </remarks> </member> <member name="M:Microsoft.Playwright.ILocator.And(Microsoft.Playwright.ILocator)"> <summary> <para>Creates a locator that matches both this locator and the argument locator.</para> <para>**Usage**</para> <para>The following example finds a button with a specific title.</para> <code>var button = page.GetByRole(AriaRole.Button).And(page.GetByTitle("Subscribe"));</code> </summary> <param name="locator">Additional locator to match.</param> </member> <member name="M:Microsoft.Playwright.ILocator.AriaSnapshotAsync(Microsoft.Playwright.LocatorAriaSnapshotOptions)"> <summary> <para> Captures the aria snapshot of the given element. Read more about <a href="https://playwright.dev/dotnet/docs/aria-snapshots">aria snapshots</a> and <see cref="M:Microsoft.Playwright.ILocatorAssertions.ToMatchAriaSnapshotAsync(System.String,Microsoft.Playwright.LocatorAssertionsToMatchAriaSnapshotOptions)"/> for the corresponding assertion. </para> <para>**Usage**</para> <code>await page.GetByRole(AriaRole.Link).AriaSnapshotAsync();</code> <para>**Details**</para> <para> This method captures the aria snapshot of the given element. The snapshot is a string that represents the state of the element and its children. The snapshot can be used to assert the state of the element in the test, or to compare it to state in the future. </para> <para> The ARIA snapshot is represented using <a href="https://yaml.org/spec/1.2.2/">YAML</a> markup language: </para> <list type="bullet"> <item><description>The keys of the objects are the roles and optional accessible names of the elements.</description></item> <item><description>The values are either text content or an array of child elements.</description></item> <item><description>Generic static text can be represented with the <c>text</c> key.</description></item> </list> <para>Below is the HTML markup and the respective ARIA snapshot:</para> </summary> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocator.BlurAsync(Microsoft.Playwright.LocatorBlurOptions)"> <summary> <para> Calls <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/blur">blur</a> on the element. </para> </summary> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocator.BoundingBoxAsync(Microsoft.Playwright.LocatorBoundingBoxOptions)"> <summary> <para> This method returns the bounding box of the element matching the locator, or <c>null</c> if the element is not visible. The bounding box is calculated relative to the main frame viewport - which is usually the same as the browser window. </para> <para>**Details**</para> <para> Scrolling affects the returned bounding box, similarly to <a href="https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect">Element.getBoundingClientRect</a>. That means <c>x</c> and/or <c>y</c> may be negative. </para> <para> Elements from child frames return the bounding box relative to the main frame, unlike the <a href="https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect">Element.getBoundingClientRect</a>. </para> <para> Assuming the page is static, it is safe to use bounding box coordinates to perform input. For example, the following snippet should click the center of the element. </para> <para>**Usage**</para> <code> var box = await page.GetByRole(AriaRole.Button).BoundingBoxAsync();<br/> await page.Mouse.ClickAsync(box.X + box.Width / 2, box.Y + box.Height / 2); </code> </summary> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocator.CheckAsync(Microsoft.Playwright.LocatorCheckOptions)"> <summary> <para>Ensure that checkbox or radio element is checked.</para> <para>**Details**</para> <para>Performs the following steps:</para> <list type="ordinal"> <item><description> Ensure that element is a checkbox or a radio input. If not, this method throws. If the element is already checked, this method returns immediately. </description></item> <item><description> Wait for <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks on the element, unless <see cref="M:Microsoft.Playwright.ILocator.CheckAsync(Microsoft.Playwright.LocatorCheckOptions)"/> option is set. </description></item> <item><description>Scroll the element into view if needed.</description></item> <item><description>Use <see cref="P:Microsoft.Playwright.IPage.Mouse"/> to click in the center of the element.</description></item> <item><description>Ensure that the element is now checked. If not, this method throws.</description></item> </list> <para> If the element is detached from the DOM at any moment during the action, this method throws. </para> <para> When all steps combined have not finished during the specified <see cref="M:Microsoft.Playwright.ILocator.CheckAsync(Microsoft.Playwright.LocatorCheckOptions)"/>, this method throws a <see cref="T:System.TimeoutException"/>. Passing zero timeout disables this. </para> <para>**Usage**</para> <code>await page.GetByRole(AriaRole.Checkbox).CheckAsync();</code> </summary> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocator.ClearAsync(Microsoft.Playwright.LocatorClearOptions)"> <summary> <para>Clear the input field.</para> <para>**Details**</para> <para> This method waits for <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks, focuses the element, clears it and triggers an <c>input</c> event after clearing. </para> <para> If the target element is not an <c><input></c>, <c><textarea></c> or <c>[contenteditable]</c> element, this method throws an error. However, if the element is inside the <c><label></c> element that has an associated <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control">control</a>, the control will be cleared instead. </para> <para>**Usage**</para> <code>await page.GetByRole(AriaRole.Textbox).ClearAsync();</code> </summary> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocator.ClickAsync(Microsoft.Playwright.LocatorClickOptions)"> <summary> <para>Click an element.</para> <para>**Details**</para> <para>This method clicks the element by performing the following steps:</para> <list type="ordinal"> <item><description> Wait for <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks on the element, unless <see cref="M:Microsoft.Playwright.ILocator.ClickAsync(Microsoft.Playwright.LocatorClickOptions)"/> option is set. </description></item> <item><description>Scroll the element into view if needed.</description></item> <item><description> Use <see cref="P:Microsoft.Playwright.IPage.Mouse"/> to click in the center of the element, or the specified <see cref="M:Microsoft.Playwright.ILocator.ClickAsync(Microsoft.Playwright.LocatorClickOptions)"/>. </description></item> <item><description> Wait for initiated navigations to either succeed or fail, unless <see cref="M:Microsoft.Playwright.ILocator.ClickAsync(Microsoft.Playwright.LocatorClickOptions)"/> option is set. </description></item> </list> <para> If the element is detached from the DOM at any moment during the action, this method throws. </para> <para> When all steps combined have not finished during the specified <see cref="M:Microsoft.Playwright.ILocator.ClickAsync(Microsoft.Playwright.LocatorClickOptions)"/>, this method throws a <see cref="T:System.TimeoutException"/>. Passing zero timeout disables this. </para> <para>**Usage**</para> <para>Click a button:</para> <code>await page.GetByRole(AriaRole.Button).ClickAsync();</code> <para>Shift-right-click at a specific position on a canvas:</para> <code> await page.Locator("canvas").ClickAsync(new() {<br/> Button = MouseButton.Right,<br/> Modifiers = new[] { KeyboardModifier.Shift },<br/> Position = new Position { X = 0, Y = 0 }<br/> }); </code> </summary> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocator.CountAsync"> <summary> <para>Returns the number of elements matching the locator.</para> <para> If you need to assert the number of elements on the page, prefer <see cref="M:Microsoft.Playwright.ILocatorAssertions.ToHaveCountAsync(System.Int32,Microsoft.Playwright.LocatorAssertionsToHaveCountOptions)"/> to avoid flakiness. See <a href="https://playwright.dev/dotnet/docs/test-assertions">assertions guide</a> for more details. </para> <para>**Usage**</para> <code>int count = await page.GetByRole(AriaRole.Listitem).CountAsync();</code> </summary> <remarks> <para> If you need to assert the number of elements on the page, prefer <see cref="M:Microsoft.Playwright.ILocatorAssertions.ToHaveCountAsync(System.Int32,Microsoft.Playwright.LocatorAssertionsToHaveCountOptions)"/> to avoid flakiness. See <a href="https://playwright.dev/dotnet/docs/test-assertions">assertions guide</a> for more details. </para> </remarks> </member> <member name="M:Microsoft.Playwright.ILocator.DblClickAsync(Microsoft.Playwright.LocatorDblClickOptions)"> <summary> <para>Double-click an element.</para> <para>**Details**</para> <para>This method double clicks the element by performing the following steps:</para> <list type="ordinal"> <item><description> Wait for <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks on the element, unless <see cref="M:Microsoft.Playwright.ILocator.DblClickAsync(Microsoft.Playwright.LocatorDblClickOptions)"/> option is set. </description></item> <item><description>Scroll the element into view if needed.</description></item> <item><description> Use <see cref="P:Microsoft.Playwright.IPage.Mouse"/> to double click in the center of the element, or the specified <see cref="M:Microsoft.Playwright.ILocator.DblClickAsync(Microsoft.Playwright.LocatorDblClickOptions)"/>. </description></item> </list> <para> If the element is detached from the DOM at any moment during the action, this method throws. </para> <para> When all steps combined have not finished during the specified <see cref="M:Microsoft.Playwright.ILocator.DblClickAsync(Microsoft.Playwright.LocatorDblClickOptions)"/>, this method throws a <see cref="T:System.TimeoutException"/>. Passing zero timeout disables this. </para> <para> <c>element.dblclick()</c> dispatches two <c>click</c> events and a single <c>dblclick</c> event. </para> </summary> <remarks> <para> <c>element.dblclick()</c> dispatches two <c>click</c> events and a single <c>dblclick</c> event. </para> </remarks> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocator.DispatchEventAsync(System.String,System.Object,Microsoft.Playwright.LocatorDispatchEventOptions)"> <summary> <para>Programmatically dispatch an event on the matching element.</para> <para>**Usage**</para> <code>await locator.DispatchEventAsync("click");</code> <para>**Details**</para> <para> The snippet above dispatches the <c>click</c> event on the element. Regardless of the visibility state of the element, <c>click</c> is dispatched. This is equivalent to calling <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/click">element.click()</a>. </para> <para> Under the hood, it creates an instance of an event based on the given <see cref="M:Microsoft.Playwright.ILocator.DispatchEventAsync(System.String,System.Object,Microsoft.Playwright.LocatorDispatchEventOptions)"/>, initializes it with <see cref="M:Microsoft.Playwright.ILocator.DispatchEventAsync(System.String,System.Object,Microsoft.Playwright.LocatorDispatchEventOptions)"/> properties and dispatches it on the element. Events are <c>composed</c>, <c>cancelable</c> and bubble by default. </para> <para> Since <see cref="M:Microsoft.Playwright.ILocator.DispatchEventAsync(System.String,System.Object,Microsoft.Playwright.LocatorDispatchEventOptions)"/> is event-specific, please refer to the events documentation for the lists of initial properties: </para> <list type="bullet"> <item><description><a href="https://developer.mozilla.org/en-US/docs/Web/API/DeviceMotionEvent/DeviceMotionEvent">DeviceMotionEvent</a></description></item> <item><description><a href="https://developer.mozilla.org/en-US/docs/Web/API/DeviceOrientationEvent/DeviceOrientationEvent">DeviceOrientationEvent</a></description></item> <item><description><a href="https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/DragEvent">DragEvent</a></description></item> <item><description><a href="https://developer.mozilla.org/en-US/docs/Web/API/Event/Event">Event</a></description></item> <item><description><a href="https://developer.mozilla.org/en-US/docs/Web/API/FocusEvent/FocusEvent">FocusEvent</a></description></item> <item><description><a href="https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/KeyboardEvent">KeyboardEvent</a></description></item> <item><description><a href="https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/MouseEvent">MouseEvent</a></description></item> <item><description><a href="https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/PointerEvent">PointerEvent</a></description></item> <item><description><a href="https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/TouchEvent">TouchEvent</a></description></item> <item><description><a href="https://developer.mozilla.org/en-US/docs/Web/API/WheelEvent/WheelEvent">WheelEvent</a></description></item> </list> <para> You can also specify <see cref="T:Microsoft.Playwright.IJSHandle"/> as the property value if you want live objects to be passed into the event: </para> <code> var dataTransfer = await page.EvaluateHandleAsync("() => new DataTransfer()");<br/> await locator.DispatchEventAsync("dragstart", new Dictionary<string, object><br/> {<br/> { "dataTransfer", dataTransfer }<br/> }); </code> </summary> <param name="type">DOM event type: <c>"click"</c>, <c>"dragstart"</c>, etc.</param> <param name="eventInit">Optional event-specific initialization properties.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocator.DragToAsync(Microsoft.Playwright.ILocator,Microsoft.Playwright.LocatorDragToOptions)"> <summary> <para>Drag the source element towards the target element and drop it.</para> <para>**Details**</para> <para> This method drags the locator to another target locator or target position. It will first move to the source element, perform a <c>mousedown</c>, then move to the target element or position and perform a <c>mouseup</c>. </para> <para>**Usage**</para> <code> var source = Page.Locator("#source");<br/> var target = Page.Locator("#target");<br/> <br/> await source.DragToAsync(target);<br/> // or specify exact positions relative to the top-left corners of the elements:<br/> await source.DragToAsync(target, new()<br/> {<br/> SourcePosition = new() { X = 34, Y = 7 },<br/> TargetPosition = new() { X = 10, Y = 20 },<br/> }); </code> </summary> <param name="target">Locator of the element to drag to.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocator.ElementHandleAsync(Microsoft.Playwright.LocatorElementHandleOptions)"> <summary> <para> Always prefer using <see cref="T:Microsoft.Playwright.ILocator"/>s and web assertions over <see cref="T:Microsoft.Playwright.IElementHandle"/>s because latter are inherently racy. </para> <para> Resolves given locator to the first matching DOM element. If there are no matching elements, waits for one. If multiple elements match the locator, throws. </para> </summary> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocator.ElementHandlesAsync"> <summary> <para> Always prefer using <see cref="T:Microsoft.Playwright.ILocator"/>s and web assertions over <see cref="T:Microsoft.Playwright.IElementHandle"/>s because latter are inherently racy. </para> <para> Resolves given locator to all matching DOM elements. If there are no matching elements, returns an empty list. </para> </summary> </member> <member name="P:Microsoft.Playwright.ILocator.ContentFrame"> <summary> <para> Returns a <see cref="T:Microsoft.Playwright.IFrameLocator"/> object pointing to the same <c>iframe</c> as this locator. </para> <para> Useful when you have a <see cref="T:Microsoft.Playwright.ILocator"/> object obtained somewhere, and later on would like to interact with the content inside the frame. </para> <para>For a reverse operation, use <see cref="P:Microsoft.Playwright.IFrameLocator.Owner"/>.</para> <para>**Usage**</para> <code> var locator = Page.Locator("iframe[name=\"embedded\"]");<br/> // ...<br/> var frameLocator = locator.ContentFrame;<br/> await frameLocator.GetByRole(AriaRole.Button).ClickAsync(); </code> </summary> </member> <member name="M:Microsoft.Playwright.ILocator.EvaluateAsync``1(System.String,System.Object,Microsoft.Playwright.LocatorEvaluateOptions)"> <summary> <para>Execute JavaScript code in the page, taking the matching element as an argument.</para> <para>**Details**</para> <para> Returns the return value of <see cref="M:Microsoft.Playwright.ILocator.EvaluateAsync(System.String,System.Object,Microsoft.Playwright.LocatorEvaluateOptions)"/>, called with the matching element as a first argument, and <see cref="M:Microsoft.Playwright.ILocator.EvaluateAsync(System.String,System.Object,Microsoft.Playwright.LocatorEvaluateOptions)"/> as a second argument. </para> <para> If <see cref="M:Microsoft.Playwright.ILocator.EvaluateAsync(System.String,System.Object,Microsoft.Playwright.LocatorEvaluateOptions)"/> returns a <see cref="T:System.Threading.Tasks.Task"/>, this method will wait for the promise to resolve and return its value. </para> <para>If <see cref="M:Microsoft.Playwright.ILocator.EvaluateAsync(System.String,System.Object,Microsoft.Playwright.LocatorEvaluateOptions)"/> throws or rejects, this method throws.</para> <para>**Usage**</para> </summary> <param name="expression"> JavaScript expression to be evaluated in the browser context. If the expression evaluates to a function, the function is automatically invoked. </param> <param name="arg">Optional argument to pass to <see cref="M:Microsoft.Playwright.ILocator.EvaluateAsync(System.String,System.Object,Microsoft.Playwright.LocatorEvaluateOptions)"/>.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocator.EvaluateAllAsync``1(System.String,System.Object)"> <summary> <para>Execute JavaScript code in the page, taking all matching elements as an argument.</para> <para>**Details**</para> <para> Returns the return value of <see cref="M:Microsoft.Playwright.ILocator.EvaluateAllAsync``1(System.String,System.Object)"/>, called with an array of all matching elements as a first argument, and <see cref="M:Microsoft.Playwright.ILocator.EvaluateAllAsync``1(System.String,System.Object)"/> as a second argument. </para> <para> If <see cref="M:Microsoft.Playwright.ILocator.EvaluateAllAsync``1(System.String,System.Object)"/> returns a <see cref="T:System.Threading.Tasks.Task"/>, this method will wait for the promise to resolve and return its value. </para> <para>If <see cref="M:Microsoft.Playwright.ILocator.EvaluateAllAsync``1(System.String,System.Object)"/> throws or rejects, this method throws.</para> <para>**Usage**</para> <code> var locator = page.Locator("div");<br/> var moreThanTen = await locator.EvaluateAllAsync<bool>("(divs, min) => divs.length > min", 10); </code> </summary> <param name="expression"> JavaScript expression to be evaluated in the browser context. If the expression evaluates to a function, the function is automatically invoked. </param> <param name="arg">Optional argument to pass to <see cref="M:Microsoft.Playwright.ILocator.EvaluateAllAsync``1(System.String,System.Object)"/>.</param> </member> <member name="M:Microsoft.Playwright.ILocator.EvaluateHandleAsync(System.String,System.Object,Microsoft.Playwright.LocatorEvaluateHandleOptions)"> <summary> <para> Execute JavaScript code in the page, taking the matching element as an argument, and return a <see cref="T:Microsoft.Playwright.IJSHandle"/> with the result. </para> <para>**Details**</para> <para> Returns the return value of <see cref="M:Microsoft.Playwright.ILocator.EvaluateHandleAsync(System.String,System.Object,Microsoft.Playwright.LocatorEvaluateHandleOptions)"/> as a<see cref="T:Microsoft.Playwright.IJSHandle"/>, called with the matching element as a first argument, and <see cref="M:Microsoft.Playwright.ILocator.EvaluateHandleAsync(System.String,System.Object,Microsoft.Playwright.LocatorEvaluateHandleOptions)"/> as a second argument. </para> <para> The only difference between <see cref="M:Microsoft.Playwright.ILocator.EvaluateAsync(System.String,System.Object,Microsoft.Playwright.LocatorEvaluateOptions)"/> and <see cref="M:Microsoft.Playwright.ILocator.EvaluateHandleAsync(System.String,System.Object,Microsoft.Playwright.LocatorEvaluateHandleOptions)"/> is that <see cref="M:Microsoft.Playwright.ILocator.EvaluateHandleAsync(System.String,System.Object,Microsoft.Playwright.LocatorEvaluateHandleOptions)"/> returns <see cref="T:Microsoft.Playwright.IJSHandle"/>. </para> <para> If <see cref="M:Microsoft.Playwright.ILocator.EvaluateHandleAsync(System.String,System.Object,Microsoft.Playwright.LocatorEvaluateHandleOptions)"/> returns a <see cref="T:System.Threading.Tasks.Task"/>, this method will wait for the promise to resolve and return its value. </para> <para>If <see cref="M:Microsoft.Playwright.ILocator.EvaluateHandleAsync(System.String,System.Object,Microsoft.Playwright.LocatorEvaluateHandleOptions)"/> throws or rejects, this method throws.</para> <para>See <see cref="M:Microsoft.Playwright.IPage.EvaluateHandleAsync(System.String,System.Object)"/> for more details.</para> </summary> <param name="expression"> JavaScript expression to be evaluated in the browser context. If the expression evaluates to a function, the function is automatically invoked. </param> <param name="arg">Optional argument to pass to <see cref="M:Microsoft.Playwright.ILocator.EvaluateHandleAsync(System.String,System.Object,Microsoft.Playwright.LocatorEvaluateHandleOptions)"/>.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocator.FillAsync(System.String,Microsoft.Playwright.LocatorFillOptions)"> <summary> <para>Set a value to the input field.</para> <para>**Usage**</para> <code>await page.GetByRole(AriaRole.Textbox).FillAsync("example value");</code> <para>**Details**</para> <para> This method waits for <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks, focuses the element, fills it and triggers an <c>input</c> event after filling. Note that you can pass an empty string to clear the input field. </para> <para> If the target element is not an <c><input></c>, <c><textarea></c> or <c>[contenteditable]</c> element, this method throws an error. However, if the element is inside the <c><label></c> element that has an associated <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control">control</a>, the control will be filled instead. </para> <para>To send fine-grained keyboard events, use <see cref="M:Microsoft.Playwright.ILocator.PressSequentiallyAsync(System.String,Microsoft.Playwright.LocatorPressSequentiallyOptions)"/>.</para> </summary> <param name="value"> Value to set for the <c><input></c>, <c><textarea></c> or <c>[contenteditable]</c> element. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocator.Filter(Microsoft.Playwright.LocatorFilterOptions)"> <summary> <para> This method narrows existing locator according to the options, for example filters by text. It can be chained to filter multiple times. </para> <para>**Usage**</para> <code> var rowLocator = page.Locator("tr");<br/> // ...<br/> await rowLocator<br/> .Filter(new() { HasText = "text in column 1" })<br/> .Filter(new() {<br/> Has = page.GetByRole(AriaRole.Button, new() { Name = "column 2 button" } )<br/> })<br/> .ScreenshotAsync(); </code> </summary> <param name="options">Call options</param> </member> <member name="P:Microsoft.Playwright.ILocator.First"> <summary><para>Returns locator to the first matching element.</para></summary> </member> <member name="M:Microsoft.Playwright.ILocator.FocusAsync(Microsoft.Playwright.LocatorFocusOptions)"> <summary> <para> Calls <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus">focus</a> on the matching element. </para> </summary> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocator.FrameLocator(System.String)"> <summary> <para> When working with iframes, you can create a frame locator that will enter the iframe and allow locating elements in that iframe: </para> <para>**Usage**</para> <code> var locator = page.FrameLocator("iframe").GetByText("Submit");<br/> await locator.ClickAsync(); </code> </summary> <param name="selector">A selector to use when resolving DOM element.</param> </member> <member name="M:Microsoft.Playwright.ILocator.GetAttributeAsync(System.String,Microsoft.Playwright.LocatorGetAttributeOptions)"> <summary> <para>Returns the matching element's attribute value.</para> <para> If you need to assert an element's attribute, prefer <see cref="M:Microsoft.Playwright.ILocatorAssertions.ToHaveAttributeAsync(System.String,System.String,Microsoft.Playwright.LocatorAssertionsToHaveAttributeOptions)"/> to avoid flakiness. See <a href="https://playwright.dev/dotnet/docs/test-assertions">assertions guide</a> for more details. </para> </summary> <remarks> <para> If you need to assert an element's attribute, prefer <see cref="M:Microsoft.Playwright.ILocatorAssertions.ToHaveAttributeAsync(System.String,System.String,Microsoft.Playwright.LocatorAssertionsToHaveAttributeOptions)"/> to avoid flakiness. See <a href="https://playwright.dev/dotnet/docs/test-assertions">assertions guide</a> for more details. </para> </remarks> <param name="name">Attribute name to get the value for.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocator.GetByAltText(System.String,Microsoft.Playwright.LocatorGetByAltTextOptions)"> <summary> <para>Allows locating elements by their alt text.</para> <para>**Usage**</para> <para>For example, this method will find the image by alt text "Playwright logo":</para> <code>await page.GetByAltText("Playwright logo").ClickAsync();</code> </summary> <param name="text">Text to locate the element for.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocator.GetByAltText(System.Text.RegularExpressions.Regex,Microsoft.Playwright.LocatorGetByAltTextOptions)"> <summary> <para>Allows locating elements by their alt text.</para> <para>**Usage**</para> <para>For example, this method will find the image by alt text "Playwright logo":</para> <code>await page.GetByAltText("Playwright logo").ClickAsync();</code> </summary> <param name="text">Text to locate the element for.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocator.GetByLabel(System.String,Microsoft.Playwright.LocatorGetByLabelOptions)"> <summary> <para> Allows locating input elements by the text of the associated <c><label></c> or <c>aria-labelledby</c> element, or by the <c>aria-label</c> attribute. </para> <para>**Usage**</para> <para> For example, this method will find inputs by label "Username" and "Password" in the following DOM: </para> <code> await page.GetByLabel("Username").FillAsync("john");<br/> await page.GetByLabel("Password").FillAsync("secret"); </code> </summary> <param name="text">Text to locate the element for.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocator.GetByLabel(System.Text.RegularExpressions.Regex,Microsoft.Playwright.LocatorGetByLabelOptions)"> <summary> <para> Allows locating input elements by the text of the associated <c><label></c> or <c>aria-labelledby</c> element, or by the <c>aria-label</c> attribute. </para> <para>**Usage**</para> <para> For example, this method will find inputs by label "Username" and "Password" in the following DOM: </para> <code> await page.GetByLabel("Username").FillAsync("john");<br/> await page.GetByLabel("Password").FillAsync("secret"); </code> </summary> <param name="text">Text to locate the element for.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocator.GetByPlaceholder(System.String,Microsoft.Playwright.LocatorGetByPlaceholderOptions)"> <summary> <para>Allows locating input elements by the placeholder text.</para> <para>**Usage**</para> <para>For example, consider the following DOM structure.</para> <para>You can fill the input after locating it by the placeholder text:</para> <code> await page<br/> .GetByPlaceholder("name@example.com")<br/> .FillAsync("playwright@microsoft.com"); </code> </summary> <param name="text">Text to locate the element for.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocator.GetByPlaceholder(System.Text.RegularExpressions.Regex,Microsoft.Playwright.LocatorGetByPlaceholderOptions)"> <summary> <para>Allows locating input elements by the placeholder text.</para> <para>**Usage**</para> <para>For example, consider the following DOM structure.</para> <para>You can fill the input after locating it by the placeholder text:</para> <code> await page<br/> .GetByPlaceholder("name@example.com")<br/> .FillAsync("playwright@microsoft.com"); </code> </summary> <param name="text">Text to locate the element for.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocator.GetByRole(Microsoft.Playwright.AriaRole,Microsoft.Playwright.LocatorGetByRoleOptions)"> <summary> <para> Allows locating elements by their <a href="https://www.w3.org/TR/wai-aria-1.2/#roles">ARIA role</a>, <a href="https://www.w3.org/TR/wai-aria-1.2/#aria-attributes">ARIA attributes</a> and <a href="https://w3c.github.io/accname/#dfn-accessible-name">accessible name</a>. </para> <para>**Usage**</para> <para>Consider the following DOM structure.</para> <para>You can locate each element by it's implicit role:</para> <code> await Expect(Page<br/> .GetByRole(AriaRole.Heading, new() { Name = "Sign up" }))<br/> .ToBeVisibleAsync();<br/> <br/> await page<br/> .GetByRole(AriaRole.Checkbox, new() { Name = "Subscribe" })<br/> .CheckAsync();<br/> <br/> await page<br/> .GetByRole(AriaRole.Button, new() {<br/> NameRegex = new Regex("submit", RegexOptions.IgnoreCase)<br/> })<br/> .ClickAsync(); </code> <para>**Details**</para> <para> Role selector **does not replace** accessibility audits and conformance tests, but rather gives early feedback about the ARIA guidelines. </para> <para> Many html elements have an implicitly <a href="https://w3c.github.io/html-aam/#html-element-role-mappings">defined role</a> that is recognized by the role selector. You can find all the <a href="https://www.w3.org/TR/wai-aria-1.2/#role_definitions">supported roles here</a>. ARIA guidelines **do not recommend** duplicating implicit roles and attributes by setting <c>role</c> and/or <c>aria-*</c> attributes to default values. </para> </summary> <param name="role">Required aria role.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocator.GetByTestId(System.String)"> <summary> <para>Locate element by the test id.</para> <para>**Usage**</para> <para>Consider the following DOM structure.</para> <para>You can locate the element by it's test id:</para> <code>await page.GetByTestId("directions").ClickAsync();</code> <para>**Details**</para> <para> By default, the <c>data-testid</c> attribute is used as a test id. Use <see cref="M:Microsoft.Playwright.ISelectors.SetTestIdAttribute(System.String)"/> to configure a different test id attribute if necessary. </para> </summary> <param name="testId">Id to locate the element by.</param> </member> <member name="M:Microsoft.Playwright.ILocator.GetByTestId(System.Text.RegularExpressions.Regex)"> <summary> <para>Locate element by the test id.</para> <para>**Usage**</para> <para>Consider the following DOM structure.</para> <para>You can locate the element by it's test id:</para> <code>await page.GetByTestId("directions").ClickAsync();</code> <para>**Details**</para> <para> By default, the <c>data-testid</c> attribute is used as a test id. Use <see cref="M:Microsoft.Playwright.ISelectors.SetTestIdAttribute(System.String)"/> to configure a different test id attribute if necessary. </para> </summary> <param name="testId">Id to locate the element by.</param> </member> <member name="M:Microsoft.Playwright.ILocator.GetByText(System.String,Microsoft.Playwright.LocatorGetByTextOptions)"> <summary> <para>Allows locating elements that contain given text.</para> <para> See also <see cref="M:Microsoft.Playwright.ILocator.Filter(Microsoft.Playwright.LocatorFilterOptions)"/> that allows to match by another criteria, like an accessible role, and then filter by the text content. </para> <para>**Usage**</para> <para>Consider the following DOM structure:</para> <para>You can locate by text substring, exact string, or a regular expression:</para> <code> // Matches <span><br/> page.GetByText("world");<br/> <br/> // Matches first <div><br/> page.GetByText("Hello world");<br/> <br/> // Matches second <div><br/> page.GetByText("Hello", new() { Exact = true });<br/> <br/> // Matches both <div>s<br/> page.GetByText(new Regex("Hello"));<br/> <br/> // Matches second <div><br/> page.GetByText(new Regex("^hello$", RegexOptions.IgnoreCase)); </code> <para>**Details**</para> <para> Matching by text always normalizes whitespace, even with exact match. For example, it turns multiple spaces into one, turns line breaks into spaces and ignores leading and trailing whitespace. </para> <para> Input elements of the type <c>button</c> and <c>submit</c> are matched by their <c>value</c> instead of the text content. For example, locating by text <c>"Log in"</c> matches <c><input type=button value="Log in"></c>. </para> </summary> <param name="text">Text to locate the element for.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocator.GetByText(System.Text.RegularExpressions.Regex,Microsoft.Playwright.LocatorGetByTextOptions)"> <summary> <para>Allows locating elements that contain given text.</para> <para> See also <see cref="M:Microsoft.Playwright.ILocator.Filter(Microsoft.Playwright.LocatorFilterOptions)"/> that allows to match by another criteria, like an accessible role, and then filter by the text content. </para> <para>**Usage**</para> <para>Consider the following DOM structure:</para> <para>You can locate by text substring, exact string, or a regular expression:</para> <code> // Matches <span><br/> page.GetByText("world");<br/> <br/> // Matches first <div><br/> page.GetByText("Hello world");<br/> <br/> // Matches second <div><br/> page.GetByText("Hello", new() { Exact = true });<br/> <br/> // Matches both <div>s<br/> page.GetByText(new Regex("Hello"));<br/> <br/> // Matches second <div><br/> page.GetByText(new Regex("^hello$", RegexOptions.IgnoreCase)); </code> <para>**Details**</para> <para> Matching by text always normalizes whitespace, even with exact match. For example, it turns multiple spaces into one, turns line breaks into spaces and ignores leading and trailing whitespace. </para> <para> Input elements of the type <c>button</c> and <c>submit</c> are matched by their <c>value</c> instead of the text content. For example, locating by text <c>"Log in"</c> matches <c><input type=button value="Log in"></c>. </para> </summary> <param name="text">Text to locate the element for.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocator.GetByTitle(System.String,Microsoft.Playwright.LocatorGetByTitleOptions)"> <summary> <para>Allows locating elements by their title attribute.</para> <para>**Usage**</para> <para>Consider the following DOM structure.</para> <para>You can check the issues count after locating it by the title text:</para> <code>await Expect(Page.GetByTitle("Issues count")).toHaveText("25 issues");</code> </summary> <param name="text">Text to locate the element for.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocator.GetByTitle(System.Text.RegularExpressions.Regex,Microsoft.Playwright.LocatorGetByTitleOptions)"> <summary> <para>Allows locating elements by their title attribute.</para> <para>**Usage**</para> <para>Consider the following DOM structure.</para> <para>You can check the issues count after locating it by the title text:</para> <code>await Expect(Page.GetByTitle("Issues count")).toHaveText("25 issues");</code> </summary> <param name="text">Text to locate the element for.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocator.HighlightAsync"> <summary> <para> Highlight the corresponding element(s) on the screen. Useful for debugging, don't commit the code that uses <see cref="M:Microsoft.Playwright.ILocator.HighlightAsync"/>. </para> </summary> </member> <member name="M:Microsoft.Playwright.ILocator.HoverAsync(Microsoft.Playwright.LocatorHoverOptions)"> <summary> <para>Hover over the matching element.</para> <para>**Usage**</para> <code>await page.GetByRole(AriaRole.Link).HoverAsync();</code> <para>**Details**</para> <para>This method hovers over the element by performing the following steps:</para> <list type="ordinal"> <item><description> Wait for <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks on the element, unless <see cref="M:Microsoft.Playwright.ILocator.HoverAsync(Microsoft.Playwright.LocatorHoverOptions)"/> option is set. </description></item> <item><description>Scroll the element into view if needed.</description></item> <item><description> Use <see cref="P:Microsoft.Playwright.IPage.Mouse"/> to hover over the center of the element, or the specified <see cref="M:Microsoft.Playwright.ILocator.HoverAsync(Microsoft.Playwright.LocatorHoverOptions)"/>. </description></item> </list> <para> If the element is detached from the DOM at any moment during the action, this method throws. </para> <para> When all steps combined have not finished during the specified <see cref="M:Microsoft.Playwright.ILocator.HoverAsync(Microsoft.Playwright.LocatorHoverOptions)"/>, this method throws a <see cref="T:System.TimeoutException"/>. Passing zero timeout disables this. </para> </summary> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocator.InnerHTMLAsync(Microsoft.Playwright.LocatorInnerHTMLOptions)"> <summary><para>Returns the <a href="https://developer.mozilla.org/en-US/docs/Web/API/Element/innerHTML"><c>element.innerHTML</c></a>.</para></summary> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocator.InnerTextAsync(Microsoft.Playwright.LocatorInnerTextOptions)"> <summary> <para>Returns the <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/innerText"><c>element.innerText</c></a>.</para> <para> If you need to assert text on the page, prefer <see cref="M:Microsoft.Playwright.ILocatorAssertions.ToHaveTextAsync(System.String,Microsoft.Playwright.LocatorAssertionsToHaveTextOptions)"/> with <see cref="M:Microsoft.Playwright.ILocatorAssertions.ToHaveTextAsync(System.String,Microsoft.Playwright.LocatorAssertionsToHaveTextOptions)"/> option to avoid flakiness. See <a href="https://playwright.dev/dotnet/docs/test-assertions">assertions guide</a> for more details. </para> </summary> <remarks> <para> If you need to assert text on the page, prefer <see cref="M:Microsoft.Playwright.ILocatorAssertions.ToHaveTextAsync(System.String,Microsoft.Playwright.LocatorAssertionsToHaveTextOptions)"/> with <see cref="M:Microsoft.Playwright.ILocatorAssertions.ToHaveTextAsync(System.String,Microsoft.Playwright.LocatorAssertionsToHaveTextOptions)"/> option to avoid flakiness. See <a href="https://playwright.dev/dotnet/docs/test-assertions">assertions guide</a> for more details. </para> </remarks> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocator.InputValueAsync(Microsoft.Playwright.LocatorInputValueOptions)"> <summary> <para> Returns the value for the matching <c><input></c> or <c><textarea></c> or <c><select></c> element. </para> <para> If you need to assert input value, prefer <see cref="M:Microsoft.Playwright.ILocatorAssertions.ToHaveValueAsync(System.String,Microsoft.Playwright.LocatorAssertionsToHaveValueOptions)"/> to avoid flakiness. See <a href="https://playwright.dev/dotnet/docs/test-assertions">assertions guide</a> for more details. </para> <para>**Usage**</para> <code>String value = await page.GetByRole(AriaRole.Textbox).InputValueAsync();</code> <para>**Details**</para> <para> Throws elements that are not an input, textarea or a select. However, if the element is inside the <c><label></c> element that has an associated <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control">control</a>, returns the value of the control. </para> </summary> <remarks> <para> If you need to assert input value, prefer <see cref="M:Microsoft.Playwright.ILocatorAssertions.ToHaveValueAsync(System.String,Microsoft.Playwright.LocatorAssertionsToHaveValueOptions)"/> to avoid flakiness. See <a href="https://playwright.dev/dotnet/docs/test-assertions">assertions guide</a> for more details. </para> </remarks> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocator.IsCheckedAsync(Microsoft.Playwright.LocatorIsCheckedOptions)"> <summary> <para> Returns whether the element is checked. Throws if the element is not a checkbox or radio input. </para> <para> If you need to assert that checkbox is checked, prefer <see cref="M:Microsoft.Playwright.ILocatorAssertions.ToBeCheckedAsync(Microsoft.Playwright.LocatorAssertionsToBeCheckedOptions)"/> to avoid flakiness. See <a href="https://playwright.dev/dotnet/docs/test-assertions">assertions guide</a> for more details. </para> <para>**Usage**</para> <code>var isChecked = await page.GetByRole(AriaRole.Checkbox).IsCheckedAsync();</code> </summary> <remarks> <para> If you need to assert that checkbox is checked, prefer <see cref="M:Microsoft.Playwright.ILocatorAssertions.ToBeCheckedAsync(Microsoft.Playwright.LocatorAssertionsToBeCheckedOptions)"/> to avoid flakiness. See <a href="https://playwright.dev/dotnet/docs/test-assertions">assertions guide</a> for more details. </para> </remarks> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocator.IsDisabledAsync(Microsoft.Playwright.LocatorIsDisabledOptions)"> <summary> <para>Returns whether the element is disabled, the opposite of <a href="https://playwright.dev/dotnet/docs/actionability#enabled">enabled</a>.</para> <para> If you need to assert that an element is disabled, prefer <see cref="M:Microsoft.Playwright.ILocatorAssertions.ToBeDisabledAsync(Microsoft.Playwright.LocatorAssertionsToBeDisabledOptions)"/> to avoid flakiness. See <a href="https://playwright.dev/dotnet/docs/test-assertions">assertions guide</a> for more details. </para> <para>**Usage**</para> <code>Boolean disabled = await page.GetByRole(AriaRole.Button).IsDisabledAsync();</code> </summary> <remarks> <para> If you need to assert that an element is disabled, prefer <see cref="M:Microsoft.Playwright.ILocatorAssertions.ToBeDisabledAsync(Microsoft.Playwright.LocatorAssertionsToBeDisabledOptions)"/> to avoid flakiness. See <a href="https://playwright.dev/dotnet/docs/test-assertions">assertions guide</a> for more details. </para> </remarks> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocator.IsEditableAsync(Microsoft.Playwright.LocatorIsEditableOptions)"> <summary> <para> Returns whether the element is <a href="https://playwright.dev/dotnet/docs/actionability#editable">editable</a>. If the target element is not an <c><input></c>, <c><textarea></c>, <c><select></c>, <c>[contenteditable]</c> and does not have a role allowing <c>[aria-readonly]</c>, this method throws an error. </para> <para> If you need to assert that an element is editable, prefer <see cref="M:Microsoft.Playwright.ILocatorAssertions.ToBeEditableAsync(Microsoft.Playwright.LocatorAssertionsToBeEditableOptions)"/> to avoid flakiness. See <a href="https://playwright.dev/dotnet/docs/test-assertions">assertions guide</a> for more details. </para> <para>**Usage**</para> <code>Boolean editable = await page.GetByRole(AriaRole.Textbox).IsEditableAsync();</code> </summary> <remarks> <para> If you need to assert that an element is editable, prefer <see cref="M:Microsoft.Playwright.ILocatorAssertions.ToBeEditableAsync(Microsoft.Playwright.LocatorAssertionsToBeEditableOptions)"/> to avoid flakiness. See <a href="https://playwright.dev/dotnet/docs/test-assertions">assertions guide</a> for more details. </para> </remarks> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocator.IsEnabledAsync(Microsoft.Playwright.LocatorIsEnabledOptions)"> <summary> <para>Returns whether the element is <a href="https://playwright.dev/dotnet/docs/actionability#enabled">enabled</a>.</para> <para> If you need to assert that an element is enabled, prefer <see cref="M:Microsoft.Playwright.ILocatorAssertions.ToBeEnabledAsync(Microsoft.Playwright.LocatorAssertionsToBeEnabledOptions)"/> to avoid flakiness. See <a href="https://playwright.dev/dotnet/docs/test-assertions">assertions guide</a> for more details. </para> <para>**Usage**</para> <code>Boolean enabled = await page.GetByRole(AriaRole.Button).IsEnabledAsync();</code> </summary> <remarks> <para> If you need to assert that an element is enabled, prefer <see cref="M:Microsoft.Playwright.ILocatorAssertions.ToBeEnabledAsync(Microsoft.Playwright.LocatorAssertionsToBeEnabledOptions)"/> to avoid flakiness. See <a href="https://playwright.dev/dotnet/docs/test-assertions">assertions guide</a> for more details. </para> </remarks> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocator.IsHiddenAsync(Microsoft.Playwright.LocatorIsHiddenOptions)"> <summary> <para>Returns whether the element is hidden, the opposite of <a href="https://playwright.dev/dotnet/docs/actionability#visible">visible</a>.</para> <para> If you need to assert that element is hidden, prefer <see cref="M:Microsoft.Playwright.ILocatorAssertions.ToBeHiddenAsync(Microsoft.Playwright.LocatorAssertionsToBeHiddenOptions)"/> to avoid flakiness. See <a href="https://playwright.dev/dotnet/docs/test-assertions">assertions guide</a> for more details. </para> <para>**Usage**</para> <code>Boolean hidden = await page.GetByRole(AriaRole.Button).IsHiddenAsync();</code> </summary> <remarks> <para> If you need to assert that element is hidden, prefer <see cref="M:Microsoft.Playwright.ILocatorAssertions.ToBeHiddenAsync(Microsoft.Playwright.LocatorAssertionsToBeHiddenOptions)"/> to avoid flakiness. See <a href="https://playwright.dev/dotnet/docs/test-assertions">assertions guide</a> for more details. </para> </remarks> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocator.IsVisibleAsync(Microsoft.Playwright.LocatorIsVisibleOptions)"> <summary> <para>Returns whether the element is <a href="https://playwright.dev/dotnet/docs/actionability#visible">visible</a>.</para> <para> If you need to assert that element is visible, prefer <see cref="M:Microsoft.Playwright.ILocatorAssertions.ToBeVisibleAsync(Microsoft.Playwright.LocatorAssertionsToBeVisibleOptions)"/> to avoid flakiness. See <a href="https://playwright.dev/dotnet/docs/test-assertions">assertions guide</a> for more details. </para> <para>**Usage**</para> <code>Boolean visible = await page.GetByRole(AriaRole.Button).IsVisibleAsync();</code> </summary> <remarks> <para> If you need to assert that element is visible, prefer <see cref="M:Microsoft.Playwright.ILocatorAssertions.ToBeVisibleAsync(Microsoft.Playwright.LocatorAssertionsToBeVisibleOptions)"/> to avoid flakiness. See <a href="https://playwright.dev/dotnet/docs/test-assertions">assertions guide</a> for more details. </para> </remarks> <param name="options">Call options</param> </member> <member name="P:Microsoft.Playwright.ILocator.Last"> <summary> <para>Returns locator to the last matching element.</para> <para>**Usage**</para> <code>var banana = await page.GetByRole(AriaRole.Listitem).Last(1);</code> </summary> </member> <member name="M:Microsoft.Playwright.ILocator.Locator(System.String,Microsoft.Playwright.LocatorLocatorOptions)"> <summary> <para> The method finds an element matching the specified selector in the locator's subtree. It also accepts filter options, similar to <see cref="M:Microsoft.Playwright.ILocator.Filter(Microsoft.Playwright.LocatorFilterOptions)"/> method. </para> <para><a href="https://playwright.dev/dotnet/docs/locators">Learn more about locators</a>.</para> </summary> <param name="selectorOrLocator">A selector or locator to use when resolving DOM element.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocator.Locator(Microsoft.Playwright.ILocator,Microsoft.Playwright.LocatorLocatorOptions)"> <summary> <para> The method finds an element matching the specified selector in the locator's subtree. It also accepts filter options, similar to <see cref="M:Microsoft.Playwright.ILocator.Filter(Microsoft.Playwright.LocatorFilterOptions)"/> method. </para> <para><a href="https://playwright.dev/dotnet/docs/locators">Learn more about locators</a>.</para> </summary> <param name="selectorOrLocator">A selector or locator to use when resolving DOM element.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocator.Nth(System.Int32)"> <summary> <para> Returns locator to the n-th matching element. It's zero based, <c>nth(0)</c> selects the first element. </para> <para>**Usage**</para> <code>var banana = await page.GetByRole(AriaRole.Listitem).Nth(2);</code> </summary> <param name="index"> </param> </member> <member name="M:Microsoft.Playwright.ILocator.Or(Microsoft.Playwright.ILocator)"> <summary> <para>Creates a locator matching all elements that match one or both of the two locators.</para> <para> Note that when both locators match something, the resulting locator will have multiple matches, potentially causing a <a href="https://playwright.dev/dotnet/docs/locators#strictness">locator strictness</a> violation. </para> <para>**Usage**</para> <para> Consider a scenario where you'd like to click on a "New email" button, but sometimes a security settings dialog shows up instead. In this case, you can wait for either a "New email" button, or a dialog and act accordingly. </para> <para> If both "New email" button and security dialog appear on screen, the "or" locator will match both of them, possibly throwing the <a href="https://playwright.dev/dotnet/docs/locators#strictness">"strict mode violation" error</a>. In this case, you can use <see cref="P:Microsoft.Playwright.ILocator.First"/> to only match one of them. </para> <code> var newEmail = page.GetByRole(AriaRole.Button, new() { Name = "New" });<br/> var dialog = page.GetByText("Confirm security settings");<br/> await Expect(newEmail.Or(dialog).First).ToBeVisibleAsync();<br/> if (await dialog.IsVisibleAsync())<br/> await page.GetByRole(AriaRole.Button, new() { Name = "Dismiss" }).ClickAsync();<br/> await newEmail.ClickAsync(); </code> </summary> <remarks> <para> If both "New email" button and security dialog appear on screen, the "or" locator will match both of them, possibly throwing the <a href="https://playwright.dev/dotnet/docs/locators#strictness">"strict mode violation" error</a>. In this case, you can use <see cref="P:Microsoft.Playwright.ILocator.First"/> to only match one of them. </para> </remarks> <param name="locator">Alternative locator to match.</param> </member> <member name="P:Microsoft.Playwright.ILocator.Page"> <summary><para>A page this locator belongs to.</para></summary> </member> <member name="M:Microsoft.Playwright.ILocator.PressAsync(System.String,Microsoft.Playwright.LocatorPressOptions)"> <summary> <para>Focuses the matching element and presses a combination of the keys.</para> <para>**Usage**</para> <code>await page.GetByRole(AriaRole.Textbox).PressAsync("Backspace");</code> <para>**Details**</para> <para>Focuses the element, and then uses <see cref="M:Microsoft.Playwright.IKeyboard.DownAsync(System.String)"/> and <see cref="M:Microsoft.Playwright.IKeyboard.UpAsync(System.String)"/>.</para> <para> <see cref="M:Microsoft.Playwright.ILocator.PressAsync(System.String,Microsoft.Playwright.LocatorPressOptions)"/> can specify the intended <a href="https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key">keyboardEvent.key</a> value or a single character to generate the text for. A superset of the <see cref="M:Microsoft.Playwright.ILocator.PressAsync(System.String,Microsoft.Playwright.LocatorPressOptions)"/> values can be found <a href="https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values">here</a>. Examples of the keys are: </para> <para> <c>F1</c> - <c>F12</c>, <c>Digit0</c>- <c>Digit9</c>, <c>KeyA</c>- <c>KeyZ</c>, <c>Backquote</c>, <c>Minus</c>, <c>Equal</c>, <c>Backslash</c>, <c>Backspace</c>, <c>Tab</c>, <c>Delete</c>, <c>Escape</c>, <c>ArrowDown</c>, <c>End</c>, <c>Enter</c>, <c>Home</c>, <c>Insert</c>, <c>PageDown</c>, <c>PageUp</c>, <c>ArrowRight</c>, <c>ArrowUp</c>, etc. </para> <para> Following modification shortcuts are also supported: <c>Shift</c>, <c>Control</c>, <c>Alt</c>, <c>Meta</c>, <c>ShiftLeft</c>, <c>ControlOrMeta</c>. <c>ControlOrMeta</c> resolves to <c>Control</c> on Windows and Linux and to <c>Meta</c> on macOS. </para> <para> Holding down <c>Shift</c> will type the text that corresponds to the <see cref="M:Microsoft.Playwright.ILocator.PressAsync(System.String,Microsoft.Playwright.LocatorPressOptions)"/> in the upper case. </para> <para> If <see cref="M:Microsoft.Playwright.ILocator.PressAsync(System.String,Microsoft.Playwright.LocatorPressOptions)"/> is a single character, it is case-sensitive, so the values <c>a</c> and <c>A</c> will generate different respective texts. </para> <para> Shortcuts such as <c>key: "Control+o"</c>, <c>key: "Control++</c> or <c>key: "Control+Shift+T"</c> are supported as well. When specified with the modifier, modifier is pressed and being held while the subsequent key is being pressed. </para> </summary> <param name="key"> Name of the key to press or a character to generate, such as <c>ArrowLeft</c> or <c>a</c>. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocator.PressSequentiallyAsync(System.String,Microsoft.Playwright.LocatorPressSequentiallyOptions)"> <summary> <para> In most cases, you should use <see cref="M:Microsoft.Playwright.ILocator.FillAsync(System.String,Microsoft.Playwright.LocatorFillOptions)"/> instead. You only need to press keys one by one if there is special keyboard handling on the page. </para> <para> Focuses the element, and then sends a <c>keydown</c>, <c>keypress</c>/<c>input</c>, and <c>keyup</c> event for each character in the text. </para> <para>To press a special key, like <c>Control</c> or <c>ArrowDown</c>, use <see cref="M:Microsoft.Playwright.ILocator.PressAsync(System.String,Microsoft.Playwright.LocatorPressOptions)"/>.</para> <para>**Usage**</para> <code> await locator.PressSequentiallyAsync("Hello"); // Types instantly<br/> await locator.PressSequentiallyAsync("World", new() { Delay = 100 }); // Types slower, like a user </code> <para>An example of typing into a text field and then submitting the form:</para> <code> var locator = page.GetByLabel("Password");<br/> await locator.PressSequentiallyAsync("my password");<br/> await locator.PressAsync("Enter"); </code> </summary> <remarks> <para> In most cases, you should use <see cref="M:Microsoft.Playwright.ILocator.FillAsync(System.String,Microsoft.Playwright.LocatorFillOptions)"/> instead. You only need to press keys one by one if there is special keyboard handling on the page. </para> </remarks> <param name="text">String of characters to sequentially press into a focused element.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocator.ScreenshotAsync(Microsoft.Playwright.LocatorScreenshotOptions)"> <summary> <para>Take a screenshot of the element matching the locator.</para> <para>**Usage**</para> <code>await page.GetByRole(AriaRole.Link).ScreenshotAsync();</code> <para>Disable animations and save screenshot to a file:</para> <code> await page.GetByRole(AriaRole.Link).ScreenshotAsync(new() {<br/> Animations = ScreenshotAnimations.Disabled,<br/> Path = "link.png"<br/> }); </code> <para>**Details**</para> <para> This method captures a screenshot of the page, clipped to the size and position of a particular element matching the locator. If the element is covered by other elements, it will not be actually visible on the screenshot. If the element is a scrollable container, only the currently scrolled content will be visible on the screenshot. </para> <para> This method waits for the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks, then scrolls element into view before taking a screenshot. If the element is detached from DOM, the method throws an error. </para> <para>Returns the buffer with the captured screenshot.</para> </summary> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocator.ScrollIntoViewIfNeededAsync(Microsoft.Playwright.LocatorScrollIntoViewIfNeededOptions)"> <summary> <para> This method waits for <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks, then tries to scroll element into view, unless it is completely visible as defined by <a href="https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API">IntersectionObserver</a>'s <c>ratio</c>. </para> <para> See <a href="https://playwright.dev/dotnet/docs/input#scrolling">scrolling</a> for alternative ways to scroll. </para> </summary> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocator.SelectOptionAsync(System.String,Microsoft.Playwright.LocatorSelectOptionOptions)"> <summary> <para>Selects option or options in <c><select></c>.</para> <para>**Details**</para> <para> This method waits for <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks, waits until all specified options are present in the <c><select></c> element and selects these options. </para> <para> If the target element is not a <c><select></c> element, this method throws an error. However, if the element is inside the <c><label></c> element that has an associated <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control">control</a>, the control will be used instead. </para> <para>Returns the array of option values that have been successfully selected.</para> <para> Triggers a <c>change</c> and <c>input</c> event once all the provided options have been selected. </para> <para>**Usage**</para> <code> // single selection matching the value or label<br/> await element.SelectOptionAsync(new[] { "blue" });<br/> // single selection matching the label<br/> await element.SelectOptionAsync(new[] { new SelectOptionValue() { Label = "blue" } });<br/> // multiple selection for blue, red and second option<br/> await element.SelectOptionAsync(new[] { "red", "green", "blue" }); </code> </summary> <param name="values"> Options to select. If the <c><select></c> has the <c>multiple</c> attribute, all matching options are selected, otherwise only the first option matching one of the passed options is selected. String values are matching both values and labels. Option is considered matching if all specified properties match. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocator.SelectOptionAsync(Microsoft.Playwright.IElementHandle,Microsoft.Playwright.LocatorSelectOptionOptions)"> <summary> <para>Selects option or options in <c><select></c>.</para> <para>**Details**</para> <para> This method waits for <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks, waits until all specified options are present in the <c><select></c> element and selects these options. </para> <para> If the target element is not a <c><select></c> element, this method throws an error. However, if the element is inside the <c><label></c> element that has an associated <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control">control</a>, the control will be used instead. </para> <para>Returns the array of option values that have been successfully selected.</para> <para> Triggers a <c>change</c> and <c>input</c> event once all the provided options have been selected. </para> <para>**Usage**</para> <code> // single selection matching the value or label<br/> await element.SelectOptionAsync(new[] { "blue" });<br/> // single selection matching the label<br/> await element.SelectOptionAsync(new[] { new SelectOptionValue() { Label = "blue" } });<br/> // multiple selection for blue, red and second option<br/> await element.SelectOptionAsync(new[] { "red", "green", "blue" }); </code> </summary> <param name="values"> Options to select. If the <c><select></c> has the <c>multiple</c> attribute, all matching options are selected, otherwise only the first option matching one of the passed options is selected. String values are matching both values and labels. Option is considered matching if all specified properties match. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocator.SelectOptionAsync(System.Collections.Generic.IEnumerable{System.String},Microsoft.Playwright.LocatorSelectOptionOptions)"> <summary> <para>Selects option or options in <c><select></c>.</para> <para>**Details**</para> <para> This method waits for <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks, waits until all specified options are present in the <c><select></c> element and selects these options. </para> <para> If the target element is not a <c><select></c> element, this method throws an error. However, if the element is inside the <c><label></c> element that has an associated <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control">control</a>, the control will be used instead. </para> <para>Returns the array of option values that have been successfully selected.</para> <para> Triggers a <c>change</c> and <c>input</c> event once all the provided options have been selected. </para> <para>**Usage**</para> <code> // single selection matching the value or label<br/> await element.SelectOptionAsync(new[] { "blue" });<br/> // single selection matching the label<br/> await element.SelectOptionAsync(new[] { new SelectOptionValue() { Label = "blue" } });<br/> // multiple selection for blue, red and second option<br/> await element.SelectOptionAsync(new[] { "red", "green", "blue" }); </code> </summary> <param name="values"> Options to select. If the <c><select></c> has the <c>multiple</c> attribute, all matching options are selected, otherwise only the first option matching one of the passed options is selected. String values are matching both values and labels. Option is considered matching if all specified properties match. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocator.SelectOptionAsync(Microsoft.Playwright.SelectOptionValue,Microsoft.Playwright.LocatorSelectOptionOptions)"> <summary> <para>Selects option or options in <c><select></c>.</para> <para>**Details**</para> <para> This method waits for <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks, waits until all specified options are present in the <c><select></c> element and selects these options. </para> <para> If the target element is not a <c><select></c> element, this method throws an error. However, if the element is inside the <c><label></c> element that has an associated <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control">control</a>, the control will be used instead. </para> <para>Returns the array of option values that have been successfully selected.</para> <para> Triggers a <c>change</c> and <c>input</c> event once all the provided options have been selected. </para> <para>**Usage**</para> <code> // single selection matching the value or label<br/> await element.SelectOptionAsync(new[] { "blue" });<br/> // single selection matching the label<br/> await element.SelectOptionAsync(new[] { new SelectOptionValue() { Label = "blue" } });<br/> // multiple selection for blue, red and second option<br/> await element.SelectOptionAsync(new[] { "red", "green", "blue" }); </code> </summary> <param name="values"> Options to select. If the <c><select></c> has the <c>multiple</c> attribute, all matching options are selected, otherwise only the first option matching one of the passed options is selected. String values are matching both values and labels. Option is considered matching if all specified properties match. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocator.SelectOptionAsync(System.Collections.Generic.IEnumerable{Microsoft.Playwright.IElementHandle},Microsoft.Playwright.LocatorSelectOptionOptions)"> <summary> <para>Selects option or options in <c><select></c>.</para> <para>**Details**</para> <para> This method waits for <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks, waits until all specified options are present in the <c><select></c> element and selects these options. </para> <para> If the target element is not a <c><select></c> element, this method throws an error. However, if the element is inside the <c><label></c> element that has an associated <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control">control</a>, the control will be used instead. </para> <para>Returns the array of option values that have been successfully selected.</para> <para> Triggers a <c>change</c> and <c>input</c> event once all the provided options have been selected. </para> <para>**Usage**</para> <code> // single selection matching the value or label<br/> await element.SelectOptionAsync(new[] { "blue" });<br/> // single selection matching the label<br/> await element.SelectOptionAsync(new[] { new SelectOptionValue() { Label = "blue" } });<br/> // multiple selection for blue, red and second option<br/> await element.SelectOptionAsync(new[] { "red", "green", "blue" }); </code> </summary> <param name="values"> Options to select. If the <c><select></c> has the <c>multiple</c> attribute, all matching options are selected, otherwise only the first option matching one of the passed options is selected. String values are matching both values and labels. Option is considered matching if all specified properties match. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocator.SelectOptionAsync(System.Collections.Generic.IEnumerable{Microsoft.Playwright.SelectOptionValue},Microsoft.Playwright.LocatorSelectOptionOptions)"> <summary> <para>Selects option or options in <c><select></c>.</para> <para>**Details**</para> <para> This method waits for <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks, waits until all specified options are present in the <c><select></c> element and selects these options. </para> <para> If the target element is not a <c><select></c> element, this method throws an error. However, if the element is inside the <c><label></c> element that has an associated <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control">control</a>, the control will be used instead. </para> <para>Returns the array of option values that have been successfully selected.</para> <para> Triggers a <c>change</c> and <c>input</c> event once all the provided options have been selected. </para> <para>**Usage**</para> <code> // single selection matching the value or label<br/> await element.SelectOptionAsync(new[] { "blue" });<br/> // single selection matching the label<br/> await element.SelectOptionAsync(new[] { new SelectOptionValue() { Label = "blue" } });<br/> // multiple selection for blue, red and second option<br/> await element.SelectOptionAsync(new[] { "red", "green", "blue" }); </code> </summary> <param name="values"> Options to select. If the <c><select></c> has the <c>multiple</c> attribute, all matching options are selected, otherwise only the first option matching one of the passed options is selected. String values are matching both values and labels. Option is considered matching if all specified properties match. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocator.SelectTextAsync(Microsoft.Playwright.LocatorSelectTextOptions)"> <summary> <para> This method waits for <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks, then focuses the element and selects all its text content. </para> <para> If the element is inside the <c><label></c> element that has an associated <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control">control</a>, focuses and selects text in the control instead. </para> </summary> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocator.SetCheckedAsync(System.Boolean,Microsoft.Playwright.LocatorSetCheckedOptions)"> <summary> <para>Set the state of a checkbox or a radio element.</para> <para>**Usage**</para> <code>await page.GetByRole(AriaRole.Checkbox).SetCheckedAsync(true);</code> <para>**Details**</para> <para>This method checks or unchecks an element by performing the following steps:</para> <list type="ordinal"> <item><description> Ensure that matched element is a checkbox or a radio input. If not, this method throws. </description></item> <item><description>If the element already has the right checked state, this method returns immediately.</description></item> <item><description> Wait for <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks on the matched element, unless <see cref="M:Microsoft.Playwright.ILocator.SetCheckedAsync(System.Boolean,Microsoft.Playwright.LocatorSetCheckedOptions)"/> option is set. If the element is detached during the checks, the whole action is retried. </description></item> <item><description>Scroll the element into view if needed.</description></item> <item><description>Use <see cref="P:Microsoft.Playwright.IPage.Mouse"/> to click in the center of the element.</description></item> <item><description>Ensure that the element is now checked or unchecked. If not, this method throws.</description></item> </list> <para> When all steps combined have not finished during the specified <see cref="M:Microsoft.Playwright.ILocator.SetCheckedAsync(System.Boolean,Microsoft.Playwright.LocatorSetCheckedOptions)"/>, this method throws a <see cref="T:System.TimeoutException"/>. Passing zero timeout disables this. </para> </summary> <param name="checkedState">Whether to check or uncheck the checkbox.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocator.SetInputFilesAsync(System.String,Microsoft.Playwright.LocatorSetInputFilesOptions)"> <summary> <para> Upload file or multiple files into <c><input type=file></c>. For inputs with a <c>[webkitdirectory]</c> attribute, only a single directory path is supported. </para> <para>**Usage**</para> <code> // Select one file<br/> await page.GetByLabel("Upload file").SetInputFilesAsync("myfile.pdf");<br/> <br/> // Select multiple files<br/> await page.GetByLabel("Upload files").SetInputFilesAsync(new[] { "file1.txt", "file12.txt" });<br/> <br/> // Select a directory<br/> await page.GetByLabel("Upload directory").SetInputFilesAsync("mydir");<br/> <br/> // Remove all the selected files<br/> await page.GetByLabel("Upload file").SetInputFilesAsync(new[] {});<br/> <br/> // Upload buffer from memory<br/> await page.GetByLabel("Upload file").SetInputFilesAsync(new FilePayload<br/> {<br/> Name = "file.txt",<br/> MimeType = "text/plain",<br/> Buffer = System.Text.Encoding.UTF8.GetBytes("this is a test"),<br/> }); </code> <para>**Details**</para> <para> Sets the value of the file input to these file paths or files. If some of the <c>filePaths</c> are relative paths, then they are resolved relative to the current working directory. For empty array, clears the selected files. </para> <para> This method expects <see cref="T:Microsoft.Playwright.ILocator"/> to point to an <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input">input element</a>. However, if the element is inside the <c><label></c> element that has an associated <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control">control</a>, targets the control instead. </para> </summary> <param name="files"> </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocator.SetInputFilesAsync(System.Collections.Generic.IEnumerable{System.String},Microsoft.Playwright.LocatorSetInputFilesOptions)"> <summary> <para> Upload file or multiple files into <c><input type=file></c>. For inputs with a <c>[webkitdirectory]</c> attribute, only a single directory path is supported. </para> <para>**Usage**</para> <code> // Select one file<br/> await page.GetByLabel("Upload file").SetInputFilesAsync("myfile.pdf");<br/> <br/> // Select multiple files<br/> await page.GetByLabel("Upload files").SetInputFilesAsync(new[] { "file1.txt", "file12.txt" });<br/> <br/> // Select a directory<br/> await page.GetByLabel("Upload directory").SetInputFilesAsync("mydir");<br/> <br/> // Remove all the selected files<br/> await page.GetByLabel("Upload file").SetInputFilesAsync(new[] {});<br/> <br/> // Upload buffer from memory<br/> await page.GetByLabel("Upload file").SetInputFilesAsync(new FilePayload<br/> {<br/> Name = "file.txt",<br/> MimeType = "text/plain",<br/> Buffer = System.Text.Encoding.UTF8.GetBytes("this is a test"),<br/> }); </code> <para>**Details**</para> <para> Sets the value of the file input to these file paths or files. If some of the <c>filePaths</c> are relative paths, then they are resolved relative to the current working directory. For empty array, clears the selected files. </para> <para> This method expects <see cref="T:Microsoft.Playwright.ILocator"/> to point to an <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input">input element</a>. However, if the element is inside the <c><label></c> element that has an associated <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control">control</a>, targets the control instead. </para> </summary> <param name="files"> </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocator.SetInputFilesAsync(Microsoft.Playwright.FilePayload,Microsoft.Playwright.LocatorSetInputFilesOptions)"> <summary> <para> Upload file or multiple files into <c><input type=file></c>. For inputs with a <c>[webkitdirectory]</c> attribute, only a single directory path is supported. </para> <para>**Usage**</para> <code> // Select one file<br/> await page.GetByLabel("Upload file").SetInputFilesAsync("myfile.pdf");<br/> <br/> // Select multiple files<br/> await page.GetByLabel("Upload files").SetInputFilesAsync(new[] { "file1.txt", "file12.txt" });<br/> <br/> // Select a directory<br/> await page.GetByLabel("Upload directory").SetInputFilesAsync("mydir");<br/> <br/> // Remove all the selected files<br/> await page.GetByLabel("Upload file").SetInputFilesAsync(new[] {});<br/> <br/> // Upload buffer from memory<br/> await page.GetByLabel("Upload file").SetInputFilesAsync(new FilePayload<br/> {<br/> Name = "file.txt",<br/> MimeType = "text/plain",<br/> Buffer = System.Text.Encoding.UTF8.GetBytes("this is a test"),<br/> }); </code> <para>**Details**</para> <para> Sets the value of the file input to these file paths or files. If some of the <c>filePaths</c> are relative paths, then they are resolved relative to the current working directory. For empty array, clears the selected files. </para> <para> This method expects <see cref="T:Microsoft.Playwright.ILocator"/> to point to an <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input">input element</a>. However, if the element is inside the <c><label></c> element that has an associated <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control">control</a>, targets the control instead. </para> </summary> <param name="files"> </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocator.SetInputFilesAsync(System.Collections.Generic.IEnumerable{Microsoft.Playwright.FilePayload},Microsoft.Playwright.LocatorSetInputFilesOptions)"> <summary> <para> Upload file or multiple files into <c><input type=file></c>. For inputs with a <c>[webkitdirectory]</c> attribute, only a single directory path is supported. </para> <para>**Usage**</para> <code> // Select one file<br/> await page.GetByLabel("Upload file").SetInputFilesAsync("myfile.pdf");<br/> <br/> // Select multiple files<br/> await page.GetByLabel("Upload files").SetInputFilesAsync(new[] { "file1.txt", "file12.txt" });<br/> <br/> // Select a directory<br/> await page.GetByLabel("Upload directory").SetInputFilesAsync("mydir");<br/> <br/> // Remove all the selected files<br/> await page.GetByLabel("Upload file").SetInputFilesAsync(new[] {});<br/> <br/> // Upload buffer from memory<br/> await page.GetByLabel("Upload file").SetInputFilesAsync(new FilePayload<br/> {<br/> Name = "file.txt",<br/> MimeType = "text/plain",<br/> Buffer = System.Text.Encoding.UTF8.GetBytes("this is a test"),<br/> }); </code> <para>**Details**</para> <para> Sets the value of the file input to these file paths or files. If some of the <c>filePaths</c> are relative paths, then they are resolved relative to the current working directory. For empty array, clears the selected files. </para> <para> This method expects <see cref="T:Microsoft.Playwright.ILocator"/> to point to an <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input">input element</a>. However, if the element is inside the <c><label></c> element that has an associated <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control">control</a>, targets the control instead. </para> </summary> <param name="files"> </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocator.TapAsync(Microsoft.Playwright.LocatorTapOptions)"> <summary> <para> Perform a tap gesture on the element matching the locator. For examples of emulating other gestures by manually dispatching touch events, see the <a href="https://playwright.dev/dotnet/docs/touch-events">emulating legacy touch events</a> page. </para> <para>**Details**</para> <para>This method taps the element by performing the following steps:</para> <list type="ordinal"> <item><description> Wait for <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks on the element, unless <see cref="M:Microsoft.Playwright.ILocator.TapAsync(Microsoft.Playwright.LocatorTapOptions)"/> option is set. </description></item> <item><description>Scroll the element into view if needed.</description></item> <item><description> Use <see cref="P:Microsoft.Playwright.IPage.Touchscreen"/> to tap the center of the element, or the specified <see cref="M:Microsoft.Playwright.ILocator.TapAsync(Microsoft.Playwright.LocatorTapOptions)"/>. </description></item> </list> <para> If the element is detached from the DOM at any moment during the action, this method throws. </para> <para> When all steps combined have not finished during the specified <see cref="M:Microsoft.Playwright.ILocator.TapAsync(Microsoft.Playwright.LocatorTapOptions)"/>, this method throws a <see cref="T:System.TimeoutException"/>. Passing zero timeout disables this. </para> <para> <c>element.tap()</c> requires that the <c>hasTouch</c> option of the browser context be set to true. </para> </summary> <remarks> <para> <c>element.tap()</c> requires that the <c>hasTouch</c> option of the browser context be set to true. </para> </remarks> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocator.TextContentAsync(Microsoft.Playwright.LocatorTextContentOptions)"> <summary> <para>Returns the <a href="https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent"><c>node.textContent</c></a>.</para> <para> If you need to assert text on the page, prefer <see cref="M:Microsoft.Playwright.ILocatorAssertions.ToHaveTextAsync(System.String,Microsoft.Playwright.LocatorAssertionsToHaveTextOptions)"/> to avoid flakiness. See <a href="https://playwright.dev/dotnet/docs/test-assertions">assertions guide</a> for more details. </para> </summary> <remarks> <para> If you need to assert text on the page, prefer <see cref="M:Microsoft.Playwright.ILocatorAssertions.ToHaveTextAsync(System.String,Microsoft.Playwright.LocatorAssertionsToHaveTextOptions)"/> to avoid flakiness. See <a href="https://playwright.dev/dotnet/docs/test-assertions">assertions guide</a> for more details. </para> </remarks> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocator.TypeAsync(System.String,Microsoft.Playwright.LocatorTypeOptions)"> <summary> <para> **DEPRECATED** In most cases, you should use <see cref="M:Microsoft.Playwright.ILocator.FillAsync(System.String,Microsoft.Playwright.LocatorFillOptions)"/> instead. You only need to press keys one by one if there is special keyboard handling on the page - in this case use <see cref="M:Microsoft.Playwright.ILocator.PressSequentiallyAsync(System.String,Microsoft.Playwright.LocatorPressSequentiallyOptions)"/>. </para> <para> Focuses the element, and then sends a <c>keydown</c>, <c>keypress</c>/<c>input</c>, and <c>keyup</c> event for each character in the text. </para> <para>To press a special key, like <c>Control</c> or <c>ArrowDown</c>, use <see cref="M:Microsoft.Playwright.ILocator.PressAsync(System.String,Microsoft.Playwright.LocatorPressOptions)"/>.</para> <para>**Usage**</para> </summary> <param name="text">A text to type into a focused element.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocator.UncheckAsync(Microsoft.Playwright.LocatorUncheckOptions)"> <summary> <para>Ensure that checkbox or radio element is unchecked.</para> <para>**Usage**</para> <code>await page.GetByRole(AriaRole.Checkbox).UncheckAsync();</code> <para>**Details**</para> <para>This method unchecks the element by performing the following steps:</para> <list type="ordinal"> <item><description> Ensure that element is a checkbox or a radio input. If not, this method throws. If the element is already unchecked, this method returns immediately. </description></item> <item><description> Wait for <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks on the element, unless <see cref="M:Microsoft.Playwright.ILocator.UncheckAsync(Microsoft.Playwright.LocatorUncheckOptions)"/> option is set. </description></item> <item><description>Scroll the element into view if needed.</description></item> <item><description>Use <see cref="P:Microsoft.Playwright.IPage.Mouse"/> to click in the center of the element.</description></item> <item><description>Ensure that the element is now unchecked. If not, this method throws.</description></item> </list> <para> If the element is detached from the DOM at any moment during the action, this method throws. </para> <para> When all steps combined have not finished during the specified <see cref="M:Microsoft.Playwright.ILocator.UncheckAsync(Microsoft.Playwright.LocatorUncheckOptions)"/>, this method throws a <see cref="T:System.TimeoutException"/>. Passing zero timeout disables this. </para> </summary> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocator.WaitForAsync(Microsoft.Playwright.LocatorWaitForOptions)"> <summary> <para> Returns when element specified by locator satisfies the <see cref="M:Microsoft.Playwright.ILocator.WaitForAsync(Microsoft.Playwright.LocatorWaitForOptions)"/> option. </para> <para> If target element already satisfies the condition, the method returns immediately. Otherwise, waits for up to <see cref="M:Microsoft.Playwright.ILocator.WaitForAsync(Microsoft.Playwright.LocatorWaitForOptions)"/> milliseconds until the condition is met. </para> <para>**Usage**</para> <code> var orderSent = page.Locator("#order-sent");<br/> orderSent.WaitForAsync(); </code> </summary> <param name="options">Call options</param> </member> <member name="T:Microsoft.Playwright.ILocatorAssertions"> <summary> <para> The <see cref="T:Microsoft.Playwright.ILocatorAssertions"/> class provides assertion methods that can be used to make assertions about the <see cref="T:Microsoft.Playwright.ILocator"/> state in the tests. </para> <code> using Microsoft.Playwright;<br/> using Microsoft.Playwright.MSTest;<br/> <br/> namespace PlaywrightTests;<br/> <br/> [TestClass]<br/> public class ExampleTests : PageTest<br/> {<br/> [TestMethod]<br/> public async Task StatusBecomesSubmitted()<br/> {<br/> // ...<br/> await Page.GetByRole(AriaRole.Button, new() { Name = "Sign In" }).ClickAsync();<br/> await Expect(Page.Locator(".status")).ToHaveTextAsync("Submitted");<br/> }<br/> } </code> </summary> </member> <member name="P:Microsoft.Playwright.ILocatorAssertions.Not"> <summary> <para> Makes the assertion check for the opposite condition. For example, this code tests that the Locator doesn't contain text <c>"error"</c>: </para> <code>await Expect(locator).Not.ToContainTextAsync("error");</code> </summary> </member> <member name="M:Microsoft.Playwright.ILocatorAssertions.ToBeAttachedAsync(Microsoft.Playwright.LocatorAssertionsToBeAttachedOptions)"> <summary> <para> Ensures that <see cref="T:Microsoft.Playwright.ILocator"/> points to an element that is <a href="https://developer.mozilla.org/en-US/docs/Web/API/Node/isConnected">connected</a> to a Document or a ShadowRoot. </para> <para>**Usage**</para> <code>await Expect(Page.GetByText("Hidden text")).ToBeAttachedAsync();</code> </summary> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocatorAssertions.ToBeCheckedAsync(Microsoft.Playwright.LocatorAssertionsToBeCheckedOptions)"> <summary> <para>Ensures the <see cref="T:Microsoft.Playwright.ILocator"/> points to a checked input.</para> <para>**Usage**</para> <code> var locator = Page.GetByLabel("Subscribe to newsletter");<br/> await Expect(locator).ToBeCheckedAsync(); </code> </summary> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocatorAssertions.ToBeDisabledAsync(Microsoft.Playwright.LocatorAssertionsToBeDisabledOptions)"> <summary> <para> Ensures the <see cref="T:Microsoft.Playwright.ILocator"/> points to a disabled element. Element is disabled if it has "disabled" attribute or is disabled via <a href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-disabled">'aria-disabled'</a>. Note that only native control elements such as HTML <c>button</c>, <c>input</c>, <c>select</c>, <c>textarea</c>, <c>option</c>, <c>optgroup</c> can be disabled by setting "disabled" attribute. "disabled" attribute on other elements is ignored by the browser. </para> <para>**Usage**</para> <code> var locator = Page.Locator("button.submit");<br/> await Expect(locator).ToBeDisabledAsync(); </code> </summary> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocatorAssertions.ToBeEditableAsync(Microsoft.Playwright.LocatorAssertionsToBeEditableOptions)"> <summary> <para>Ensures the <see cref="T:Microsoft.Playwright.ILocator"/> points to an editable element.</para> <para>**Usage**</para> <code> var locator = Page.GetByRole(AriaRole.Textbox);<br/> await Expect(locator).ToBeEditableAsync(); </code> </summary> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocatorAssertions.ToBeEmptyAsync(Microsoft.Playwright.LocatorAssertionsToBeEmptyOptions)"> <summary> <para> Ensures the <see cref="T:Microsoft.Playwright.ILocator"/> points to an empty editable element or to a DOM node that has no text. </para> <para>**Usage**</para> <code> var locator = Page.Locator("div.warning");<br/> await Expect(locator).ToBeEmptyAsync(); </code> </summary> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocatorAssertions.ToBeEnabledAsync(Microsoft.Playwright.LocatorAssertionsToBeEnabledOptions)"> <summary> <para>Ensures the <see cref="T:Microsoft.Playwright.ILocator"/> points to an enabled element.</para> <para>**Usage**</para> <code> var locator = Page.Locator("button.submit");<br/> await Expect(locator).ToBeEnabledAsync(); </code> </summary> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocatorAssertions.ToBeFocusedAsync(Microsoft.Playwright.LocatorAssertionsToBeFocusedOptions)"> <summary> <para>Ensures the <see cref="T:Microsoft.Playwright.ILocator"/> points to a focused DOM node.</para> <para>**Usage**</para> <code> var locator = Page.GetByRole(AriaRole.Textbox);<br/> await Expect(locator).ToBeFocusedAsync(); </code> </summary> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocatorAssertions.ToBeHiddenAsync(Microsoft.Playwright.LocatorAssertionsToBeHiddenOptions)"> <summary> <para> Ensures that <see cref="T:Microsoft.Playwright.ILocator"/> either does not resolve to any DOM node, or resolves to a <a href="https://playwright.dev/dotnet/docs/actionability#visible">non-visible</a> one. </para> <para>**Usage**</para> <code> var locator = Page.Locator(".my-element");<br/> await Expect(locator).ToBeHiddenAsync(); </code> </summary> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocatorAssertions.ToBeInViewportAsync(Microsoft.Playwright.LocatorAssertionsToBeInViewportOptions)"> <summary> <para> Ensures the <see cref="T:Microsoft.Playwright.ILocator"/> points to an element that intersects viewport, according to the <a href="https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API">intersection observer API</a>. </para> <para>**Usage**</para> <code> var locator = Page.GetByRole(AriaRole.Button);<br/> // Make sure at least some part of element intersects viewport.<br/> await Expect(locator).ToBeInViewportAsync();<br/> // Make sure element is fully outside of viewport.<br/> await Expect(locator).Not.ToBeInViewportAsync();<br/> // Make sure that at least half of the element intersects viewport.<br/> await Expect(locator).ToBeInViewportAsync(new() { Ratio = 0.5 }); </code> </summary> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocatorAssertions.ToBeVisibleAsync(Microsoft.Playwright.LocatorAssertionsToBeVisibleOptions)"> <summary> <para> Ensures that <see cref="T:Microsoft.Playwright.ILocator"/> points to an attached and <a href="https://playwright.dev/dotnet/docs/actionability#visible">visible</a> DOM node. </para> <para>To check that at least one element from the list is visible, use <see cref="P:Microsoft.Playwright.ILocator.First"/>.</para> <para>**Usage**</para> <code> // A specific element is visible.<br/> await Expect(Page.GetByText("Welcome")).ToBeVisibleAsync();<br/> <br/> // At least one item in the list is visible.<br/> await Expect(Page.GetByTestId("todo-item").First).ToBeVisibleAsync();<br/> <br/> // At least one of the two elements is visible, possibly both.<br/> await Expect(<br/> Page.GetByRole(AriaRole.Button, new() { Name = "Sign in" })<br/> .Or(Page.GetByRole(AriaRole.Button, new() { Name = "Sign up" }))<br/> .First<br/> ).ToBeVisibleAsync(); </code> </summary> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocatorAssertions.ToContainClassAsync(System.String,Microsoft.Playwright.LocatorAssertionsToContainClassOptions)"> <summary> <para> Ensures the <see cref="T:Microsoft.Playwright.ILocator"/> points to an element with given CSS classes. All classes from the asserted value, separated by spaces, must be present in the <a href="https://developer.mozilla.org/en-US/docs/Web/API/Element/classList">Element.classList</a> in any order. </para> <para>**Usage**</para> <code> var locator = Page.Locator("#component");<br/> await Expect(locator).ToContainClassAsync("middle selected row");<br/> await Expect(locator).ToContainClassAsync("selected");<br/> await Expect(locator).ToContainClassAsync("row middle"); </code> <para> When an array is passed, the method asserts that the list of elements located matches the corresponding list of expected class lists. Each element's class attribute is matched against the corresponding class in the array: </para> <code> var locator = Page.Locator("list > .component");<br/> await Expect(locator).ToContainClassAsync(new string[]{"inactive", "active", "inactive"}); </code> </summary> <param name="expected"> A string containing expected class names, separated by spaces, or a list of such strings to assert multiple elements. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocatorAssertions.ToContainClassAsync(System.Collections.Generic.IEnumerable{System.String},Microsoft.Playwright.LocatorAssertionsToContainClassOptions)"> <summary> <para> Ensures the <see cref="T:Microsoft.Playwright.ILocator"/> points to an element with given CSS classes. All classes from the asserted value, separated by spaces, must be present in the <a href="https://developer.mozilla.org/en-US/docs/Web/API/Element/classList">Element.classList</a> in any order. </para> <para>**Usage**</para> <code> var locator = Page.Locator("#component");<br/> await Expect(locator).ToContainClassAsync("middle selected row");<br/> await Expect(locator).ToContainClassAsync("selected");<br/> await Expect(locator).ToContainClassAsync("row middle"); </code> <para> When an array is passed, the method asserts that the list of elements located matches the corresponding list of expected class lists. Each element's class attribute is matched against the corresponding class in the array: </para> <code> var locator = Page.Locator("list > .component");<br/> await Expect(locator).ToContainClassAsync(new string[]{"inactive", "active", "inactive"}); </code> </summary> <param name="expected"> A string containing expected class names, separated by spaces, or a list of such strings to assert multiple elements. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocatorAssertions.ToContainTextAsync(System.String,Microsoft.Playwright.LocatorAssertionsToContainTextOptions)"> <summary> <para> Ensures the <see cref="T:Microsoft.Playwright.ILocator"/> points to an element that contains the given text. All nested elements will be considered when computing the text content of the element. You can use regular expressions for the value as well. </para> <para>**Details**</para> <para> When <c>expected</c> parameter is a string, Playwright will normalize whitespaces and line breaks both in the actual text and in the expected string before matching. When regular expression is used, the actual text is matched as is. </para> <para>**Usage**</para> <code> var locator = Page.Locator(".title");<br/> await Expect(locator).ToContainTextAsync("substring");<br/> await Expect(locator).ToContainTextAsync(new Regex("\\d messages")); </code> <para>If you pass an array as an expected value, the expectations are:</para> <list type="ordinal"> <item><description>Locator resolves to a list of elements.</description></item> <item><description>Elements from a **subset** of this list contain text from the expected array, respectively.</description></item> <item><description>The matching subset of elements has the same order as the expected array.</description></item> <item><description>Each text value from the expected array is matched by some element from the list.</description></item> </list> <para>For example, consider the following list:</para> <para>Let's see how we can use the assertion:</para> <code> // ✓ Contains the right items in the right order<br/> await Expect(Page.Locator("ul > li")).ToContainTextAsync(new string[] {"Text 1", "Text 3", "Text 4"});<br/> <br/> // ✖ Wrong order<br/> await Expect(Page.Locator("ul > li")).ToContainTextAsync(new string[] {"Text 3", "Text 2"});<br/> <br/> // ✖ No item contains this text<br/> await Expect(Page.Locator("ul > li")).ToContainTextAsync(new string[] {"Some 33"});<br/> <br/> // ✖ Locator points to the outer list element, not to the list items<br/> await Expect(Page.Locator("ul")).ToContainTextAsync(new string[] {"Text 3"}); </code> </summary> <param name="expected">Expected substring or RegExp or a list of those.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocatorAssertions.ToContainTextAsync(System.Text.RegularExpressions.Regex,Microsoft.Playwright.LocatorAssertionsToContainTextOptions)"> <summary> <para> Ensures the <see cref="T:Microsoft.Playwright.ILocator"/> points to an element that contains the given text. All nested elements will be considered when computing the text content of the element. You can use regular expressions for the value as well. </para> <para>**Details**</para> <para> When <c>expected</c> parameter is a string, Playwright will normalize whitespaces and line breaks both in the actual text and in the expected string before matching. When regular expression is used, the actual text is matched as is. </para> <para>**Usage**</para> <code> var locator = Page.Locator(".title");<br/> await Expect(locator).ToContainTextAsync("substring");<br/> await Expect(locator).ToContainTextAsync(new Regex("\\d messages")); </code> <para>If you pass an array as an expected value, the expectations are:</para> <list type="ordinal"> <item><description>Locator resolves to a list of elements.</description></item> <item><description>Elements from a **subset** of this list contain text from the expected array, respectively.</description></item> <item><description>The matching subset of elements has the same order as the expected array.</description></item> <item><description>Each text value from the expected array is matched by some element from the list.</description></item> </list> <para>For example, consider the following list:</para> <para>Let's see how we can use the assertion:</para> <code> // ✓ Contains the right items in the right order<br/> await Expect(Page.Locator("ul > li")).ToContainTextAsync(new string[] {"Text 1", "Text 3", "Text 4"});<br/> <br/> // ✖ Wrong order<br/> await Expect(Page.Locator("ul > li")).ToContainTextAsync(new string[] {"Text 3", "Text 2"});<br/> <br/> // ✖ No item contains this text<br/> await Expect(Page.Locator("ul > li")).ToContainTextAsync(new string[] {"Some 33"});<br/> <br/> // ✖ Locator points to the outer list element, not to the list items<br/> await Expect(Page.Locator("ul")).ToContainTextAsync(new string[] {"Text 3"}); </code> </summary> <param name="expected">Expected substring or RegExp or a list of those.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocatorAssertions.ToContainTextAsync(System.Collections.Generic.IEnumerable{System.String},Microsoft.Playwright.LocatorAssertionsToContainTextOptions)"> <summary> <para> Ensures the <see cref="T:Microsoft.Playwright.ILocator"/> points to an element that contains the given text. All nested elements will be considered when computing the text content of the element. You can use regular expressions for the value as well. </para> <para>**Details**</para> <para> When <c>expected</c> parameter is a string, Playwright will normalize whitespaces and line breaks both in the actual text and in the expected string before matching. When regular expression is used, the actual text is matched as is. </para> <para>**Usage**</para> <code> var locator = Page.Locator(".title");<br/> await Expect(locator).ToContainTextAsync("substring");<br/> await Expect(locator).ToContainTextAsync(new Regex("\\d messages")); </code> <para>If you pass an array as an expected value, the expectations are:</para> <list type="ordinal"> <item><description>Locator resolves to a list of elements.</description></item> <item><description>Elements from a **subset** of this list contain text from the expected array, respectively.</description></item> <item><description>The matching subset of elements has the same order as the expected array.</description></item> <item><description>Each text value from the expected array is matched by some element from the list.</description></item> </list> <para>For example, consider the following list:</para> <para>Let's see how we can use the assertion:</para> <code> // ✓ Contains the right items in the right order<br/> await Expect(Page.Locator("ul > li")).ToContainTextAsync(new string[] {"Text 1", "Text 3", "Text 4"});<br/> <br/> // ✖ Wrong order<br/> await Expect(Page.Locator("ul > li")).ToContainTextAsync(new string[] {"Text 3", "Text 2"});<br/> <br/> // ✖ No item contains this text<br/> await Expect(Page.Locator("ul > li")).ToContainTextAsync(new string[] {"Some 33"});<br/> <br/> // ✖ Locator points to the outer list element, not to the list items<br/> await Expect(Page.Locator("ul")).ToContainTextAsync(new string[] {"Text 3"}); </code> </summary> <param name="expected">Expected substring or RegExp or a list of those.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocatorAssertions.ToContainTextAsync(System.Collections.Generic.IEnumerable{System.Text.RegularExpressions.Regex},Microsoft.Playwright.LocatorAssertionsToContainTextOptions)"> <summary> <para> Ensures the <see cref="T:Microsoft.Playwright.ILocator"/> points to an element that contains the given text. All nested elements will be considered when computing the text content of the element. You can use regular expressions for the value as well. </para> <para>**Details**</para> <para> When <c>expected</c> parameter is a string, Playwright will normalize whitespaces and line breaks both in the actual text and in the expected string before matching. When regular expression is used, the actual text is matched as is. </para> <para>**Usage**</para> <code> var locator = Page.Locator(".title");<br/> await Expect(locator).ToContainTextAsync("substring");<br/> await Expect(locator).ToContainTextAsync(new Regex("\\d messages")); </code> <para>If you pass an array as an expected value, the expectations are:</para> <list type="ordinal"> <item><description>Locator resolves to a list of elements.</description></item> <item><description>Elements from a **subset** of this list contain text from the expected array, respectively.</description></item> <item><description>The matching subset of elements has the same order as the expected array.</description></item> <item><description>Each text value from the expected array is matched by some element from the list.</description></item> </list> <para>For example, consider the following list:</para> <para>Let's see how we can use the assertion:</para> <code> // ✓ Contains the right items in the right order<br/> await Expect(Page.Locator("ul > li")).ToContainTextAsync(new string[] {"Text 1", "Text 3", "Text 4"});<br/> <br/> // ✖ Wrong order<br/> await Expect(Page.Locator("ul > li")).ToContainTextAsync(new string[] {"Text 3", "Text 2"});<br/> <br/> // ✖ No item contains this text<br/> await Expect(Page.Locator("ul > li")).ToContainTextAsync(new string[] {"Some 33"});<br/> <br/> // ✖ Locator points to the outer list element, not to the list items<br/> await Expect(Page.Locator("ul")).ToContainTextAsync(new string[] {"Text 3"}); </code> </summary> <param name="expected">Expected substring or RegExp or a list of those.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocatorAssertions.ToHaveAccessibleDescriptionAsync(System.String,Microsoft.Playwright.LocatorAssertionsToHaveAccessibleDescriptionOptions)"> <summary> <para> Ensures the <see cref="T:Microsoft.Playwright.ILocator"/> points to an element with a given <a href="https://w3c.github.io/accname/#dfn-accessible-description">accessible description</a>. </para> <para>**Usage**</para> <code> var locator = Page.GetByTestId("save-button");<br/> await Expect(locator).ToHaveAccessibleDescriptionAsync("Save results to disk"); </code> </summary> <param name="description">Expected accessible description.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocatorAssertions.ToHaveAccessibleDescriptionAsync(System.Text.RegularExpressions.Regex,Microsoft.Playwright.LocatorAssertionsToHaveAccessibleDescriptionOptions)"> <summary> <para> Ensures the <see cref="T:Microsoft.Playwright.ILocator"/> points to an element with a given <a href="https://w3c.github.io/accname/#dfn-accessible-description">accessible description</a>. </para> <para>**Usage**</para> <code> var locator = Page.GetByTestId("save-button");<br/> await Expect(locator).ToHaveAccessibleDescriptionAsync("Save results to disk"); </code> </summary> <param name="description">Expected accessible description.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocatorAssertions.ToHaveAccessibleErrorMessageAsync(System.String,Microsoft.Playwright.LocatorAssertionsToHaveAccessibleErrorMessageOptions)"> <summary> <para> Ensures the <see cref="T:Microsoft.Playwright.ILocator"/> points to an element with a given <a href="https://w3c.github.io/aria/#aria-errormessage">aria errormessage</a>. </para> <para>**Usage**</para> <code> var locator = Page.GetByTestId("username-input");<br/> await Expect(locator).ToHaveAccessibleErrorMessageAsync("Username is required."); </code> </summary> <param name="errorMessage">Expected accessible error message.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocatorAssertions.ToHaveAccessibleErrorMessageAsync(System.Text.RegularExpressions.Regex,Microsoft.Playwright.LocatorAssertionsToHaveAccessibleErrorMessageOptions)"> <summary> <para> Ensures the <see cref="T:Microsoft.Playwright.ILocator"/> points to an element with a given <a href="https://w3c.github.io/aria/#aria-errormessage">aria errormessage</a>. </para> <para>**Usage**</para> <code> var locator = Page.GetByTestId("username-input");<br/> await Expect(locator).ToHaveAccessibleErrorMessageAsync("Username is required."); </code> </summary> <param name="errorMessage">Expected accessible error message.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocatorAssertions.ToHaveAccessibleNameAsync(System.String,Microsoft.Playwright.LocatorAssertionsToHaveAccessibleNameOptions)"> <summary> <para> Ensures the <see cref="T:Microsoft.Playwright.ILocator"/> points to an element with a given <a href="https://w3c.github.io/accname/#dfn-accessible-name">accessible name</a>. </para> <para>**Usage**</para> <code> var locator = Page.GetByTestId("save-button");<br/> await Expect(locator).ToHaveAccessibleNameAsync("Save to disk"); </code> </summary> <param name="name">Expected accessible name.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocatorAssertions.ToHaveAccessibleNameAsync(System.Text.RegularExpressions.Regex,Microsoft.Playwright.LocatorAssertionsToHaveAccessibleNameOptions)"> <summary> <para> Ensures the <see cref="T:Microsoft.Playwright.ILocator"/> points to an element with a given <a href="https://w3c.github.io/accname/#dfn-accessible-name">accessible name</a>. </para> <para>**Usage**</para> <code> var locator = Page.GetByTestId("save-button");<br/> await Expect(locator).ToHaveAccessibleNameAsync("Save to disk"); </code> </summary> <param name="name">Expected accessible name.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocatorAssertions.ToHaveAttributeAsync(System.String,System.String,Microsoft.Playwright.LocatorAssertionsToHaveAttributeOptions)"> <summary> <para>Ensures the <see cref="T:Microsoft.Playwright.ILocator"/> points to an element with given attribute.</para> <para>**Usage**</para> <code> var locator = Page.Locator("input");<br/> await Expect(locator).ToHaveAttributeAsync("type", "text"); </code> </summary> <param name="name">Attribute name.</param> <param name="value">Expected attribute value.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocatorAssertions.ToHaveAttributeAsync(System.String,System.Text.RegularExpressions.Regex,Microsoft.Playwright.LocatorAssertionsToHaveAttributeOptions)"> <summary> <para>Ensures the <see cref="T:Microsoft.Playwright.ILocator"/> points to an element with given attribute.</para> <para>**Usage**</para> <code> var locator = Page.Locator("input");<br/> await Expect(locator).ToHaveAttributeAsync("type", "text"); </code> </summary> <param name="name">Attribute name.</param> <param name="value">Expected attribute value.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocatorAssertions.ToHaveClassAsync(System.String,Microsoft.Playwright.LocatorAssertionsToHaveClassOptions)"> <summary> <para> Ensures the <see cref="T:Microsoft.Playwright.ILocator"/> points to an element with given CSS classes. When a string is provided, it must fully match the element's <c>class</c> attribute. To match individual classes use <see cref="M:Microsoft.Playwright.ILocatorAssertions.ToContainClassAsync(System.String,Microsoft.Playwright.LocatorAssertionsToContainClassOptions)"/>. </para> <para>**Usage**</para> <code> var locator = Page.Locator("#component");<br/> await Expect(locator).ToHaveClassAsync("middle selected row");<br/> await Expect(locator).ToHaveClassAsync(new Regex("(^|\\s)selected(\\s|$)")); </code> <para> When an array is passed, the method asserts that the list of elements located matches the corresponding list of expected class values. Each element's class attribute is matched against the corresponding string or regular expression in the array: </para> <code> var locator = Page.Locator("list > .component");<br/> await Expect(locator).ToHaveClassAsync(new string[]{"component", "component selected", "component"}); </code> </summary> <param name="expected">Expected class or RegExp or a list of those.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocatorAssertions.ToHaveClassAsync(System.Text.RegularExpressions.Regex,Microsoft.Playwright.LocatorAssertionsToHaveClassOptions)"> <summary> <para> Ensures the <see cref="T:Microsoft.Playwright.ILocator"/> points to an element with given CSS classes. When a string is provided, it must fully match the element's <c>class</c> attribute. To match individual classes use <see cref="M:Microsoft.Playwright.ILocatorAssertions.ToContainClassAsync(System.String,Microsoft.Playwright.LocatorAssertionsToContainClassOptions)"/>. </para> <para>**Usage**</para> <code> var locator = Page.Locator("#component");<br/> await Expect(locator).ToHaveClassAsync("middle selected row");<br/> await Expect(locator).ToHaveClassAsync(new Regex("(^|\\s)selected(\\s|$)")); </code> <para> When an array is passed, the method asserts that the list of elements located matches the corresponding list of expected class values. Each element's class attribute is matched against the corresponding string or regular expression in the array: </para> <code> var locator = Page.Locator("list > .component");<br/> await Expect(locator).ToHaveClassAsync(new string[]{"component", "component selected", "component"}); </code> </summary> <param name="expected">Expected class or RegExp or a list of those.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocatorAssertions.ToHaveClassAsync(System.Collections.Generic.IEnumerable{System.String},Microsoft.Playwright.LocatorAssertionsToHaveClassOptions)"> <summary> <para> Ensures the <see cref="T:Microsoft.Playwright.ILocator"/> points to an element with given CSS classes. When a string is provided, it must fully match the element's <c>class</c> attribute. To match individual classes use <see cref="M:Microsoft.Playwright.ILocatorAssertions.ToContainClassAsync(System.String,Microsoft.Playwright.LocatorAssertionsToContainClassOptions)"/>. </para> <para>**Usage**</para> <code> var locator = Page.Locator("#component");<br/> await Expect(locator).ToHaveClassAsync("middle selected row");<br/> await Expect(locator).ToHaveClassAsync(new Regex("(^|\\s)selected(\\s|$)")); </code> <para> When an array is passed, the method asserts that the list of elements located matches the corresponding list of expected class values. Each element's class attribute is matched against the corresponding string or regular expression in the array: </para> <code> var locator = Page.Locator("list > .component");<br/> await Expect(locator).ToHaveClassAsync(new string[]{"component", "component selected", "component"}); </code> </summary> <param name="expected">Expected class or RegExp or a list of those.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocatorAssertions.ToHaveClassAsync(System.Collections.Generic.IEnumerable{System.Text.RegularExpressions.Regex},Microsoft.Playwright.LocatorAssertionsToHaveClassOptions)"> <summary> <para> Ensures the <see cref="T:Microsoft.Playwright.ILocator"/> points to an element with given CSS classes. When a string is provided, it must fully match the element's <c>class</c> attribute. To match individual classes use <see cref="M:Microsoft.Playwright.ILocatorAssertions.ToContainClassAsync(System.String,Microsoft.Playwright.LocatorAssertionsToContainClassOptions)"/>. </para> <para>**Usage**</para> <code> var locator = Page.Locator("#component");<br/> await Expect(locator).ToHaveClassAsync("middle selected row");<br/> await Expect(locator).ToHaveClassAsync(new Regex("(^|\\s)selected(\\s|$)")); </code> <para> When an array is passed, the method asserts that the list of elements located matches the corresponding list of expected class values. Each element's class attribute is matched against the corresponding string or regular expression in the array: </para> <code> var locator = Page.Locator("list > .component");<br/> await Expect(locator).ToHaveClassAsync(new string[]{"component", "component selected", "component"}); </code> </summary> <param name="expected">Expected class or RegExp or a list of those.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocatorAssertions.ToHaveCountAsync(System.Int32,Microsoft.Playwright.LocatorAssertionsToHaveCountOptions)"> <summary> <para>Ensures the <see cref="T:Microsoft.Playwright.ILocator"/> resolves to an exact number of DOM nodes.</para> <para>**Usage**</para> <code> var locator = Page.Locator("list > .component");<br/> await Expect(locator).ToHaveCountAsync(3); </code> </summary> <param name="count">Expected count.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocatorAssertions.ToHaveCSSAsync(System.String,System.String,Microsoft.Playwright.LocatorAssertionsToHaveCSSOptions)"> <summary> <para> Ensures the <see cref="T:Microsoft.Playwright.ILocator"/> resolves to an element with the given computed CSS style. </para> <para>**Usage**</para> <code> var locator = Page.GetByRole(AriaRole.Button);<br/> await Expect(locator).ToHaveCSSAsync("display", "flex"); </code> </summary> <param name="name">CSS property name.</param> <param name="value">CSS property value.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocatorAssertions.ToHaveCSSAsync(System.String,System.Text.RegularExpressions.Regex,Microsoft.Playwright.LocatorAssertionsToHaveCSSOptions)"> <summary> <para> Ensures the <see cref="T:Microsoft.Playwright.ILocator"/> resolves to an element with the given computed CSS style. </para> <para>**Usage**</para> <code> var locator = Page.GetByRole(AriaRole.Button);<br/> await Expect(locator).ToHaveCSSAsync("display", "flex"); </code> </summary> <param name="name">CSS property name.</param> <param name="value">CSS property value.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocatorAssertions.ToHaveIdAsync(System.String,Microsoft.Playwright.LocatorAssertionsToHaveIdOptions)"> <summary> <para> Ensures the <see cref="T:Microsoft.Playwright.ILocator"/> points to an element with the given DOM Node ID. </para> <para>**Usage**</para> <code> var locator = Page.GetByRole(AriaRole.Textbox);<br/> await Expect(locator).ToHaveIdAsync("lastname"); </code> </summary> <param name="id">Element id.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocatorAssertions.ToHaveIdAsync(System.Text.RegularExpressions.Regex,Microsoft.Playwright.LocatorAssertionsToHaveIdOptions)"> <summary> <para> Ensures the <see cref="T:Microsoft.Playwright.ILocator"/> points to an element with the given DOM Node ID. </para> <para>**Usage**</para> <code> var locator = Page.GetByRole(AriaRole.Textbox);<br/> await Expect(locator).ToHaveIdAsync("lastname"); </code> </summary> <param name="id">Element id.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocatorAssertions.ToHaveJSPropertyAsync(System.String,System.Object,Microsoft.Playwright.LocatorAssertionsToHaveJSPropertyOptions)"> <summary> <para> Ensures the <see cref="T:Microsoft.Playwright.ILocator"/> points to an element with given JavaScript property. Note that this property can be of a primitive type as well as a plain serializable JavaScript object. </para> <para>**Usage**</para> <code> var locator = Page.Locator(".component");<br/> await Expect(locator).ToHaveJSPropertyAsync("loaded", true); </code> </summary> <param name="name">Property name.</param> <param name="value">Property value.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocatorAssertions.ToHaveRoleAsync(Microsoft.Playwright.AriaRole,Microsoft.Playwright.LocatorAssertionsToHaveRoleOptions)"> <summary> <para> Ensures the <see cref="T:Microsoft.Playwright.ILocator"/> points to an element with a given <a href="https://www.w3.org/TR/wai-aria-1.2/#roles">ARIA role</a>. </para> <para> Note that role is matched as a string, disregarding the ARIA role hierarchy. For example, asserting a superclass role <c>"checkbox"</c> on an element with a subclass role <c>"switch"</c> will fail. </para> <para>**Usage**</para> <code> var locator = Page.GetByTestId("save-button");<br/> await Expect(locator).ToHaveRoleAsync(AriaRole.Button); </code> </summary> <param name="role">Required aria role.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocatorAssertions.ToHaveTextAsync(System.String,Microsoft.Playwright.LocatorAssertionsToHaveTextOptions)"> <summary> <para> Ensures the <see cref="T:Microsoft.Playwright.ILocator"/> points to an element with the given text. All nested elements will be considered when computing the text content of the element. You can use regular expressions for the value as well. </para> <para>**Details**</para> <para> When <c>expected</c> parameter is a string, Playwright will normalize whitespaces and line breaks both in the actual text and in the expected string before matching. When regular expression is used, the actual text is matched as is. </para> <para>**Usage**</para> <code> var locator = Page.Locator(".title");<br/> await Expect(locator).ToHaveTextAsync(new Regex("Welcome, Test User"));<br/> await Expect(locator).ToHaveTextAsync(new Regex("Welcome, .*")); </code> <para>If you pass an array as an expected value, the expectations are:</para> <list type="ordinal"> <item><description>Locator resolves to a list of elements.</description></item> <item><description>The number of elements equals the number of expected values in the array.</description></item> <item><description> Elements from the list have text matching expected array values, one by one, in order. </description></item> </list> <para>For example, consider the following list:</para> <para>Let's see how we can use the assertion:</para> <code> // ✓ Has the right items in the right order<br/> await Expect(Page.Locator("ul > li")).ToHaveTextAsync(new string[] {"Text 1", "Text 2", "Text 3"});<br/> <br/> // ✖ Wrong order<br/> await Expect(Page.Locator("ul > li")).ToHaveTextAsync(new string[] {"Text 3", "Text 2", "Text 1"});<br/> <br/> // ✖ Last item does not match<br/> await Expect(Page.Locator("ul > li")).ToHaveTextAsync(new string[] {"Text 1", "Text 2", "Text"});<br/> <br/> // ✖ Locator points to the outer list element, not to the list items<br/> await Expect(Page.Locator("ul")).ToHaveTextAsync(new string[] {"Text 1", "Text 2", "Text 3"}); </code> </summary> <param name="expected">Expected string or RegExp or a list of those.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocatorAssertions.ToHaveTextAsync(System.Text.RegularExpressions.Regex,Microsoft.Playwright.LocatorAssertionsToHaveTextOptions)"> <summary> <para> Ensures the <see cref="T:Microsoft.Playwright.ILocator"/> points to an element with the given text. All nested elements will be considered when computing the text content of the element. You can use regular expressions for the value as well. </para> <para>**Details**</para> <para> When <c>expected</c> parameter is a string, Playwright will normalize whitespaces and line breaks both in the actual text and in the expected string before matching. When regular expression is used, the actual text is matched as is. </para> <para>**Usage**</para> <code> var locator = Page.Locator(".title");<br/> await Expect(locator).ToHaveTextAsync(new Regex("Welcome, Test User"));<br/> await Expect(locator).ToHaveTextAsync(new Regex("Welcome, .*")); </code> <para>If you pass an array as an expected value, the expectations are:</para> <list type="ordinal"> <item><description>Locator resolves to a list of elements.</description></item> <item><description>The number of elements equals the number of expected values in the array.</description></item> <item><description> Elements from the list have text matching expected array values, one by one, in order. </description></item> </list> <para>For example, consider the following list:</para> <para>Let's see how we can use the assertion:</para> <code> // ✓ Has the right items in the right order<br/> await Expect(Page.Locator("ul > li")).ToHaveTextAsync(new string[] {"Text 1", "Text 2", "Text 3"});<br/> <br/> // ✖ Wrong order<br/> await Expect(Page.Locator("ul > li")).ToHaveTextAsync(new string[] {"Text 3", "Text 2", "Text 1"});<br/> <br/> // ✖ Last item does not match<br/> await Expect(Page.Locator("ul > li")).ToHaveTextAsync(new string[] {"Text 1", "Text 2", "Text"});<br/> <br/> // ✖ Locator points to the outer list element, not to the list items<br/> await Expect(Page.Locator("ul")).ToHaveTextAsync(new string[] {"Text 1", "Text 2", "Text 3"}); </code> </summary> <param name="expected">Expected string or RegExp or a list of those.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocatorAssertions.ToHaveTextAsync(System.Collections.Generic.IEnumerable{System.String},Microsoft.Playwright.LocatorAssertionsToHaveTextOptions)"> <summary> <para> Ensures the <see cref="T:Microsoft.Playwright.ILocator"/> points to an element with the given text. All nested elements will be considered when computing the text content of the element. You can use regular expressions for the value as well. </para> <para>**Details**</para> <para> When <c>expected</c> parameter is a string, Playwright will normalize whitespaces and line breaks both in the actual text and in the expected string before matching. When regular expression is used, the actual text is matched as is. </para> <para>**Usage**</para> <code> var locator = Page.Locator(".title");<br/> await Expect(locator).ToHaveTextAsync(new Regex("Welcome, Test User"));<br/> await Expect(locator).ToHaveTextAsync(new Regex("Welcome, .*")); </code> <para>If you pass an array as an expected value, the expectations are:</para> <list type="ordinal"> <item><description>Locator resolves to a list of elements.</description></item> <item><description>The number of elements equals the number of expected values in the array.</description></item> <item><description> Elements from the list have text matching expected array values, one by one, in order. </description></item> </list> <para>For example, consider the following list:</para> <para>Let's see how we can use the assertion:</para> <code> // ✓ Has the right items in the right order<br/> await Expect(Page.Locator("ul > li")).ToHaveTextAsync(new string[] {"Text 1", "Text 2", "Text 3"});<br/> <br/> // ✖ Wrong order<br/> await Expect(Page.Locator("ul > li")).ToHaveTextAsync(new string[] {"Text 3", "Text 2", "Text 1"});<br/> <br/> // ✖ Last item does not match<br/> await Expect(Page.Locator("ul > li")).ToHaveTextAsync(new string[] {"Text 1", "Text 2", "Text"});<br/> <br/> // ✖ Locator points to the outer list element, not to the list items<br/> await Expect(Page.Locator("ul")).ToHaveTextAsync(new string[] {"Text 1", "Text 2", "Text 3"}); </code> </summary> <param name="expected">Expected string or RegExp or a list of those.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocatorAssertions.ToHaveTextAsync(System.Collections.Generic.IEnumerable{System.Text.RegularExpressions.Regex},Microsoft.Playwright.LocatorAssertionsToHaveTextOptions)"> <summary> <para> Ensures the <see cref="T:Microsoft.Playwright.ILocator"/> points to an element with the given text. All nested elements will be considered when computing the text content of the element. You can use regular expressions for the value as well. </para> <para>**Details**</para> <para> When <c>expected</c> parameter is a string, Playwright will normalize whitespaces and line breaks both in the actual text and in the expected string before matching. When regular expression is used, the actual text is matched as is. </para> <para>**Usage**</para> <code> var locator = Page.Locator(".title");<br/> await Expect(locator).ToHaveTextAsync(new Regex("Welcome, Test User"));<br/> await Expect(locator).ToHaveTextAsync(new Regex("Welcome, .*")); </code> <para>If you pass an array as an expected value, the expectations are:</para> <list type="ordinal"> <item><description>Locator resolves to a list of elements.</description></item> <item><description>The number of elements equals the number of expected values in the array.</description></item> <item><description> Elements from the list have text matching expected array values, one by one, in order. </description></item> </list> <para>For example, consider the following list:</para> <para>Let's see how we can use the assertion:</para> <code> // ✓ Has the right items in the right order<br/> await Expect(Page.Locator("ul > li")).ToHaveTextAsync(new string[] {"Text 1", "Text 2", "Text 3"});<br/> <br/> // ✖ Wrong order<br/> await Expect(Page.Locator("ul > li")).ToHaveTextAsync(new string[] {"Text 3", "Text 2", "Text 1"});<br/> <br/> // ✖ Last item does not match<br/> await Expect(Page.Locator("ul > li")).ToHaveTextAsync(new string[] {"Text 1", "Text 2", "Text"});<br/> <br/> // ✖ Locator points to the outer list element, not to the list items<br/> await Expect(Page.Locator("ul")).ToHaveTextAsync(new string[] {"Text 1", "Text 2", "Text 3"}); </code> </summary> <param name="expected">Expected string or RegExp or a list of those.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocatorAssertions.ToHaveValueAsync(System.String,Microsoft.Playwright.LocatorAssertionsToHaveValueOptions)"> <summary> <para> Ensures the <see cref="T:Microsoft.Playwright.ILocator"/> points to an element with the given input value. You can use regular expressions for the value as well. </para> <para>**Usage**</para> <code> var locator = Page.Locator("input[type=number]");<br/> await Expect(locator).ToHaveValueAsync(new Regex("[0-9]")); </code> </summary> <param name="value">Expected value.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocatorAssertions.ToHaveValueAsync(System.Text.RegularExpressions.Regex,Microsoft.Playwright.LocatorAssertionsToHaveValueOptions)"> <summary> <para> Ensures the <see cref="T:Microsoft.Playwright.ILocator"/> points to an element with the given input value. You can use regular expressions for the value as well. </para> <para>**Usage**</para> <code> var locator = Page.Locator("input[type=number]");<br/> await Expect(locator).ToHaveValueAsync(new Regex("[0-9]")); </code> </summary> <param name="value">Expected value.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocatorAssertions.ToHaveValuesAsync(System.Collections.Generic.IEnumerable{System.String},Microsoft.Playwright.LocatorAssertionsToHaveValuesOptions)"> <summary> <para> Ensures the <see cref="T:Microsoft.Playwright.ILocator"/> points to multi-select/combobox (i.e. a <c>select</c> with the <c>multiple</c> attribute) and the specified values are selected. </para> <para>**Usage**</para> <para>For example, given the following element:</para> <code> var locator = Page.Locator("id=favorite-colors");<br/> await locator.SelectOptionAsync(new string[] { "R", "G" });<br/> await Expect(locator).ToHaveValuesAsync(new Regex[] { new Regex("R"), new Regex("G") }); </code> </summary> <param name="values">Expected options currently selected.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocatorAssertions.ToHaveValuesAsync(System.Collections.Generic.IEnumerable{System.Text.RegularExpressions.Regex},Microsoft.Playwright.LocatorAssertionsToHaveValuesOptions)"> <summary> <para> Ensures the <see cref="T:Microsoft.Playwright.ILocator"/> points to multi-select/combobox (i.e. a <c>select</c> with the <c>multiple</c> attribute) and the specified values are selected. </para> <para>**Usage**</para> <para>For example, given the following element:</para> <code> var locator = Page.Locator("id=favorite-colors");<br/> await locator.SelectOptionAsync(new string[] { "R", "G" });<br/> await Expect(locator).ToHaveValuesAsync(new Regex[] { new Regex("R"), new Regex("G") }); </code> </summary> <param name="values">Expected options currently selected.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ILocatorAssertions.ToMatchAriaSnapshotAsync(System.String,Microsoft.Playwright.LocatorAssertionsToMatchAriaSnapshotOptions)"> <summary> <para> Asserts that the target element matches the given <a href="https://playwright.dev/dotnet/docs/aria-snapshots">accessibility snapshot</a>. </para> <para>**Usage**</para> <code> await page.GotoAsync("https://demo.playwright.dev/todomvc/");<br/> await Expect(page.Locator("body")).ToMatchAriaSnapshotAsync(@"<br/> - heading ""todos""<br/> - textbox ""What needs to be done?""<br/> "); </code> </summary> <param name="expected"> </param> <param name="options">Call options</param> </member> <member name="T:Microsoft.Playwright.IMouse"> <summary> <para> The Mouse class operates in main-frame CSS pixels relative to the top-left corner of the viewport. </para> <para>Every <c>page</c> object has its own Mouse, accessible with <see cref="P:Microsoft.Playwright.IPage.Mouse"/>.</para> <code> await Page.Mouse.MoveAsync(0, 0);<br/> await Page.Mouse.DownAsync();<br/> await Page.Mouse.MoveAsync(0, 100);<br/> await Page.Mouse.MoveAsync(100, 100);<br/> await Page.Mouse.MoveAsync(100, 0);<br/> await Page.Mouse.MoveAsync(0, 0);<br/> await Page.Mouse.UpAsync(); </code> </summary> </member> <member name="M:Microsoft.Playwright.IMouse.ClickAsync(System.Single,System.Single,Microsoft.Playwright.MouseClickOptions)"> <summary> <para> Shortcut for <see cref="M:Microsoft.Playwright.IMouse.MoveAsync(System.Single,System.Single,Microsoft.Playwright.MouseMoveOptions)"/>, <see cref="M:Microsoft.Playwright.IMouse.DownAsync(Microsoft.Playwright.MouseDownOptions)"/>, <see cref="M:Microsoft.Playwright.IMouse.UpAsync(Microsoft.Playwright.MouseUpOptions)"/>. </para> </summary> <param name="x">X coordinate relative to the main frame's viewport in CSS pixels.</param> <param name="y">Y coordinate relative to the main frame's viewport in CSS pixels.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IMouse.DblClickAsync(System.Single,System.Single,Microsoft.Playwright.MouseDblClickOptions)"> <summary> <para> Shortcut for <see cref="M:Microsoft.Playwright.IMouse.MoveAsync(System.Single,System.Single,Microsoft.Playwright.MouseMoveOptions)"/>, <see cref="M:Microsoft.Playwright.IMouse.DownAsync(Microsoft.Playwright.MouseDownOptions)"/>, <see cref="M:Microsoft.Playwright.IMouse.UpAsync(Microsoft.Playwright.MouseUpOptions)"/>, <see cref="M:Microsoft.Playwright.IMouse.DownAsync(Microsoft.Playwright.MouseDownOptions)"/> and <see cref="M:Microsoft.Playwright.IMouse.UpAsync(Microsoft.Playwright.MouseUpOptions)"/>. </para> </summary> <param name="x">X coordinate relative to the main frame's viewport in CSS pixels.</param> <param name="y">Y coordinate relative to the main frame's viewport in CSS pixels.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IMouse.DownAsync(Microsoft.Playwright.MouseDownOptions)"> <summary><para>Dispatches a <c>mousedown</c> event.</para></summary> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IMouse.MoveAsync(System.Single,System.Single,Microsoft.Playwright.MouseMoveOptions)"> <summary><para>Dispatches a <c>mousemove</c> event.</para></summary> <param name="x">X coordinate relative to the main frame's viewport in CSS pixels.</param> <param name="y">Y coordinate relative to the main frame's viewport in CSS pixels.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IMouse.UpAsync(Microsoft.Playwright.MouseUpOptions)"> <summary><para>Dispatches a <c>mouseup</c> event.</para></summary> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IMouse.WheelAsync(System.Single,System.Single)"> <summary> <para> Dispatches a <c>wheel</c> event. This method is usually used to manually scroll the page. See <a href="https://playwright.dev/dotnet/docs/input#scrolling">scrolling</a> for alternative ways to scroll. </para> <para> Wheel events may cause scrolling if they are not handled, and this method does not wait for the scrolling to finish before returning. </para> </summary> <remarks> <para> Wheel events may cause scrolling if they are not handled, and this method does not wait for the scrolling to finish before returning. </para> </remarks> <param name="deltaX">Pixels to scroll horizontally.</param> <param name="deltaY">Pixels to scroll vertically.</param> </member> <member name="T:Microsoft.Playwright.IPage"> <summary> <para> Page provides methods to interact with a single tab in a <see cref="T:Microsoft.Playwright.IBrowser"/>, or an <a href="https://developer.chrome.com/extensions/background_pages">extension background page</a> in Chromium. One <see cref="T:Microsoft.Playwright.IBrowser"/> instance might have multiple <see cref="T:Microsoft.Playwright.IPage"/> instances. </para> <para>This example creates a page, navigates it to a URL, and then saves a screenshot:</para> <code> using Microsoft.Playwright;<br/> using System.Threading.Tasks;<br/> <br/> class PageExamples<br/> {<br/> public static async Task Run()<br/> {<br/> using var playwright = await Playwright.CreateAsync();<br/> await using var browser = await playwright.Webkit.LaunchAsync();<br/> var page = await browser.NewPageAsync();<br/> await page.GotoAsync("https://www.theverge.com");<br/> await page.ScreenshotAsync(new() { Path = "theverge.png" });<br/> }<br/> } </code> <para> The Page class emits various events (described below) which can be handled using any of Node's native <a href="https://nodejs.org/api/events.html#events_class_eventemitter"><c>EventEmitter</c></a> methods, such as <c>on</c>, <c>once</c> or <c>removeListener</c>. </para> <para>This example logs a message for a single page <c>load</c> event:</para> <code>page.Load += (_, _) => Console.WriteLine("Page loaded!");</code> <para>To unsubscribe from events use the <c>removeListener</c> method:</para> <code> void PageLoadHandler(object _, IPage p) {<br/> Console.WriteLine("Page loaded!");<br/> };<br/> <br/> page.Load += PageLoadHandler;<br/> // Do some work...<br/> page.Load -= PageLoadHandler; </code> </summary> </member> <member name="P:Microsoft.Playwright.IPage.Clock"> <summary><para>Playwright has ability to mock clock and passage of time.</para></summary> </member> <member name="E:Microsoft.Playwright.IPage.Close"> <summary><para>Emitted when the page closes.</para></summary> </member> <member name="E:Microsoft.Playwright.IPage.Console"> <summary> <para> Emitted when JavaScript within the page calls one of console API methods, e.g. <c>console.log</c> or <c>console.dir</c>. </para> <para> The arguments passed into <c>console.log</c> are available on the <see cref="T:Microsoft.Playwright.IConsoleMessage"/> event handler argument. </para> <para>**Usage**</para> <code> page.Console += async (_, msg) =><br/> {<br/> foreach (var arg in msg.Args)<br/> Console.WriteLine(await arg.JsonValueAsync<object>());<br/> };<br/> <br/> await page.EvaluateAsync("console.log('hello', 5, { foo: 'bar' })"); </code> </summary> </member> <member name="E:Microsoft.Playwright.IPage.Crash"> <summary> <para> Emitted when the page crashes. Browser pages might crash if they try to allocate too much memory. When the page crashes, ongoing and subsequent operations will throw. </para> <para>The most common way to deal with crashes is to catch an exception:</para> <code> try {<br/> // Crash might happen during a click.<br/> await page.ClickAsync("button");<br/> // Or while waiting for an event.<br/> await page.WaitForPopup();<br/> } catch (PlaywrightException e) {<br/> // When the page crashes, exception message contains "crash".<br/> } </code> </summary> </member> <member name="E:Microsoft.Playwright.IPage.Dialog"> <summary> <para> Emitted when a JavaScript dialog appears, such as <c>alert</c>, <c>prompt</c>, <c>confirm</c> or <c>beforeunload</c>. Listener **must** either <see cref="M:Microsoft.Playwright.IDialog.AcceptAsync(System.String)"/> or <see cref="M:Microsoft.Playwright.IDialog.DismissAsync"/> the dialog - otherwise the page will <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/EventLoop#never_blocking">freeze</a> waiting for the dialog, and actions like click will never finish. </para> <para>**Usage**</para> <code> page.RequestFailed += (_, request) =><br/> {<br/> Console.WriteLine(request.Url + " " + request.Failure);<br/> }; </code> <para> When no <see cref="E:Microsoft.Playwright.IPage.Dialog"/> or <see cref="E:Microsoft.Playwright.IBrowserContext.Dialog"/> listeners are present, all dialogs are automatically dismissed. </para> </summary> <remarks> <para> When no <see cref="E:Microsoft.Playwright.IPage.Dialog"/> or <see cref="E:Microsoft.Playwright.IBrowserContext.Dialog"/> listeners are present, all dialogs are automatically dismissed. </para> </remarks> </member> <member name="E:Microsoft.Playwright.IPage.DOMContentLoaded"> <summary> <para> Emitted when the JavaScript <a href="https://developer.mozilla.org/en-US/docs/Web/Events/DOMContentLoaded"><c>DOMContentLoaded</c></a> event is dispatched. </para> </summary> </member> <member name="E:Microsoft.Playwright.IPage.Download"> <summary> <para> Emitted when attachment download started. User can access basic file operations on downloaded content via the passed <see cref="T:Microsoft.Playwright.IDownload"/> instance. </para> </summary> </member> <member name="E:Microsoft.Playwright.IPage.FileChooser"> <summary> <para> Emitted when a file chooser is supposed to appear, such as after clicking the <c><input type=file></c>. Playwright can respond to it via setting the input files using <see cref="M:Microsoft.Playwright.IFileChooser.SetFilesAsync(System.String,Microsoft.Playwright.FileChooserSetFilesOptions)"/> that can be uploaded after that. </para> <code> page.FileChooser += (_, fileChooser) =><br/> {<br/> fileChooser.SetFilesAsync(@"C:\temp\myfile.pdf");<br/> }; </code> </summary> </member> <member name="E:Microsoft.Playwright.IPage.FrameAttached"> <summary><para>Emitted when a frame is attached.</para></summary> </member> <member name="E:Microsoft.Playwright.IPage.FrameDetached"> <summary><para>Emitted when a frame is detached.</para></summary> </member> <member name="E:Microsoft.Playwright.IPage.FrameNavigated"> <summary><para>Emitted when a frame is navigated to a new url.</para></summary> </member> <member name="E:Microsoft.Playwright.IPage.Load"> <summary> <para> Emitted when the JavaScript <a href="https://developer.mozilla.org/en-US/docs/Web/Events/load"><c>load</c></a> event is dispatched. </para> </summary> </member> <member name="E:Microsoft.Playwright.IPage.PageError"> <summary> <para>Emitted when an uncaught exception happens within the page.</para> <code> // Log all uncaught errors to the terminal<br/> page.PageError += (_, exception) =><br/> {<br/> Console.WriteLine("Uncaught exception: " + exception);<br/> }; </code> </summary> </member> <member name="E:Microsoft.Playwright.IPage.Popup"> <summary> <para> Emitted when the page opens a new tab or window. This event is emitted in addition to the <see cref="E:Microsoft.Playwright.IBrowserContext.Page"/>, but only for popups relevant to this page. </para> <para> The earliest moment that page is available is when it has navigated to the initial url. For example, when opening a popup with <c>window.open('http://example.com')</c>, this event will fire when the network request to "http://example.com" is done and its response has started loading in the popup. If you would like to route/listen to this network request, use <see cref="M:Microsoft.Playwright.IBrowserContext.RouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.BrowserContextRouteOptions)"/> and <see cref="E:Microsoft.Playwright.IBrowserContext.Request"/> respectively instead of similar methods on the <see cref="T:Microsoft.Playwright.IPage"/>. </para> <code> var popup = await page.RunAndWaitForPopupAsync(async () =><br/> {<br/> await page.GetByText("open the popup").ClickAsync();<br/> });<br/> Console.WriteLine(await popup.EvaluateAsync<string>("location.href")); </code> <para> Use <see cref="M:Microsoft.Playwright.IPage.WaitForLoadStateAsync(System.Nullable{Microsoft.Playwright.LoadState},Microsoft.Playwright.PageWaitForLoadStateOptions)"/> to wait until the page gets to a particular state (you should not need it in most cases). </para> </summary> <remarks> <para> Use <see cref="M:Microsoft.Playwright.IPage.WaitForLoadStateAsync(System.Nullable{Microsoft.Playwright.LoadState},Microsoft.Playwright.PageWaitForLoadStateOptions)"/> to wait until the page gets to a particular state (you should not need it in most cases). </para> </remarks> </member> <member name="E:Microsoft.Playwright.IPage.Request"> <summary> <para> Emitted when a page issues a request. The <see cref="!:request"/> object is read-only. In order to intercept and mutate requests, see <see cref="M:Microsoft.Playwright.IPage.RouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.PageRouteOptions)"/> or <see cref="M:Microsoft.Playwright.IBrowserContext.RouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.BrowserContextRouteOptions)"/>. </para> </summary> </member> <member name="E:Microsoft.Playwright.IPage.RequestFailed"> <summary> <para>Emitted when a request fails, for example by timing out.</para> <para> HTTP Error responses, such as 404 or 503, are still successful responses from HTTP standpoint, so request will complete with <see cref="E:Microsoft.Playwright.IPage.RequestFinished"/> event and not with <see cref="E:Microsoft.Playwright.IPage.RequestFailed"/>. A request will only be considered failed when the client cannot get an HTTP response from the server, e.g. due to network error net::ERR_FAILED. </para> </summary> <remarks> <para> HTTP Error responses, such as 404 or 503, are still successful responses from HTTP standpoint, so request will complete with <see cref="E:Microsoft.Playwright.IPage.RequestFinished"/> event and not with <see cref="E:Microsoft.Playwright.IPage.RequestFailed"/>. A request will only be considered failed when the client cannot get an HTTP response from the server, e.g. due to network error net::ERR_FAILED. </para> </remarks> </member> <member name="E:Microsoft.Playwright.IPage.RequestFinished"> <summary> <para> Emitted when a request finishes successfully after downloading the response body. For a successful response, the sequence of events is <c>request</c>, <c>response</c> and <c>requestfinished</c>. </para> </summary> </member> <member name="E:Microsoft.Playwright.IPage.Response"> <summary> <para> Emitted when <see cref="!:response"/> status and headers are received for a request. For a successful response, the sequence of events is <c>request</c>, <c>response</c> and <c>requestfinished</c>. </para> </summary> </member> <member name="E:Microsoft.Playwright.IPage.WebSocket"> <summary><para>Emitted when <see cref="T:Microsoft.Playwright.IWebSocket"/> request is sent.</para></summary> </member> <member name="E:Microsoft.Playwright.IPage.Worker"> <summary> <para> Emitted when a dedicated <a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API">WebWorker</a> is spawned by the page. </para> </summary> </member> <member name="P:Microsoft.Playwright.IPage.Accessibility"> <summary> <para> **DEPRECATED** This property is discouraged. Please use other libraries such as <a href="https://www.deque.com/axe/">Axe</a> if you need to test page accessibility. See our Node.js <a href="https://playwright.dev/docs/accessibility-testing">guide</a> for integration with Axe. </para> </summary> </member> <member name="M:Microsoft.Playwright.IPage.AddInitScriptAsync(System.String,System.String)"> <summary> <para>Adds a script which would be evaluated in one of the following scenarios:</para> <list type="bullet"> <item><description>Whenever the page is navigated.</description></item> <item><description> Whenever the child frame is attached or navigated. In this case, the script is evaluated in the context of the newly attached frame. </description></item> </list> <para> The script is evaluated after the document was created but before any of its scripts were run. This is useful to amend the JavaScript environment, e.g. to seed <c>Math.random</c>. </para> <para>**Usage**</para> <para>An example of overriding <c>Math.random</c> before the page loads:</para> <code>await Page.AddInitScriptAsync(scriptPath: "./preload.js");</code> <para> The order of evaluation of multiple scripts installed via <see cref="M:Microsoft.Playwright.IBrowserContext.AddInitScriptAsync(System.String,System.String)"/> and <see cref="M:Microsoft.Playwright.IPage.AddInitScriptAsync(System.String,System.String)"/> is not defined. </para> </summary> <remarks> <para> The order of evaluation of multiple scripts installed via <see cref="M:Microsoft.Playwright.IBrowserContext.AddInitScriptAsync(System.String,System.String)"/> and <see cref="M:Microsoft.Playwright.IPage.AddInitScriptAsync(System.String,System.String)"/> is not defined. </para> </remarks> <param name="script">Script to be evaluated in all pages in the browser context.</param> <param name="scriptPath">Instead of specifying <paramref name="script"/>, gives the file name to load from.</param> </member> <member name="M:Microsoft.Playwright.IPage.AddScriptTagAsync(Microsoft.Playwright.PageAddScriptTagOptions)"> <summary> <para> Adds a <c><script></c> tag into the page with the desired url or content. Returns the added tag when the script's onload fires or when the script content was injected into frame. </para> </summary> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.AddStyleTagAsync(Microsoft.Playwright.PageAddStyleTagOptions)"> <summary> <para> Adds a <c><link rel="stylesheet"></c> tag into the page with the desired url or a <c><style type="text/css"></c> tag with the content. Returns the added tag when the stylesheet's onload fires or when the CSS content was injected into frame. </para> </summary> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.BringToFrontAsync"> <summary><para>Brings page to front (activates tab).</para></summary> </member> <member name="M:Microsoft.Playwright.IPage.CheckAsync(System.String,Microsoft.Playwright.PageCheckOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.CheckAsync(Microsoft.Playwright.LocatorCheckOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para> This method checks an element matching <see cref="M:Microsoft.Playwright.IPage.CheckAsync(System.String,Microsoft.Playwright.PageCheckOptions)"/> by performing the following steps: </para> <list type="ordinal"> <item><description> Find an element matching <see cref="M:Microsoft.Playwright.IPage.CheckAsync(System.String,Microsoft.Playwright.PageCheckOptions)"/>. If there is none, wait until a matching element is attached to the DOM. </description></item> <item><description> Ensure that matched element is a checkbox or a radio input. If not, this method throws. If the element is already checked, this method returns immediately. </description></item> <item><description> Wait for <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks on the matched element, unless <see cref="M:Microsoft.Playwright.IPage.CheckAsync(System.String,Microsoft.Playwright.PageCheckOptions)"/> option is set. If the element is detached during the checks, the whole action is retried. </description></item> <item><description>Scroll the element into view if needed.</description></item> <item><description>Use <see cref="P:Microsoft.Playwright.IPage.Mouse"/> to click in the center of the element.</description></item> <item><description>Ensure that the element is now checked. If not, this method throws.</description></item> </list> <para> When all steps combined have not finished during the specified <see cref="M:Microsoft.Playwright.IPage.CheckAsync(System.String,Microsoft.Playwright.PageCheckOptions)"/>, this method throws a <see cref="T:System.TimeoutException"/>. Passing zero timeout disables this. </para> </summary> <param name="selector"> A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.ClickAsync(System.String,Microsoft.Playwright.PageClickOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.ClickAsync(Microsoft.Playwright.LocatorClickOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para> This method clicks an element matching <see cref="M:Microsoft.Playwright.IPage.ClickAsync(System.String,Microsoft.Playwright.PageClickOptions)"/> by performing the following steps: </para> <list type="ordinal"> <item><description> Find an element matching <see cref="M:Microsoft.Playwright.IPage.ClickAsync(System.String,Microsoft.Playwright.PageClickOptions)"/>. If there is none, wait until a matching element is attached to the DOM. </description></item> <item><description> Wait for <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks on the matched element, unless <see cref="M:Microsoft.Playwright.IPage.ClickAsync(System.String,Microsoft.Playwright.PageClickOptions)"/> option is set. If the element is detached during the checks, the whole action is retried. </description></item> <item><description>Scroll the element into view if needed.</description></item> <item><description> Use <see cref="P:Microsoft.Playwright.IPage.Mouse"/> to click in the center of the element, or the specified <see cref="M:Microsoft.Playwright.IPage.ClickAsync(System.String,Microsoft.Playwright.PageClickOptions)"/>. </description></item> <item><description> Wait for initiated navigations to either succeed or fail, unless <see cref="M:Microsoft.Playwright.IPage.ClickAsync(System.String,Microsoft.Playwright.PageClickOptions)"/> option is set. </description></item> </list> <para> When all steps combined have not finished during the specified <see cref="M:Microsoft.Playwright.IPage.ClickAsync(System.String,Microsoft.Playwright.PageClickOptions)"/>, this method throws a <see cref="T:System.TimeoutException"/>. Passing zero timeout disables this. </para> </summary> <param name="selector"> A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.CloseAsync(Microsoft.Playwright.PageCloseOptions)"> <summary> <para> If <see cref="M:Microsoft.Playwright.IPage.CloseAsync(Microsoft.Playwright.PageCloseOptions)"/> is <c>false</c>, does not run any unload handlers and waits for the page to be closed. If <see cref="M:Microsoft.Playwright.IPage.CloseAsync(Microsoft.Playwright.PageCloseOptions)"/> is <c>true</c> the method will run unload handlers, but will **not** wait for the page to close. </para> <para>By default, <c>page.close()</c> **does not** run <c>beforeunload</c> handlers.</para> <para> if <see cref="M:Microsoft.Playwright.IPage.CloseAsync(Microsoft.Playwright.PageCloseOptions)"/> is passed as true, a <c>beforeunload</c> dialog might be summoned and should be handled manually via <see cref="E:Microsoft.Playwright.IPage.Dialog"/> event. </para> </summary> <remarks> <para> if <see cref="M:Microsoft.Playwright.IPage.CloseAsync(Microsoft.Playwright.PageCloseOptions)"/> is passed as true, a <c>beforeunload</c> dialog might be summoned and should be handled manually via <see cref="E:Microsoft.Playwright.IPage.Dialog"/> event. </para> </remarks> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.ContentAsync"> <summary><para>Gets the full HTML contents of the page, including the doctype.</para></summary> </member> <member name="P:Microsoft.Playwright.IPage.Context"> <summary><para>Get the browser context that the page belongs to.</para></summary> </member> <member name="M:Microsoft.Playwright.IPage.DblClickAsync(System.String,Microsoft.Playwright.PageDblClickOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.DblClickAsync(Microsoft.Playwright.LocatorDblClickOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para> This method double clicks an element matching <see cref="M:Microsoft.Playwright.IPage.DblClickAsync(System.String,Microsoft.Playwright.PageDblClickOptions)"/> by performing the following steps: </para> <list type="ordinal"> <item><description> Find an element matching <see cref="M:Microsoft.Playwright.IPage.DblClickAsync(System.String,Microsoft.Playwright.PageDblClickOptions)"/>. If there is none, wait until a matching element is attached to the DOM. </description></item> <item><description> Wait for <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks on the matched element, unless <see cref="M:Microsoft.Playwright.IPage.DblClickAsync(System.String,Microsoft.Playwright.PageDblClickOptions)"/> option is set. If the element is detached during the checks, the whole action is retried. </description></item> <item><description>Scroll the element into view if needed.</description></item> <item><description> Use <see cref="P:Microsoft.Playwright.IPage.Mouse"/> to double click in the center of the element, or the specified <see cref="M:Microsoft.Playwright.IPage.DblClickAsync(System.String,Microsoft.Playwright.PageDblClickOptions)"/>. </description></item> </list> <para> When all steps combined have not finished during the specified <see cref="M:Microsoft.Playwright.IPage.DblClickAsync(System.String,Microsoft.Playwright.PageDblClickOptions)"/>, this method throws a <see cref="T:System.TimeoutException"/>. Passing zero timeout disables this. </para> <para> <c>page.dblclick()</c> dispatches two <c>click</c> events and a single <c>dblclick</c> event. </para> </summary> <remarks> <para> <c>page.dblclick()</c> dispatches two <c>click</c> events and a single <c>dblclick</c> event. </para> </remarks> <param name="selector"> A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.DispatchEventAsync(System.String,System.String,System.Object,Microsoft.Playwright.PageDispatchEventOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.DispatchEventAsync(System.String,System.Object,Microsoft.Playwright.LocatorDispatchEventOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para> The snippet below dispatches the <c>click</c> event on the element. Regardless of the visibility state of the element, <c>click</c> is dispatched. This is equivalent to calling <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/click">element.click()</a>. </para> <para>**Usage**</para> <code>await page.DispatchEventAsync("button#submit", "click");</code> <para> Under the hood, it creates an instance of an event based on the given <see cref="M:Microsoft.Playwright.IPage.DispatchEventAsync(System.String,System.String,System.Object,Microsoft.Playwright.PageDispatchEventOptions)"/>, initializes it with <see cref="M:Microsoft.Playwright.IPage.DispatchEventAsync(System.String,System.String,System.Object,Microsoft.Playwright.PageDispatchEventOptions)"/> properties and dispatches it on the element. Events are <c>composed</c>, <c>cancelable</c> and bubble by default. </para> <para> Since <see cref="M:Microsoft.Playwright.IPage.DispatchEventAsync(System.String,System.String,System.Object,Microsoft.Playwright.PageDispatchEventOptions)"/> is event-specific, please refer to the events documentation for the lists of initial properties: </para> <list type="bullet"> <item><description><a href="https://developer.mozilla.org/en-US/docs/Web/API/DeviceMotionEvent/DeviceMotionEvent">DeviceMotionEvent</a></description></item> <item><description><a href="https://developer.mozilla.org/en-US/docs/Web/API/DeviceOrientationEvent/DeviceOrientationEvent">DeviceOrientationEvent</a></description></item> <item><description><a href="https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/DragEvent">DragEvent</a></description></item> <item><description><a href="https://developer.mozilla.org/en-US/docs/Web/API/Event/Event">Event</a></description></item> <item><description><a href="https://developer.mozilla.org/en-US/docs/Web/API/FocusEvent/FocusEvent">FocusEvent</a></description></item> <item><description><a href="https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/KeyboardEvent">KeyboardEvent</a></description></item> <item><description><a href="https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/MouseEvent">MouseEvent</a></description></item> <item><description><a href="https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/PointerEvent">PointerEvent</a></description></item> <item><description><a href="https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/TouchEvent">TouchEvent</a></description></item> <item><description><a href="https://developer.mozilla.org/en-US/docs/Web/API/WheelEvent/WheelEvent">WheelEvent</a></description></item> </list> <para> You can also specify <c>JSHandle</c> as the property value if you want live objects to be passed into the event: </para> <code> var dataTransfer = await page.EvaluateHandleAsync("() => new DataTransfer()");<br/> await page.DispatchEventAsync("#source", "dragstart", new { dataTransfer }); </code> </summary> <param name="selector"> A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used. </param> <param name="type">DOM event type: <c>"click"</c>, <c>"dragstart"</c>, etc.</param> <param name="eventInit">Optional event-specific initialization properties.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.DragAndDropAsync(System.String,System.String,Microsoft.Playwright.PageDragAndDropOptions)"> <summary> <para> This method drags the source element to the target element. It will first move to the source element, perform a <c>mousedown</c>, then move to the target element and perform a <c>mouseup</c>. </para> <para>**Usage**</para> <code> await Page.DragAndDropAsync("#source", "#target");<br/> // or specify exact positions relative to the top-left corners of the elements:<br/> await Page.DragAndDropAsync("#source", "#target", new()<br/> {<br/> SourcePosition = new() { X = 34, Y = 7 },<br/> TargetPosition = new() { X = 10, Y = 20 },<br/> }); </code> </summary> <param name="source"> A selector to search for an element to drag. If there are multiple elements satisfying the selector, the first will be used. </param> <param name="target"> A selector to search for an element to drop onto. If there are multiple elements satisfying the selector, the first will be used. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.EmulateMediaAsync(Microsoft.Playwright.PageEmulateMediaOptions)"> <summary> <para> This method changes the <c>CSS media type</c> through the <c>media</c> argument, and/or the <c>'prefers-colors-scheme'</c> media feature, using the <c>colorScheme</c> argument. </para> <para>**Usage**</para> <code> await page.EvaluateAsync("() => matchMedia('screen').matches");<br/> // → true<br/> await page.EvaluateAsync("() => matchMedia('print').matches");<br/> // → false<br/> <br/> await page.EmulateMediaAsync(new() { Media = Media.Print });<br/> await page.EvaluateAsync("() => matchMedia('screen').matches");<br/> // → false<br/> await page.EvaluateAsync("() => matchMedia('print').matches");<br/> // → true<br/> <br/> await page.EmulateMediaAsync(new() { Media = Media.Screen });<br/> await page.EvaluateAsync("() => matchMedia('screen').matches");<br/> // → true<br/> await page.EvaluateAsync("() => matchMedia('print').matches");<br/> // → false </code> <code> await page.EmulateMediaAsync(new() { ColorScheme = ColorScheme.Dark });<br/> await page.EvaluateAsync("matchMedia('(prefers-color-scheme: dark)').matches");<br/> // → true<br/> await page.EvaluateAsync("matchMedia('(prefers-color-scheme: light)').matches");<br/> // → false </code> </summary> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.EvalOnSelectorAsync``1(System.String,System.String,System.Object,Microsoft.Playwright.PageEvalOnSelectorOptions)"> <summary> <para> This method does not wait for the element to pass actionability checks and therefore can lead to the flaky tests. Use <see cref="M:Microsoft.Playwright.ILocator.EvaluateAsync(System.String,System.Object,Microsoft.Playwright.LocatorEvaluateOptions)"/>, other <see cref="T:Microsoft.Playwright.ILocator"/> helper methods or web-first assertions instead. </para> <para> The method finds an element matching the specified selector within the page and passes it as a first argument to <see cref="M:Microsoft.Playwright.IPage.EvalOnSelectorAsync(System.String,System.String,System.Object)"/>. If no elements match the selector, the method throws an error. Returns the value of <see cref="M:Microsoft.Playwright.IPage.EvalOnSelectorAsync(System.String,System.String,System.Object)"/>. </para> <para> If <see cref="M:Microsoft.Playwright.IPage.EvalOnSelectorAsync(System.String,System.String,System.Object)"/> returns a <see cref="T:System.Threading.Tasks.Task"/>, then <see cref="M:Microsoft.Playwright.IPage.EvalOnSelectorAsync(System.String,System.String,System.Object)"/> would wait for the promise to resolve and return its value. </para> <para>**Usage**</para> <code> var searchValue = await page.EvalOnSelectorAsync<string>("#search", "el => el.value");<br/> var preloadHref = await page.EvalOnSelectorAsync<string>("link[rel=preload]", "el => el.href");<br/> var html = await page.EvalOnSelectorAsync(".main-container", "(e, suffix) => e.outerHTML + suffix", "hello"); </code> </summary> <param name="selector">A selector to query for.</param> <param name="expression"> JavaScript expression to be evaluated in the browser context. If the expression evaluates to a function, the function is automatically invoked. </param> <param name="arg">Optional argument to pass to <see cref="M:Microsoft.Playwright.IPage.EvalOnSelectorAsync(System.String,System.String,System.Object)"/>.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.EvalOnSelectorAllAsync``1(System.String,System.String,System.Object)"> <summary> <para> In most cases, <see cref="M:Microsoft.Playwright.ILocator.EvaluateAllAsync``1(System.String,System.Object)"/>, other <see cref="T:Microsoft.Playwright.ILocator"/> helper methods and web-first assertions do a better job. </para> <para> The method finds all elements matching the specified selector within the page and passes an array of matched elements as a first argument to <see cref="M:Microsoft.Playwright.IPage.EvalOnSelectorAllAsync(System.String,System.String,System.Object)"/>. Returns the result of <see cref="M:Microsoft.Playwright.IPage.EvalOnSelectorAllAsync(System.String,System.String,System.Object)"/> invocation. </para> <para> If <see cref="M:Microsoft.Playwright.IPage.EvalOnSelectorAllAsync(System.String,System.String,System.Object)"/> returns a <see cref="T:System.Threading.Tasks.Task"/>, then <see cref="M:Microsoft.Playwright.IPage.EvalOnSelectorAllAsync(System.String,System.String,System.Object)"/> would wait for the promise to resolve and return its value. </para> <para>**Usage**</para> <code>var divsCount = await page.EvalOnSelectorAllAsync<bool>("div", "(divs, min) => divs.length >= min", 10);</code> </summary> <param name="selector">A selector to query for.</param> <param name="expression"> JavaScript expression to be evaluated in the browser context. If the expression evaluates to a function, the function is automatically invoked. </param> <param name="arg">Optional argument to pass to <see cref="M:Microsoft.Playwright.IPage.EvalOnSelectorAllAsync(System.String,System.String,System.Object)"/>.</param> </member> <member name="M:Microsoft.Playwright.IPage.EvaluateAsync``1(System.String,System.Object)"> <summary> <para>Returns the value of the <see cref="M:Microsoft.Playwright.IPage.EvaluateAsync(System.String,System.Object)"/> invocation.</para> <para> If the function passed to the <see cref="M:Microsoft.Playwright.IPage.EvaluateAsync(System.String,System.Object)"/> returns a <see cref="T:System.Threading.Tasks.Task"/>, then <see cref="M:Microsoft.Playwright.IPage.EvaluateAsync(System.String,System.Object)"/> would wait for the promise to resolve and return its value. </para> <para> If the function passed to the <see cref="M:Microsoft.Playwright.IPage.EvaluateAsync(System.String,System.Object)"/> returns a non-<see cref="!:Serializable"/> value, then <see cref="M:Microsoft.Playwright.IPage.EvaluateAsync(System.String,System.Object)"/> resolves to <c>undefined</c>. Playwright also supports transferring some additional values that are not serializable by <c>JSON</c>: <c>-0</c>, <c>NaN</c>, <c>Infinity</c>, <c>-Infinity</c>. </para> <para>**Usage**</para> <para>Passing argument to <see cref="M:Microsoft.Playwright.IPage.EvaluateAsync(System.String,System.Object)"/>:</para> <code> var result = await page.EvaluateAsync<int>("([x, y]) => Promise.resolve(x * y)", new[] { 7, 8 });<br/> Console.WriteLine(result); </code> <para>A string can also be passed in instead of a function:</para> <code>Console.WriteLine(await page.EvaluateAsync<int>("1 + 2")); // prints "3"</code> <para> <see cref="T:Microsoft.Playwright.IElementHandle"/> instances can be passed as an argument to the <see cref="M:Microsoft.Playwright.IPage.EvaluateAsync(System.String,System.Object)"/>: </para> <code> var bodyHandle = await page.EvaluateAsync("document.body");<br/> var html = await page.EvaluateAsync<string>("([body, suffix]) => body.innerHTML + suffix", new object [] { bodyHandle, "hello" });<br/> await bodyHandle.DisposeAsync(); </code> </summary> <param name="expression"> JavaScript expression to be evaluated in the browser context. If the expression evaluates to a function, the function is automatically invoked. </param> <param name="arg">Optional argument to pass to <see cref="M:Microsoft.Playwright.IPage.EvaluateAsync(System.String,System.Object)"/>.</param> </member> <member name="M:Microsoft.Playwright.IPage.EvaluateHandleAsync(System.String,System.Object)"> <summary> <para> Returns the value of the <see cref="M:Microsoft.Playwright.IPage.EvaluateHandleAsync(System.String,System.Object)"/> invocation as a <see cref="T:Microsoft.Playwright.IJSHandle"/>. </para> <para> The only difference between <see cref="M:Microsoft.Playwright.IPage.EvaluateAsync(System.String,System.Object)"/> and <see cref="M:Microsoft.Playwright.IPage.EvaluateHandleAsync(System.String,System.Object)"/> is that <see cref="M:Microsoft.Playwright.IPage.EvaluateHandleAsync(System.String,System.Object)"/> returns <see cref="T:Microsoft.Playwright.IJSHandle"/>. </para> <para> If the function passed to the <see cref="M:Microsoft.Playwright.IPage.EvaluateHandleAsync(System.String,System.Object)"/> returns a <see cref="T:System.Threading.Tasks.Task"/>, then <see cref="M:Microsoft.Playwright.IPage.EvaluateHandleAsync(System.String,System.Object)"/> would wait for the promise to resolve and return its value. </para> <para>**Usage**</para> <code> // Handle for the window object.<br/> var aWindowHandle = await page.EvaluateHandleAsync("() => Promise.resolve(window)"); </code> <para>A string can also be passed in instead of a function:</para> <code>var docHandle = await page.EvaluateHandleAsync("document"); // Handle for the `document`</code> <para><see cref="T:Microsoft.Playwright.IJSHandle"/> instances can be passed as an argument to the <see cref="M:Microsoft.Playwright.IPage.EvaluateHandleAsync(System.String,System.Object)"/>:</para> <code> var handle = await page.EvaluateHandleAsync("() => document.body");<br/> var resultHandle = await page.EvaluateHandleAsync("([body, suffix]) => body.innerHTML + suffix", new object[] { handle, "hello" });<br/> Console.WriteLine(await resultHandle.JsonValueAsync<string>());<br/> await resultHandle.DisposeAsync(); </code> </summary> <param name="expression"> JavaScript expression to be evaluated in the browser context. If the expression evaluates to a function, the function is automatically invoked. </param> <param name="arg">Optional argument to pass to <see cref="M:Microsoft.Playwright.IPage.EvaluateHandleAsync(System.String,System.Object)"/>.</param> </member> <member name="M:Microsoft.Playwright.IPage.ExposeBindingAsync(System.String,System.Action,Microsoft.Playwright.PageExposeBindingOptions)"> <summary> <para> The method adds a function called <see cref="M:Microsoft.Playwright.IPage.ExposeBindingAsync(System.String,System.Action,Microsoft.Playwright.PageExposeBindingOptions)"/> on the <c>window</c> object of every frame in this page. When called, the function executes <see cref="M:Microsoft.Playwright.IPage.ExposeBindingAsync(System.String,System.Action,Microsoft.Playwright.PageExposeBindingOptions)"/> and returns a <see cref="T:System.Threading.Tasks.Task"/> which resolves to the return value of <see cref="M:Microsoft.Playwright.IPage.ExposeBindingAsync(System.String,System.Action,Microsoft.Playwright.PageExposeBindingOptions)"/>. If the <see cref="M:Microsoft.Playwright.IPage.ExposeBindingAsync(System.String,System.Action,Microsoft.Playwright.PageExposeBindingOptions)"/> returns a <see cref="!:Promise"/>, it will be awaited. </para> <para> The first argument of the <see cref="M:Microsoft.Playwright.IPage.ExposeBindingAsync(System.String,System.Action,Microsoft.Playwright.PageExposeBindingOptions)"/> function contains information about the caller: <c>{ browserContext: BrowserContext, page: Page, frame: Frame }</c>. </para> <para>See <see cref="M:Microsoft.Playwright.IBrowserContext.ExposeBindingAsync(System.String,System.Action,Microsoft.Playwright.BrowserContextExposeBindingOptions)"/> for the context-wide version.</para> <para>Functions installed via <see cref="M:Microsoft.Playwright.IPage.ExposeBindingAsync(System.String,System.Action,Microsoft.Playwright.PageExposeBindingOptions)"/> survive navigations.</para> <para>**Usage**</para> <para>An example of exposing page URL to all frames in a page:</para> <code> using Microsoft.Playwright;<br/> using System.Threading.Tasks;<br/> <br/> class PageExamples<br/> {<br/> public static async Task Main()<br/> {<br/> using var playwright = await Playwright.CreateAsync();<br/> await using var browser = await playwright.Webkit.LaunchAsync(new()<br/> {<br/> Headless = false,<br/> });<br/> var page = await browser.NewPageAsync();<br/> <br/> await page.ExposeBindingAsync("pageUrl", (source) => source.Page.Url);<br/> await page.SetContentAsync("<script>\n" +<br/> " async function onClick() {\n" +<br/> " document.querySelector('div').textContent = await window.pageURL();\n" +<br/> " }\n" +<br/> "</script>\n" +<br/> "<button onclick=\"onClick()\">Click me</button>\n" +<br/> "<div></div>");<br/> <br/> await page.ClickAsync("button");<br/> }<br/> } </code> </summary> <remarks> <para> Functions installed via <see cref="M:Microsoft.Playwright.IPage.ExposeBindingAsync(System.String,System.Action,Microsoft.Playwright.PageExposeBindingOptions)"/> survive navigations. </para> </remarks> <param name="name">Name of the function on the window object.</param> <param name="callback">Callback function that will be called in the Playwright's context.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.ExposeFunctionAsync(System.String,System.Action)"> <summary> <para> The method adds a function called <see cref="M:Microsoft.Playwright.IPage.ExposeFunctionAsync(System.String,System.Action)"/> on the <c>window</c> object of every frame in the page. When called, the function executes <see cref="M:Microsoft.Playwright.IPage.ExposeFunctionAsync(System.String,System.Action)"/> and returns a <see cref="T:System.Threading.Tasks.Task"/> which resolves to the return value of <see cref="M:Microsoft.Playwright.IPage.ExposeFunctionAsync(System.String,System.Action)"/>. </para> <para> If the <see cref="M:Microsoft.Playwright.IPage.ExposeFunctionAsync(System.String,System.Action)"/> returns a <see cref="T:System.Threading.Tasks.Task"/>, it will be awaited. </para> <para>See <see cref="M:Microsoft.Playwright.IBrowserContext.ExposeFunctionAsync(System.String,System.Action)"/> for context-wide exposed function.</para> <para>Functions installed via <see cref="M:Microsoft.Playwright.IPage.ExposeFunctionAsync(System.String,System.Action)"/> survive navigations.</para> <para>**Usage**</para> <para>An example of adding a <c>sha256</c> function to the page:</para> <code> using Microsoft.Playwright;<br/> using System;<br/> using System.Security.Cryptography;<br/> using System.Threading.Tasks;<br/> <br/> class PageExamples<br/> {<br/> public static async Task Main()<br/> {<br/> using var playwright = await Playwright.CreateAsync();<br/> await using var browser = await playwright.Webkit.LaunchAsync(new()<br/> {<br/> Headless = false<br/> });<br/> var page = await browser.NewPageAsync();<br/> <br/> await page.ExposeFunctionAsync("sha256", (string input) =><br/> {<br/> return Convert.ToBase64String(<br/> SHA256.Create().ComputeHash(System.Text.Encoding.UTF8.GetBytes(input)));<br/> });<br/> <br/> await page.SetContentAsync("<script>\n" +<br/> " async function onClick() {\n" +<br/> " document.querySelector('div').textContent = await window.sha256('PLAYWRIGHT');\n" +<br/> " }\n" +<br/> "</script>\n" +<br/> "<button onclick=\"onClick()\">Click me</button>\n" +<br/> "<div></div>");<br/> <br/> await page.ClickAsync("button");<br/> Console.WriteLine(await page.TextContentAsync("div"));<br/> }<br/> } </code> </summary> <remarks> <para> Functions installed via <see cref="M:Microsoft.Playwright.IPage.ExposeFunctionAsync(System.String,System.Action)"/> survive navigations. </para> </remarks> <param name="name">Name of the function on the window object</param> <param name="callback">Callback function which will be called in Playwright's context.</param> </member> <member name="M:Microsoft.Playwright.IPage.FillAsync(System.String,System.String,Microsoft.Playwright.PageFillOptions)"> <summary> <para>Use locator-based <see cref="M:Microsoft.Playwright.ILocator.FillAsync(System.String,Microsoft.Playwright.LocatorFillOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>.</para> <para> This method waits for an element matching <see cref="M:Microsoft.Playwright.IPage.FillAsync(System.String,System.String,Microsoft.Playwright.PageFillOptions)"/>, waits for <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks, focuses the element, fills it and triggers an <c>input</c> event after filling. Note that you can pass an empty string to clear the input field. </para> <para> If the target element is not an <c><input></c>, <c><textarea></c> or <c>[contenteditable]</c> element, this method throws an error. However, if the element is inside the <c><label></c> element that has an associated <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control">control</a>, the control will be filled instead. </para> <para>To send fine-grained keyboard events, use <see cref="M:Microsoft.Playwright.ILocator.PressSequentiallyAsync(System.String,Microsoft.Playwright.LocatorPressSequentiallyOptions)"/>.</para> </summary> <param name="selector"> A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used. </param> <param name="value"> Value to fill for the <c><input></c>, <c><textarea></c> or <c>[contenteditable]</c> element. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.FocusAsync(System.String,Microsoft.Playwright.PageFocusOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.FocusAsync(Microsoft.Playwright.LocatorFocusOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para> This method fetches an element with <see cref="M:Microsoft.Playwright.IPage.FocusAsync(System.String,Microsoft.Playwright.PageFocusOptions)"/> and focuses it. If there's no element matching <see cref="M:Microsoft.Playwright.IPage.FocusAsync(System.String,Microsoft.Playwright.PageFocusOptions)"/>, the method waits until a matching element appears in the DOM. </para> </summary> <param name="selector"> A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.Frame(System.String)"> <summary> <para> Returns frame matching the specified criteria. Either <c>name</c> or <c>url</c> must be specified. </para> <para>**Usage**</para> <code>var frame = page.Frame("frame-name");</code> <code>var frame = page.FrameByUrl(".*domain.*");</code> </summary> <param name="name">Frame name specified in the <c>iframe</c>'s <c>name</c> attribute.</param> </member> <member name="M:Microsoft.Playwright.IPage.FrameByUrl(System.String)"> <summary><para>Returns frame with matching URL.</para></summary> <param name="url"> A glob pattern, regex pattern or predicate receiving frame's <c>url</c> as a <see cref="!:URL"/> object. </param> </member> <member name="M:Microsoft.Playwright.IPage.FrameByUrl(System.Text.RegularExpressions.Regex)"> <summary><para>Returns frame with matching URL.</para></summary> <param name="url"> A glob pattern, regex pattern or predicate receiving frame's <c>url</c> as a <see cref="!:URL"/> object. </param> </member> <member name="M:Microsoft.Playwright.IPage.FrameByUrl(System.Func{System.String,System.Boolean})"> <summary><para>Returns frame with matching URL.</para></summary> <param name="url"> A glob pattern, regex pattern or predicate receiving frame's <c>url</c> as a <see cref="!:URL"/> object. </param> </member> <member name="M:Microsoft.Playwright.IPage.FrameLocator(System.String)"> <summary> <para> When working with iframes, you can create a frame locator that will enter the iframe and allow selecting elements in that iframe. </para> <para>**Usage**</para> <para> Following snippet locates element with text "Submit" in the iframe with id <c>my-frame</c>, like <c><iframe id="my-frame"></c>: </para> <code> var locator = page.FrameLocator("#my-iframe").GetByText("Submit");<br/> await locator.ClickAsync(); </code> </summary> <param name="selector">A selector to use when resolving DOM element.</param> </member> <member name="P:Microsoft.Playwright.IPage.Frames"> <summary><para>An array of all frames attached to the page.</para></summary> </member> <member name="M:Microsoft.Playwright.IPage.GetAttributeAsync(System.String,System.String,Microsoft.Playwright.PageGetAttributeOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.GetAttributeAsync(System.String,Microsoft.Playwright.LocatorGetAttributeOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para>Returns element attribute value.</para> </summary> <param name="selector"> A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used. </param> <param name="name">Attribute name to get the value for.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.GetByAltText(System.String,Microsoft.Playwright.PageGetByAltTextOptions)"> <summary> <para>Allows locating elements by their alt text.</para> <para>**Usage**</para> <para>For example, this method will find the image by alt text "Playwright logo":</para> <code>await page.GetByAltText("Playwright logo").ClickAsync();</code> </summary> <param name="text">Text to locate the element for.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.GetByAltText(System.Text.RegularExpressions.Regex,Microsoft.Playwright.PageGetByAltTextOptions)"> <summary> <para>Allows locating elements by their alt text.</para> <para>**Usage**</para> <para>For example, this method will find the image by alt text "Playwright logo":</para> <code>await page.GetByAltText("Playwright logo").ClickAsync();</code> </summary> <param name="text">Text to locate the element for.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.GetByLabel(System.String,Microsoft.Playwright.PageGetByLabelOptions)"> <summary> <para> Allows locating input elements by the text of the associated <c><label></c> or <c>aria-labelledby</c> element, or by the <c>aria-label</c> attribute. </para> <para>**Usage**</para> <para> For example, this method will find inputs by label "Username" and "Password" in the following DOM: </para> <code> await page.GetByLabel("Username").FillAsync("john");<br/> await page.GetByLabel("Password").FillAsync("secret"); </code> </summary> <param name="text">Text to locate the element for.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.GetByLabel(System.Text.RegularExpressions.Regex,Microsoft.Playwright.PageGetByLabelOptions)"> <summary> <para> Allows locating input elements by the text of the associated <c><label></c> or <c>aria-labelledby</c> element, or by the <c>aria-label</c> attribute. </para> <para>**Usage**</para> <para> For example, this method will find inputs by label "Username" and "Password" in the following DOM: </para> <code> await page.GetByLabel("Username").FillAsync("john");<br/> await page.GetByLabel("Password").FillAsync("secret"); </code> </summary> <param name="text">Text to locate the element for.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.GetByPlaceholder(System.String,Microsoft.Playwright.PageGetByPlaceholderOptions)"> <summary> <para>Allows locating input elements by the placeholder text.</para> <para>**Usage**</para> <para>For example, consider the following DOM structure.</para> <para>You can fill the input after locating it by the placeholder text:</para> <code> await page<br/> .GetByPlaceholder("name@example.com")<br/> .FillAsync("playwright@microsoft.com"); </code> </summary> <param name="text">Text to locate the element for.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.GetByPlaceholder(System.Text.RegularExpressions.Regex,Microsoft.Playwright.PageGetByPlaceholderOptions)"> <summary> <para>Allows locating input elements by the placeholder text.</para> <para>**Usage**</para> <para>For example, consider the following DOM structure.</para> <para>You can fill the input after locating it by the placeholder text:</para> <code> await page<br/> .GetByPlaceholder("name@example.com")<br/> .FillAsync("playwright@microsoft.com"); </code> </summary> <param name="text">Text to locate the element for.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.GetByRole(Microsoft.Playwright.AriaRole,Microsoft.Playwright.PageGetByRoleOptions)"> <summary> <para> Allows locating elements by their <a href="https://www.w3.org/TR/wai-aria-1.2/#roles">ARIA role</a>, <a href="https://www.w3.org/TR/wai-aria-1.2/#aria-attributes">ARIA attributes</a> and <a href="https://w3c.github.io/accname/#dfn-accessible-name">accessible name</a>. </para> <para>**Usage**</para> <para>Consider the following DOM structure.</para> <para>You can locate each element by it's implicit role:</para> <code> await Expect(Page<br/> .GetByRole(AriaRole.Heading, new() { Name = "Sign up" }))<br/> .ToBeVisibleAsync();<br/> <br/> await page<br/> .GetByRole(AriaRole.Checkbox, new() { Name = "Subscribe" })<br/> .CheckAsync();<br/> <br/> await page<br/> .GetByRole(AriaRole.Button, new() {<br/> NameRegex = new Regex("submit", RegexOptions.IgnoreCase)<br/> })<br/> .ClickAsync(); </code> <para>**Details**</para> <para> Role selector **does not replace** accessibility audits and conformance tests, but rather gives early feedback about the ARIA guidelines. </para> <para> Many html elements have an implicitly <a href="https://w3c.github.io/html-aam/#html-element-role-mappings">defined role</a> that is recognized by the role selector. You can find all the <a href="https://www.w3.org/TR/wai-aria-1.2/#role_definitions">supported roles here</a>. ARIA guidelines **do not recommend** duplicating implicit roles and attributes by setting <c>role</c> and/or <c>aria-*</c> attributes to default values. </para> </summary> <param name="role">Required aria role.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.GetByTestId(System.String)"> <summary> <para>Locate element by the test id.</para> <para>**Usage**</para> <para>Consider the following DOM structure.</para> <para>You can locate the element by it's test id:</para> <code>await page.GetByTestId("directions").ClickAsync();</code> <para>**Details**</para> <para> By default, the <c>data-testid</c> attribute is used as a test id. Use <see cref="M:Microsoft.Playwright.ISelectors.SetTestIdAttribute(System.String)"/> to configure a different test id attribute if necessary. </para> </summary> <param name="testId">Id to locate the element by.</param> </member> <member name="M:Microsoft.Playwright.IPage.GetByTestId(System.Text.RegularExpressions.Regex)"> <summary> <para>Locate element by the test id.</para> <para>**Usage**</para> <para>Consider the following DOM structure.</para> <para>You can locate the element by it's test id:</para> <code>await page.GetByTestId("directions").ClickAsync();</code> <para>**Details**</para> <para> By default, the <c>data-testid</c> attribute is used as a test id. Use <see cref="M:Microsoft.Playwright.ISelectors.SetTestIdAttribute(System.String)"/> to configure a different test id attribute if necessary. </para> </summary> <param name="testId">Id to locate the element by.</param> </member> <member name="M:Microsoft.Playwright.IPage.GetByText(System.String,Microsoft.Playwright.PageGetByTextOptions)"> <summary> <para>Allows locating elements that contain given text.</para> <para> See also <see cref="M:Microsoft.Playwright.ILocator.Filter(Microsoft.Playwright.LocatorFilterOptions)"/> that allows to match by another criteria, like an accessible role, and then filter by the text content. </para> <para>**Usage**</para> <para>Consider the following DOM structure:</para> <para>You can locate by text substring, exact string, or a regular expression:</para> <code> // Matches <span><br/> page.GetByText("world");<br/> <br/> // Matches first <div><br/> page.GetByText("Hello world");<br/> <br/> // Matches second <div><br/> page.GetByText("Hello", new() { Exact = true });<br/> <br/> // Matches both <div>s<br/> page.GetByText(new Regex("Hello"));<br/> <br/> // Matches second <div><br/> page.GetByText(new Regex("^hello$", RegexOptions.IgnoreCase)); </code> <para>**Details**</para> <para> Matching by text always normalizes whitespace, even with exact match. For example, it turns multiple spaces into one, turns line breaks into spaces and ignores leading and trailing whitespace. </para> <para> Input elements of the type <c>button</c> and <c>submit</c> are matched by their <c>value</c> instead of the text content. For example, locating by text <c>"Log in"</c> matches <c><input type=button value="Log in"></c>. </para> </summary> <param name="text">Text to locate the element for.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.GetByText(System.Text.RegularExpressions.Regex,Microsoft.Playwright.PageGetByTextOptions)"> <summary> <para>Allows locating elements that contain given text.</para> <para> See also <see cref="M:Microsoft.Playwright.ILocator.Filter(Microsoft.Playwright.LocatorFilterOptions)"/> that allows to match by another criteria, like an accessible role, and then filter by the text content. </para> <para>**Usage**</para> <para>Consider the following DOM structure:</para> <para>You can locate by text substring, exact string, or a regular expression:</para> <code> // Matches <span><br/> page.GetByText("world");<br/> <br/> // Matches first <div><br/> page.GetByText("Hello world");<br/> <br/> // Matches second <div><br/> page.GetByText("Hello", new() { Exact = true });<br/> <br/> // Matches both <div>s<br/> page.GetByText(new Regex("Hello"));<br/> <br/> // Matches second <div><br/> page.GetByText(new Regex("^hello$", RegexOptions.IgnoreCase)); </code> <para>**Details**</para> <para> Matching by text always normalizes whitespace, even with exact match. For example, it turns multiple spaces into one, turns line breaks into spaces and ignores leading and trailing whitespace. </para> <para> Input elements of the type <c>button</c> and <c>submit</c> are matched by their <c>value</c> instead of the text content. For example, locating by text <c>"Log in"</c> matches <c><input type=button value="Log in"></c>. </para> </summary> <param name="text">Text to locate the element for.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.GetByTitle(System.String,Microsoft.Playwright.PageGetByTitleOptions)"> <summary> <para>Allows locating elements by their title attribute.</para> <para>**Usage**</para> <para>Consider the following DOM structure.</para> <para>You can check the issues count after locating it by the title text:</para> <code>await Expect(Page.GetByTitle("Issues count")).toHaveText("25 issues");</code> </summary> <param name="text">Text to locate the element for.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.GetByTitle(System.Text.RegularExpressions.Regex,Microsoft.Playwright.PageGetByTitleOptions)"> <summary> <para>Allows locating elements by their title attribute.</para> <para>**Usage**</para> <para>Consider the following DOM structure.</para> <para>You can check the issues count after locating it by the title text:</para> <code>await Expect(Page.GetByTitle("Issues count")).toHaveText("25 issues");</code> </summary> <param name="text">Text to locate the element for.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.GoBackAsync(Microsoft.Playwright.PageGoBackOptions)"> <summary> <para> Returns the main resource response. In case of multiple redirects, the navigation will resolve with the response of the last redirect. If cannot go back, returns <c>null</c>. </para> <para>Navigate to the previous page in history.</para> </summary> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.GoForwardAsync(Microsoft.Playwright.PageGoForwardOptions)"> <summary> <para> Returns the main resource response. In case of multiple redirects, the navigation will resolve with the response of the last redirect. If cannot go forward, returns <c>null</c>. </para> <para>Navigate to the next page in history.</para> </summary> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.RequestGCAsync"> <summary> <para> Request the page to perform garbage collection. Note that there is no guarantee that all unreachable objects will be collected. </para> <para> This is useful to help detect memory leaks. For example, if your page has a large object <c>'suspect'</c> that might be leaked, you can check that it does not leak by using a <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakRef"><c>WeakRef</c></a>. </para> <code> // 1. In your page, save a WeakRef for the "suspect".<br/> await Page.EvaluateAsync("globalThis.suspectWeakRef = new WeakRef(suspect)");<br/> // 2. Request garbage collection.<br/> await Page.RequestGCAsync();<br/> // 3. Check that weak ref does not deref to the original object.<br/> Assert.True(await Page.EvaluateAsync("!globalThis.suspectWeakRef.deref()")); </code> </summary> </member> <member name="M:Microsoft.Playwright.IPage.GotoAsync(System.String,Microsoft.Playwright.PageGotoOptions)"> <summary> <para> Returns the main resource response. In case of multiple redirects, the navigation will resolve with the first non-redirect response. </para> <para>The method will throw an error if:</para> <list type="bullet"> <item><description>there's an SSL error (e.g. in case of self-signed certificates).</description></item> <item><description>target URL is invalid.</description></item> <item><description>the <see cref="M:Microsoft.Playwright.IPage.GotoAsync(System.String,Microsoft.Playwright.PageGotoOptions)"/> is exceeded during navigation.</description></item> <item><description>the remote server does not respond or is unreachable.</description></item> <item><description>the main resource failed to load.</description></item> </list> <para> The method will not throw an error when any valid HTTP status code is returned by the remote server, including 404 "Not Found" and 500 "Internal Server Error". The status code for such responses can be retrieved by calling <see cref="P:Microsoft.Playwright.IResponse.Status"/>. </para> <para> The method either throws an error or returns a main resource response. The only exceptions are navigation to <c>about:blank</c> or navigation to the same URL with a different hash, which would succeed and return <c>null</c>. </para> <para> Headless mode doesn't support navigation to a PDF document. See the <a href="https://bugs.chromium.org/p/chromium/issues/detail?id=761295">upstream issue</a>. </para> </summary> <remarks> <para> The method either throws an error or returns a main resource response. The only exceptions are navigation to <c>about:blank</c> or navigation to the same URL with a different hash, which would succeed and return <c>null</c>. </para> <para> Headless mode doesn't support navigation to a PDF document. See the <a href="https://bugs.chromium.org/p/chromium/issues/detail?id=761295">upstream issue</a>. </para> </remarks> <param name="url"> URL to navigate page to. The url should include scheme, e.g. <c>https://</c>. When a <see cref="M:Microsoft.Playwright.IBrowser.NewContextAsync(Microsoft.Playwright.BrowserNewContextOptions)"/> via the context options was provided and the passed URL is a path, it gets merged via the <a href="https://developer.mozilla.org/en-US/docs/Web/API/URL/URL"><c>new URL()</c></a> constructor. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.HoverAsync(System.String,Microsoft.Playwright.PageHoverOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.HoverAsync(Microsoft.Playwright.LocatorHoverOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para> This method hovers over an element matching <see cref="M:Microsoft.Playwright.IPage.HoverAsync(System.String,Microsoft.Playwright.PageHoverOptions)"/> by performing the following steps: </para> <list type="ordinal"> <item><description> Find an element matching <see cref="M:Microsoft.Playwright.IPage.HoverAsync(System.String,Microsoft.Playwright.PageHoverOptions)"/>. If there is none, wait until a matching element is attached to the DOM. </description></item> <item><description> Wait for <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks on the matched element, unless <see cref="M:Microsoft.Playwright.IPage.HoverAsync(System.String,Microsoft.Playwright.PageHoverOptions)"/> option is set. If the element is detached during the checks, the whole action is retried. </description></item> <item><description>Scroll the element into view if needed.</description></item> <item><description> Use <see cref="P:Microsoft.Playwright.IPage.Mouse"/> to hover over the center of the element, or the specified <see cref="M:Microsoft.Playwright.IPage.HoverAsync(System.String,Microsoft.Playwright.PageHoverOptions)"/>. </description></item> </list> <para> When all steps combined have not finished during the specified <see cref="M:Microsoft.Playwright.IPage.HoverAsync(System.String,Microsoft.Playwright.PageHoverOptions)"/>, this method throws a <see cref="T:System.TimeoutException"/>. Passing zero timeout disables this. </para> </summary> <param name="selector"> A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.InnerHTMLAsync(System.String,Microsoft.Playwright.PageInnerHTMLOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.InnerHTMLAsync(Microsoft.Playwright.LocatorInnerHTMLOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para>Returns <c>element.innerHTML</c>.</para> </summary> <param name="selector"> A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.InnerTextAsync(System.String,Microsoft.Playwright.PageInnerTextOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.InnerTextAsync(Microsoft.Playwright.LocatorInnerTextOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para>Returns <c>element.innerText</c>.</para> </summary> <param name="selector"> A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.InputValueAsync(System.String,Microsoft.Playwright.PageInputValueOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.InputValueAsync(Microsoft.Playwright.LocatorInputValueOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para> Returns <c>input.value</c> for the selected <c><input></c> or <c><textarea></c> or <c><select></c> element. </para> <para> Throws for non-input elements. However, if the element is inside the <c><label></c> element that has an associated <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control">control</a>, returns the value of the control. </para> </summary> <param name="selector"> A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.IsCheckedAsync(System.String,Microsoft.Playwright.PageIsCheckedOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.IsCheckedAsync(Microsoft.Playwright.LocatorIsCheckedOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para> Returns whether the element is checked. Throws if the element is not a checkbox or radio input. </para> </summary> <param name="selector"> A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used. </param> <param name="options">Call options</param> </member> <member name="P:Microsoft.Playwright.IPage.IsClosed"> <summary><para>Indicates that the page has been closed.</para></summary> </member> <member name="M:Microsoft.Playwright.IPage.IsDisabledAsync(System.String,Microsoft.Playwright.PageIsDisabledOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.IsDisabledAsync(Microsoft.Playwright.LocatorIsDisabledOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para>Returns whether the element is disabled, the opposite of <a href="https://playwright.dev/dotnet/docs/actionability#enabled">enabled</a>.</para> </summary> <param name="selector"> A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.IsEditableAsync(System.String,Microsoft.Playwright.PageIsEditableOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.IsEditableAsync(Microsoft.Playwright.LocatorIsEditableOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para>Returns whether the element is <a href="https://playwright.dev/dotnet/docs/actionability#editable">editable</a>.</para> </summary> <param name="selector"> A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.IsEnabledAsync(System.String,Microsoft.Playwright.PageIsEnabledOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.IsEnabledAsync(Microsoft.Playwright.LocatorIsEnabledOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para>Returns whether the element is <a href="https://playwright.dev/dotnet/docs/actionability#enabled">enabled</a>.</para> </summary> <param name="selector"> A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.IsHiddenAsync(System.String,Microsoft.Playwright.PageIsHiddenOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.IsHiddenAsync(Microsoft.Playwright.LocatorIsHiddenOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para> Returns whether the element is hidden, the opposite of <a href="https://playwright.dev/dotnet/docs/actionability#visible">visible</a>. <see cref="M:Microsoft.Playwright.IPage.IsHiddenAsync(System.String,Microsoft.Playwright.PageIsHiddenOptions)"/> that does not match any elements is considered hidden. </para> </summary> <param name="selector"> A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.IsVisibleAsync(System.String,Microsoft.Playwright.PageIsVisibleOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.IsVisibleAsync(Microsoft.Playwright.LocatorIsVisibleOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para> Returns whether the element is <a href="https://playwright.dev/dotnet/docs/actionability#visible">visible</a>. <see cref="M:Microsoft.Playwright.IPage.IsVisibleAsync(System.String,Microsoft.Playwright.PageIsVisibleOptions)"/> that does not match any elements is considered not visible. </para> </summary> <param name="selector"> A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.Locator(System.String,Microsoft.Playwright.PageLocatorOptions)"> <summary> <para> The method returns an element locator that can be used to perform actions on this page / frame. Locator is resolved to the element immediately before performing an action, so a series of actions on the same locator can in fact be performed on different DOM elements. That would happen if the DOM structure between those actions has changed. </para> <para><a href="https://playwright.dev/dotnet/docs/locators">Learn more about locators</a>.</para> </summary> <param name="selector">A selector to use when resolving DOM element.</param> <param name="options">Call options</param> </member> <member name="P:Microsoft.Playwright.IPage.MainFrame"> <summary> <para> The page's main frame. Page is guaranteed to have a main frame which persists during navigations. </para> </summary> </member> <member name="M:Microsoft.Playwright.IPage.OpenerAsync"> <summary> <para> Returns the opener for popup pages and <c>null</c> for others. If the opener has been closed already the returns <c>null</c>. </para> </summary> </member> <member name="M:Microsoft.Playwright.IPage.PauseAsync"> <summary> <para> Pauses script execution. Playwright will stop executing the script and wait for the user to either press 'Resume' button in the page overlay or to call <c>playwright.resume()</c> in the DevTools console. </para> <para> User can inspect selectors or perform manual steps while paused. Resume will continue running the original script from the place it was paused. </para> <para> This method requires Playwright to be started in a headed mode, with a falsy <see cref="M:Microsoft.Playwright.IBrowserType.LaunchAsync(Microsoft.Playwright.BrowserTypeLaunchOptions)"/> option. </para> </summary> <remarks> <para> This method requires Playwright to be started in a headed mode, with a falsy <see cref="M:Microsoft.Playwright.IBrowserType.LaunchAsync(Microsoft.Playwright.BrowserTypeLaunchOptions)"/> option. </para> </remarks> </member> <member name="M:Microsoft.Playwright.IPage.PdfAsync(Microsoft.Playwright.PagePdfOptions)"> <summary> <para>Returns the PDF buffer.</para> <para> <c>page.pdf()</c> generates a pdf of the page with <c>print</c> css media. To generate a pdf with <c>screen</c> media, call <see cref="M:Microsoft.Playwright.IPage.EmulateMediaAsync(Microsoft.Playwright.PageEmulateMediaOptions)"/> before calling <c>page.pdf()</c>: </para> <para> By default, <c>page.pdf()</c> generates a pdf with modified colors for printing. Use the <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-print-color-adjust"><c>-webkit-print-color-adjust</c></a> property to force rendering of exact colors. </para> <para>**Usage**</para> <code> // Generates a PDF with 'screen' media type<br/> await page.EmulateMediaAsync(new() { Media = Media.Screen });<br/> await page.PdfAsync(new() { Path = "page.pdf" }); </code> <para> The <see cref="M:Microsoft.Playwright.IPage.PdfAsync(Microsoft.Playwright.PagePdfOptions)"/>, <see cref="M:Microsoft.Playwright.IPage.PdfAsync(Microsoft.Playwright.PagePdfOptions)"/>, and <see cref="M:Microsoft.Playwright.IPage.PdfAsync(Microsoft.Playwright.PagePdfOptions)"/> options accept values labeled with units. Unlabeled values are treated as pixels. </para> <para>A few examples:</para> <list type="bullet"> <item><description><c>page.pdf({width: 100})</c> - prints with width set to 100 pixels</description></item> <item><description><c>page.pdf({width: '100px'})</c> - prints with width set to 100 pixels</description></item> <item><description><c>page.pdf({width: '10cm'})</c> - prints with width set to 10 centimeters.</description></item> </list> <para>All possible units are:</para> <list type="bullet"> <item><description><c>px</c> - pixel</description></item> <item><description><c>in</c> - inch</description></item> <item><description><c>cm</c> - centimeter</description></item> <item><description><c>mm</c> - millimeter</description></item> </list> <para>The <see cref="M:Microsoft.Playwright.IPage.PdfAsync(Microsoft.Playwright.PagePdfOptions)"/> options are:</para> <list type="bullet"> <item><description><c>Letter</c>: 8.5in x 11in</description></item> <item><description><c>Legal</c>: 8.5in x 14in</description></item> <item><description><c>Tabloid</c>: 11in x 17in</description></item> <item><description><c>Ledger</c>: 17in x 11in</description></item> <item><description><c>A0</c>: 33.1in x 46.8in</description></item> <item><description><c>A1</c>: 23.4in x 33.1in</description></item> <item><description><c>A2</c>: 16.54in x 23.4in</description></item> <item><description><c>A3</c>: 11.7in x 16.54in</description></item> <item><description><c>A4</c>: 8.27in x 11.7in</description></item> <item><description><c>A5</c>: 5.83in x 8.27in</description></item> <item><description><c>A6</c>: 4.13in x 5.83in</description></item> </list> <para> <see cref="M:Microsoft.Playwright.IPage.PdfAsync(Microsoft.Playwright.PagePdfOptions)"/> and <see cref="M:Microsoft.Playwright.IPage.PdfAsync(Microsoft.Playwright.PagePdfOptions)"/> markup have the following limitations: > 1. Script tags inside templates are not evaluated. > 2. Page styles are not visible inside templates. </para> </summary> <remarks> <para> By default, <c>page.pdf()</c> generates a pdf with modified colors for printing. Use the <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-print-color-adjust"><c>-webkit-print-color-adjust</c></a> property to force rendering of exact colors. </para> <para> <see cref="M:Microsoft.Playwright.IPage.PdfAsync(Microsoft.Playwright.PagePdfOptions)"/> and <see cref="M:Microsoft.Playwright.IPage.PdfAsync(Microsoft.Playwright.PagePdfOptions)"/> markup have the following limitations: > 1. Script tags inside templates are not evaluated. > 2. Page styles are not visible inside templates. </para> </remarks> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.PressAsync(System.String,System.String,Microsoft.Playwright.PagePressOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.PressAsync(System.String,Microsoft.Playwright.LocatorPressOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para>Focuses the element, and then uses <see cref="M:Microsoft.Playwright.IKeyboard.DownAsync(System.String)"/> and <see cref="M:Microsoft.Playwright.IKeyboard.UpAsync(System.String)"/>.</para> <para> <see cref="M:Microsoft.Playwright.IPage.PressAsync(System.String,System.String,Microsoft.Playwright.PagePressOptions)"/> can specify the intended <a href="https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key">keyboardEvent.key</a> value or a single character to generate the text for. A superset of the <see cref="M:Microsoft.Playwright.IPage.PressAsync(System.String,System.String,Microsoft.Playwright.PagePressOptions)"/> values can be found <a href="https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values">here</a>. Examples of the keys are: </para> <para> <c>F1</c> - <c>F12</c>, <c>Digit0</c>- <c>Digit9</c>, <c>KeyA</c>- <c>KeyZ</c>, <c>Backquote</c>, <c>Minus</c>, <c>Equal</c>, <c>Backslash</c>, <c>Backspace</c>, <c>Tab</c>, <c>Delete</c>, <c>Escape</c>, <c>ArrowDown</c>, <c>End</c>, <c>Enter</c>, <c>Home</c>, <c>Insert</c>, <c>PageDown</c>, <c>PageUp</c>, <c>ArrowRight</c>, <c>ArrowUp</c>, etc. </para> <para> Following modification shortcuts are also supported: <c>Shift</c>, <c>Control</c>, <c>Alt</c>, <c>Meta</c>, <c>ShiftLeft</c>, <c>ControlOrMeta</c>. <c>ControlOrMeta</c> resolves to <c>Control</c> on Windows and Linux and to <c>Meta</c> on macOS. </para> <para> Holding down <c>Shift</c> will type the text that corresponds to the <see cref="M:Microsoft.Playwright.IPage.PressAsync(System.String,System.String,Microsoft.Playwright.PagePressOptions)"/> in the upper case. </para> <para> If <see cref="M:Microsoft.Playwright.IPage.PressAsync(System.String,System.String,Microsoft.Playwright.PagePressOptions)"/> is a single character, it is case-sensitive, so the values <c>a</c> and <c>A</c> will generate different respective texts. </para> <para> Shortcuts such as <c>key: "Control+o"</c>, <c>key: "Control++</c> or <c>key: "Control+Shift+T"</c> are supported as well. When specified with the modifier, modifier is pressed and being held while the subsequent key is being pressed. </para> <para>**Usage**</para> <code> var page = await browser.NewPageAsync();<br/> await page.GotoAsync("https://keycode.info");<br/> await page.PressAsync("body", "A");<br/> await page.ScreenshotAsync(new() { Path = "A.png" });<br/> await page.PressAsync("body", "ArrowLeft");<br/> await page.ScreenshotAsync(new() { Path = "ArrowLeft.png" });<br/> await page.PressAsync("body", "Shift+O");<br/> await page.ScreenshotAsync(new() { Path = "O.png" }); </code> </summary> <param name="selector"> A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used. </param> <param name="key"> Name of the key to press or a character to generate, such as <c>ArrowLeft</c> or <c>a</c>. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.QuerySelectorAsync(System.String,Microsoft.Playwright.PageQuerySelectorOptions)"> <summary> <para>Use locator-based <see cref="M:Microsoft.Playwright.IPage.Locator(System.String,Microsoft.Playwright.PageLocatorOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>.</para> <para> The method finds an element matching the specified selector within the page. If no elements match the selector, the return value resolves to <c>null</c>. To wait for an element on the page, use <see cref="M:Microsoft.Playwright.ILocator.WaitForAsync(Microsoft.Playwright.LocatorWaitForOptions)"/>. </para> </summary> <param name="selector">A selector to query for.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.QuerySelectorAllAsync(System.String)"> <summary> <para>Use locator-based <see cref="M:Microsoft.Playwright.IPage.Locator(System.String,Microsoft.Playwright.PageLocatorOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>.</para> <para> The method finds all elements matching the specified selector within the page. If no elements match the selector, the return value resolves to <c>[]</c>. </para> </summary> <param name="selector">A selector to query for.</param> </member> <member name="M:Microsoft.Playwright.IPage.AddLocatorHandlerAsync(Microsoft.Playwright.ILocator,System.Func{Microsoft.Playwright.ILocator,System.Threading.Tasks.Task},Microsoft.Playwright.PageAddLocatorHandlerOptions)"> <summary> <para> When testing a web page, sometimes unexpected overlays like a "Sign up" dialog appear and block actions you want to automate, e.g. clicking a button. These overlays don't always show up in the same way or at the same time, making them tricky to handle in automated tests. </para> <para> This method lets you set up a special function, called a handler, that activates when it detects that overlay is visible. The handler's job is to remove the overlay, allowing your test to continue as if the overlay wasn't there. </para> <para>Things to keep in mind:</para> <list type="bullet"> <item><description> When an overlay is shown predictably, we recommend explicitly waiting for it in your test and dismissing it as a part of your normal test flow, instead of using <see cref="M:Microsoft.Playwright.IPage.AddLocatorHandlerAsync(Microsoft.Playwright.ILocator,System.Func{Microsoft.Playwright.ILocator,System.Threading.Tasks.Task},Microsoft.Playwright.PageAddLocatorHandlerOptions)"/>. </description></item> <item><description> Playwright checks for the overlay every time before executing or retrying an action that requires an <a href="https://playwright.dev/dotnet/docs/actionability">actionability check</a>, or before performing an auto-waiting assertion check. When overlay is visible, Playwright calls the handler first, and then proceeds with the action/assertion. Note that the handler is only called when you perform an action/assertion - if the overlay becomes visible but you don't perform any actions, the handler will not be triggered. </description></item> <item><description> After executing the handler, Playwright will ensure that overlay that triggered the handler is not visible anymore. You can opt-out of this behavior with <see cref="M:Microsoft.Playwright.IPage.AddLocatorHandlerAsync(Microsoft.Playwright.ILocator,System.Func{Microsoft.Playwright.ILocator,System.Threading.Tasks.Task},Microsoft.Playwright.PageAddLocatorHandlerOptions)"/>. </description></item> <item><description> The execution time of the handler counts towards the timeout of the action/assertion that executed the handler. If your handler takes too long, it might cause timeouts. </description></item> <item><description> You can register multiple handlers. However, only a single handler will be running at a time. Make sure the actions within a handler don't depend on another handler. </description></item> </list> <para> Running the handler will alter your page state mid-test. For example it will change the currently focused element and move the mouse. Make sure that actions that run after the handler are self-contained and do not rely on the focus and mouse state being unchanged. </para> <para> For example, consider a test that calls <see cref="M:Microsoft.Playwright.ILocator.FocusAsync(Microsoft.Playwright.LocatorFocusOptions)"/> followed by <see cref="M:Microsoft.Playwright.IKeyboard.PressAsync(System.String,Microsoft.Playwright.KeyboardPressOptions)"/>. If your handler clicks a button between these two actions, the focused element most likely will be wrong, and key press will happen on the unexpected element. Use <see cref="M:Microsoft.Playwright.ILocator.PressAsync(System.String,Microsoft.Playwright.LocatorPressOptions)"/> instead to avoid this problem. </para> <para> Another example is a series of mouse actions, where <see cref="M:Microsoft.Playwright.IMouse.MoveAsync(System.Single,System.Single,Microsoft.Playwright.MouseMoveOptions)"/> is followed by <see cref="M:Microsoft.Playwright.IMouse.DownAsync(Microsoft.Playwright.MouseDownOptions)"/>. Again, when the handler runs between these two actions, the mouse position will be wrong during the mouse down. Prefer self-contained actions like <see cref="M:Microsoft.Playwright.ILocator.ClickAsync(Microsoft.Playwright.LocatorClickOptions)"/> that do not rely on the state being unchanged by a handler. </para> <para>**Usage**</para> <para>An example that closes a "Sign up to the newsletter" dialog when it appears:</para> <code> // Setup the handler.<br/> await page.AddLocatorHandlerAsync(page.GetByText("Sign up to the newsletter"), async () => {<br/> await page.GetByRole(AriaRole.Button, new() { Name = "No thanks" }).ClickAsync();<br/> });<br/> <br/> // Write the test as usual.<br/> await page.GotoAsync("https://example.com");<br/> await page.GetByRole("button", new() { Name = "Start here" }).ClickAsync(); </code> <para>An example that skips the "Confirm your security details" page when it is shown:</para> <code> // Setup the handler.<br/> await page.AddLocatorHandlerAsync(page.GetByText("Confirm your security details"), async () => {<br/> await page.GetByRole(AriaRole.Button, new() { Name = "Remind me later" }).ClickAsync();<br/> });<br/> <br/> // Write the test as usual.<br/> await page.GotoAsync("https://example.com");<br/> await page.GetByRole("button", new() { Name = "Start here" }).ClickAsync(); </code> <para> An example with a custom callback on every actionability check. It uses a <c><body></c> locator that is always visible, so the handler is called before every actionability check. It is important to specify <see cref="M:Microsoft.Playwright.IPage.AddLocatorHandlerAsync(Microsoft.Playwright.ILocator,System.Func{Microsoft.Playwright.ILocator,System.Threading.Tasks.Task},Microsoft.Playwright.PageAddLocatorHandlerOptions)"/>, because the handler does not hide the <c><body></c> element. </para> <code> // Setup the handler.<br/> await page.AddLocatorHandlerAsync(page.Locator("body"), async () => {<br/> await page.EvaluateAsync("window.removeObstructionsForTestIfNeeded()");<br/> }, new() { NoWaitAfter = true });<br/> <br/> // Write the test as usual.<br/> await page.GotoAsync("https://example.com");<br/> await page.GetByRole("button", new() { Name = "Start here" }).ClickAsync(); </code> <para> Handler takes the original locator as an argument. You can also automatically remove the handler after a number of invocations by setting <see cref="M:Microsoft.Playwright.IPage.AddLocatorHandlerAsync(Microsoft.Playwright.ILocator,System.Func{Microsoft.Playwright.ILocator,System.Threading.Tasks.Task},Microsoft.Playwright.PageAddLocatorHandlerOptions)"/>: </para> <code> await page.AddLocatorHandlerAsync(page.GetByText("Sign up to the newsletter"), async locator => {<br/> await locator.ClickAsync();<br/> }, new() { Times = 1 }); </code> </summary> <remarks> <para> Running the handler will alter your page state mid-test. For example it will change the currently focused element and move the mouse. Make sure that actions that run after the handler are self-contained and do not rely on the focus and mouse state being unchanged. For example, consider a test that calls <see cref="M:Microsoft.Playwright.ILocator.FocusAsync(Microsoft.Playwright.LocatorFocusOptions)"/> followed by <see cref="M:Microsoft.Playwright.IKeyboard.PressAsync(System.String,Microsoft.Playwright.KeyboardPressOptions)"/>. If your handler clicks a button between these two actions, the focused element most likely will be wrong, and key press will happen on the unexpected element. Use <see cref="M:Microsoft.Playwright.ILocator.PressAsync(System.String,Microsoft.Playwright.LocatorPressOptions)"/> instead to avoid this problem. Another example is a series of mouse actions, where <see cref="M:Microsoft.Playwright.IMouse.MoveAsync(System.Single,System.Single,Microsoft.Playwright.MouseMoveOptions)"/> is followed by <see cref="M:Microsoft.Playwright.IMouse.DownAsync(Microsoft.Playwright.MouseDownOptions)"/>. Again, when the handler runs between these two actions, the mouse position will be wrong during the mouse down. Prefer self-contained actions like <see cref="M:Microsoft.Playwright.ILocator.ClickAsync(Microsoft.Playwright.LocatorClickOptions)"/> that do not rely on the state being unchanged by a handler. </para> </remarks> <param name="locator">Locator that triggers the handler.</param> <param name="handler"> Function that should be run once <see cref="M:Microsoft.Playwright.IPage.AddLocatorHandlerAsync(Microsoft.Playwright.ILocator,System.Func{Microsoft.Playwright.ILocator,System.Threading.Tasks.Task},Microsoft.Playwright.PageAddLocatorHandlerOptions)"/> appears. This function should get rid of the element that blocks actions like click. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.RemoveLocatorHandlerAsync(Microsoft.Playwright.ILocator)"> <summary> <para> Removes all locator handlers added by <see cref="M:Microsoft.Playwright.IPage.AddLocatorHandlerAsync(Microsoft.Playwright.ILocator,System.Func{Microsoft.Playwright.ILocator,System.Threading.Tasks.Task},Microsoft.Playwright.PageAddLocatorHandlerOptions)"/> for a specific locator. </para> </summary> <param name="locator">Locator passed to <see cref="M:Microsoft.Playwright.IPage.AddLocatorHandlerAsync(Microsoft.Playwright.ILocator,System.Func{Microsoft.Playwright.ILocator,System.Threading.Tasks.Task},Microsoft.Playwright.PageAddLocatorHandlerOptions)"/>.</param> </member> <member name="M:Microsoft.Playwright.IPage.ReloadAsync(Microsoft.Playwright.PageReloadOptions)"> <summary> <para> This method reloads the current page, in the same way as if the user had triggered a browser refresh. Returns the main resource response. In case of multiple redirects, the navigation will resolve with the response of the last redirect. </para> </summary> <param name="options">Call options</param> </member> <member name="P:Microsoft.Playwright.IPage.APIRequest"> <summary> <para> API testing helper associated with this page. This method returns the same instance as <see cref="P:Microsoft.Playwright.IBrowserContext.APIRequest"/> on the page's context. See <see cref="P:Microsoft.Playwright.IBrowserContext.APIRequest"/> for more details. </para> </summary> </member> <member name="M:Microsoft.Playwright.IPage.RouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.PageRouteOptions)"> <summary> <para>Routing provides the capability to modify network requests that are made by a page.</para> <para> Once routing is enabled, every request matching the url pattern will stall unless it's continued, fulfilled or aborted. </para> <para>The handler will only be called for the first url if the response is a redirect.</para> <para> <see cref="M:Microsoft.Playwright.IPage.RouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.PageRouteOptions)"/> will not intercept requests intercepted by Service Worker. See <a href="https://github.com/microsoft/playwright/issues/1090">this</a> issue. We recommend disabling Service Workers when using request interception by setting <see cref="M:Microsoft.Playwright.IBrowser.NewContextAsync(Microsoft.Playwright.BrowserNewContextOptions)"/> to <c>'block'</c>. </para> <para> <see cref="M:Microsoft.Playwright.IPage.RouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.PageRouteOptions)"/> will not intercept the first request of a popup page. Use <see cref="M:Microsoft.Playwright.IBrowserContext.RouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.BrowserContextRouteOptions)"/> instead. </para> <para>**Usage**</para> <para>An example of a naive handler that aborts all image requests:</para> <code> var page = await browser.NewPageAsync();<br/> await page.RouteAsync("**/*.{png,jpg,jpeg}", async r => await r.AbortAsync());<br/> await page.GotoAsync("https://www.microsoft.com"); </code> <para>or the same snippet using a regex pattern instead:</para> <code> var page = await browser.NewPageAsync();<br/> await page.RouteAsync(new Regex("(\\.png$)|(\\.jpg$)"), async r => await r.AbortAsync());<br/> await page.GotoAsync("https://www.microsoft.com"); </code> <para> It is possible to examine the request to decide the route action. For example, mocking all requests that contain some post data, and leaving all other requests as is: </para> <code> await page.RouteAsync("/api/**", async r =><br/> {<br/> if (r.Request.PostData.Contains("my-string"))<br/> await r.FulfillAsync(new() { Body = "mocked-data" });<br/> else<br/> await r.ContinueAsync();<br/> }); </code> <para> Page routes take precedence over browser context routes (set up with <see cref="M:Microsoft.Playwright.IBrowserContext.RouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.BrowserContextRouteOptions)"/>) when request matches both handlers. </para> <para>To remove a route with its handler you can use <see cref="M:Microsoft.Playwright.IPage.UnrouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute})"/>.</para> <para>Enabling routing disables http cache.</para> </summary> <remarks> <para> The handler will only be called for the first url if the response is a redirect. </para> <para> <see cref="M:Microsoft.Playwright.IPage.RouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.PageRouteOptions)"/> will not intercept requests intercepted by Service Worker. See <a href="https://github.com/microsoft/playwright/issues/1090">this</a> issue. We recommend disabling Service Workers when using request interception by setting <see cref="M:Microsoft.Playwright.IBrowser.NewContextAsync(Microsoft.Playwright.BrowserNewContextOptions)"/> to <c>'block'</c>. </para> <para> <see cref="M:Microsoft.Playwright.IPage.RouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.PageRouteOptions)"/> will not intercept the first request of a popup page. Use <see cref="M:Microsoft.Playwright.IBrowserContext.RouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.BrowserContextRouteOptions)"/> instead. </para> <para>Enabling routing disables http cache.</para> </remarks> <param name="url"> A glob pattern, regex pattern, or predicate that receives a <see cref="!:URL"/> to match during routing. If <see cref="M:Microsoft.Playwright.IBrowser.NewContextAsync(Microsoft.Playwright.BrowserNewContextOptions)"/> is set in the context options and the provided URL is a string that does not start with <c>*</c>, it is resolved using the <a href="https://developer.mozilla.org/en-US/docs/Web/API/URL/URL"><c>new URL()</c></a> constructor. </param> <param name="handler">handler function to route the request.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.RouteAsync(System.Text.RegularExpressions.Regex,System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.PageRouteOptions)"> <summary> <para>Routing provides the capability to modify network requests that are made by a page.</para> <para> Once routing is enabled, every request matching the url pattern will stall unless it's continued, fulfilled or aborted. </para> <para>The handler will only be called for the first url if the response is a redirect.</para> <para> <see cref="M:Microsoft.Playwright.IPage.RouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.PageRouteOptions)"/> will not intercept requests intercepted by Service Worker. See <a href="https://github.com/microsoft/playwright/issues/1090">this</a> issue. We recommend disabling Service Workers when using request interception by setting <see cref="M:Microsoft.Playwright.IBrowser.NewContextAsync(Microsoft.Playwright.BrowserNewContextOptions)"/> to <c>'block'</c>. </para> <para> <see cref="M:Microsoft.Playwright.IPage.RouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.PageRouteOptions)"/> will not intercept the first request of a popup page. Use <see cref="M:Microsoft.Playwright.IBrowserContext.RouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.BrowserContextRouteOptions)"/> instead. </para> <para>**Usage**</para> <para>An example of a naive handler that aborts all image requests:</para> <code> var page = await browser.NewPageAsync();<br/> await page.RouteAsync("**/*.{png,jpg,jpeg}", async r => await r.AbortAsync());<br/> await page.GotoAsync("https://www.microsoft.com"); </code> <para>or the same snippet using a regex pattern instead:</para> <code> var page = await browser.NewPageAsync();<br/> await page.RouteAsync(new Regex("(\\.png$)|(\\.jpg$)"), async r => await r.AbortAsync());<br/> await page.GotoAsync("https://www.microsoft.com"); </code> <para> It is possible to examine the request to decide the route action. For example, mocking all requests that contain some post data, and leaving all other requests as is: </para> <code> await page.RouteAsync("/api/**", async r =><br/> {<br/> if (r.Request.PostData.Contains("my-string"))<br/> await r.FulfillAsync(new() { Body = "mocked-data" });<br/> else<br/> await r.ContinueAsync();<br/> }); </code> <para> Page routes take precedence over browser context routes (set up with <see cref="M:Microsoft.Playwright.IBrowserContext.RouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.BrowserContextRouteOptions)"/>) when request matches both handlers. </para> <para>To remove a route with its handler you can use <see cref="M:Microsoft.Playwright.IPage.UnrouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute})"/>.</para> <para>Enabling routing disables http cache.</para> </summary> <remarks> <para> The handler will only be called for the first url if the response is a redirect. </para> <para> <see cref="M:Microsoft.Playwright.IPage.RouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.PageRouteOptions)"/> will not intercept requests intercepted by Service Worker. See <a href="https://github.com/microsoft/playwright/issues/1090">this</a> issue. We recommend disabling Service Workers when using request interception by setting <see cref="M:Microsoft.Playwright.IBrowser.NewContextAsync(Microsoft.Playwright.BrowserNewContextOptions)"/> to <c>'block'</c>. </para> <para> <see cref="M:Microsoft.Playwright.IPage.RouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.PageRouteOptions)"/> will not intercept the first request of a popup page. Use <see cref="M:Microsoft.Playwright.IBrowserContext.RouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.BrowserContextRouteOptions)"/> instead. </para> <para>Enabling routing disables http cache.</para> </remarks> <param name="url"> A glob pattern, regex pattern, or predicate that receives a <see cref="!:URL"/> to match during routing. If <see cref="M:Microsoft.Playwright.IBrowser.NewContextAsync(Microsoft.Playwright.BrowserNewContextOptions)"/> is set in the context options and the provided URL is a string that does not start with <c>*</c>, it is resolved using the <a href="https://developer.mozilla.org/en-US/docs/Web/API/URL/URL"><c>new URL()</c></a> constructor. </param> <param name="handler">handler function to route the request.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.RouteAsync(System.Func{System.String,System.Boolean},System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.PageRouteOptions)"> <summary> <para>Routing provides the capability to modify network requests that are made by a page.</para> <para> Once routing is enabled, every request matching the url pattern will stall unless it's continued, fulfilled or aborted. </para> <para>The handler will only be called for the first url if the response is a redirect.</para> <para> <see cref="M:Microsoft.Playwright.IPage.RouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.PageRouteOptions)"/> will not intercept requests intercepted by Service Worker. See <a href="https://github.com/microsoft/playwright/issues/1090">this</a> issue. We recommend disabling Service Workers when using request interception by setting <see cref="M:Microsoft.Playwright.IBrowser.NewContextAsync(Microsoft.Playwright.BrowserNewContextOptions)"/> to <c>'block'</c>. </para> <para> <see cref="M:Microsoft.Playwright.IPage.RouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.PageRouteOptions)"/> will not intercept the first request of a popup page. Use <see cref="M:Microsoft.Playwright.IBrowserContext.RouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.BrowserContextRouteOptions)"/> instead. </para> <para>**Usage**</para> <para>An example of a naive handler that aborts all image requests:</para> <code> var page = await browser.NewPageAsync();<br/> await page.RouteAsync("**/*.{png,jpg,jpeg}", async r => await r.AbortAsync());<br/> await page.GotoAsync("https://www.microsoft.com"); </code> <para>or the same snippet using a regex pattern instead:</para> <code> var page = await browser.NewPageAsync();<br/> await page.RouteAsync(new Regex("(\\.png$)|(\\.jpg$)"), async r => await r.AbortAsync());<br/> await page.GotoAsync("https://www.microsoft.com"); </code> <para> It is possible to examine the request to decide the route action. For example, mocking all requests that contain some post data, and leaving all other requests as is: </para> <code> await page.RouteAsync("/api/**", async r =><br/> {<br/> if (r.Request.PostData.Contains("my-string"))<br/> await r.FulfillAsync(new() { Body = "mocked-data" });<br/> else<br/> await r.ContinueAsync();<br/> }); </code> <para> Page routes take precedence over browser context routes (set up with <see cref="M:Microsoft.Playwright.IBrowserContext.RouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.BrowserContextRouteOptions)"/>) when request matches both handlers. </para> <para>To remove a route with its handler you can use <see cref="M:Microsoft.Playwright.IPage.UnrouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute})"/>.</para> <para>Enabling routing disables http cache.</para> </summary> <remarks> <para> The handler will only be called for the first url if the response is a redirect. </para> <para> <see cref="M:Microsoft.Playwright.IPage.RouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.PageRouteOptions)"/> will not intercept requests intercepted by Service Worker. See <a href="https://github.com/microsoft/playwright/issues/1090">this</a> issue. We recommend disabling Service Workers when using request interception by setting <see cref="M:Microsoft.Playwright.IBrowser.NewContextAsync(Microsoft.Playwright.BrowserNewContextOptions)"/> to <c>'block'</c>. </para> <para> <see cref="M:Microsoft.Playwright.IPage.RouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.PageRouteOptions)"/> will not intercept the first request of a popup page. Use <see cref="M:Microsoft.Playwright.IBrowserContext.RouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.BrowserContextRouteOptions)"/> instead. </para> <para>Enabling routing disables http cache.</para> </remarks> <param name="url"> A glob pattern, regex pattern, or predicate that receives a <see cref="!:URL"/> to match during routing. If <see cref="M:Microsoft.Playwright.IBrowser.NewContextAsync(Microsoft.Playwright.BrowserNewContextOptions)"/> is set in the context options and the provided URL is a string that does not start with <c>*</c>, it is resolved using the <a href="https://developer.mozilla.org/en-US/docs/Web/API/URL/URL"><c>new URL()</c></a> constructor. </param> <param name="handler">handler function to route the request.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.RouteFromHARAsync(System.String,Microsoft.Playwright.PageRouteFromHAROptions)"> <summary> <para> If specified the network requests that are made in the page will be served from the HAR file. Read more about <a href="https://playwright.dev/dotnet/docs/mock#replaying-from-har">Replaying from HAR</a>. </para> <para> Playwright will not serve requests intercepted by Service Worker from the HAR file. See <a href="https://github.com/microsoft/playwright/issues/1090">this</a> issue. We recommend disabling Service Workers when using request interception by setting <see cref="M:Microsoft.Playwright.IBrowser.NewContextAsync(Microsoft.Playwright.BrowserNewContextOptions)"/> to <c>'block'</c>. </para> </summary> <param name="har"> Path to a <a href="http://www.softwareishard.com/blog/har-12-spec">HAR</a> file with prerecorded network data. If <c>path</c> is a relative path, then it is resolved relative to the current working directory. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.RouteWebSocketAsync(System.String,System.Action{Microsoft.Playwright.IWebSocketRoute})"> <summary> <para>This method allows to modify websocket connections that are made by the page.</para> <para> Note that only <c>WebSocket</c>s created after this method was called will be routed. It is recommended to call this method before navigating the page. </para> <para>**Usage**</para> <para> Below is an example of a simple mock that responds to a single message. See <see cref="T:Microsoft.Playwright.IWebSocketRoute"/> for more details and examples. </para> <code> await page.RouteWebSocketAsync("/ws", ws => {<br/> ws.OnMessage(frame => {<br/> if (frame.Text == "request")<br/> ws.Send("response");<br/> });<br/> }); </code> </summary> <param name="url"> Only WebSockets with the url matching this pattern will be routed. A string pattern can be relative to the <see cref="M:Microsoft.Playwright.IBrowser.NewContextAsync(Microsoft.Playwright.BrowserNewContextOptions)"/> context option. </param> <param name="handler">Handler function to route the WebSocket.</param> </member> <member name="M:Microsoft.Playwright.IPage.RouteWebSocketAsync(System.Text.RegularExpressions.Regex,System.Action{Microsoft.Playwright.IWebSocketRoute})"> <summary> <para>This method allows to modify websocket connections that are made by the page.</para> <para> Note that only <c>WebSocket</c>s created after this method was called will be routed. It is recommended to call this method before navigating the page. </para> <para>**Usage**</para> <para> Below is an example of a simple mock that responds to a single message. See <see cref="T:Microsoft.Playwright.IWebSocketRoute"/> for more details and examples. </para> <code> await page.RouteWebSocketAsync("/ws", ws => {<br/> ws.OnMessage(frame => {<br/> if (frame.Text == "request")<br/> ws.Send("response");<br/> });<br/> }); </code> </summary> <param name="url"> Only WebSockets with the url matching this pattern will be routed. A string pattern can be relative to the <see cref="M:Microsoft.Playwright.IBrowser.NewContextAsync(Microsoft.Playwright.BrowserNewContextOptions)"/> context option. </param> <param name="handler">Handler function to route the WebSocket.</param> </member> <member name="M:Microsoft.Playwright.IPage.RouteWebSocketAsync(System.Func{System.String,System.Boolean},System.Action{Microsoft.Playwright.IWebSocketRoute})"> <summary> <para>This method allows to modify websocket connections that are made by the page.</para> <para> Note that only <c>WebSocket</c>s created after this method was called will be routed. It is recommended to call this method before navigating the page. </para> <para>**Usage**</para> <para> Below is an example of a simple mock that responds to a single message. See <see cref="T:Microsoft.Playwright.IWebSocketRoute"/> for more details and examples. </para> <code> await page.RouteWebSocketAsync("/ws", ws => {<br/> ws.OnMessage(frame => {<br/> if (frame.Text == "request")<br/> ws.Send("response");<br/> });<br/> }); </code> </summary> <param name="url"> Only WebSockets with the url matching this pattern will be routed. A string pattern can be relative to the <see cref="M:Microsoft.Playwright.IBrowser.NewContextAsync(Microsoft.Playwright.BrowserNewContextOptions)"/> context option. </param> <param name="handler">Handler function to route the WebSocket.</param> </member> <member name="M:Microsoft.Playwright.IPage.ScreenshotAsync(Microsoft.Playwright.PageScreenshotOptions)"> <summary><para>Returns the buffer with the captured screenshot.</para></summary> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.SelectOptionAsync(System.String,System.String,Microsoft.Playwright.PageSelectOptionOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.SelectOptionAsync(System.String,Microsoft.Playwright.LocatorSelectOptionOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para> This method waits for an element matching <see cref="M:Microsoft.Playwright.IPage.SelectOptionAsync(System.String,System.String,Microsoft.Playwright.PageSelectOptionOptions)"/>, waits for <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks, waits until all specified options are present in the <c><select></c> element and selects these options. </para> <para> If the target element is not a <c><select></c> element, this method throws an error. However, if the element is inside the <c><label></c> element that has an associated <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control">control</a>, the control will be used instead. </para> <para>Returns the array of option values that have been successfully selected.</para> <para> Triggers a <c>change</c> and <c>input</c> event once all the provided options have been selected. </para> <para>**Usage**</para> <code> // Single selection matching the value or label<br/> await page.SelectOptionAsync("select#colors", new[] { "blue" });<br/> // single selection matching both the value and the label<br/> await page.SelectOptionAsync("select#colors", new[] { new SelectOptionValue() { Label = "blue" } });<br/> // multiple<br/> await page.SelectOptionAsync("select#colors", new[] { "red", "green", "blue" }); </code> </summary> <param name="selector"> A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used. </param> <param name="values"> Options to select. If the <c><select></c> has the <c>multiple</c> attribute, all matching options are selected, otherwise only the first option matching one of the passed options is selected. String values are matching both values and labels. Option is considered matching if all specified properties match. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.SelectOptionAsync(System.String,Microsoft.Playwright.IElementHandle,Microsoft.Playwright.PageSelectOptionOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.SelectOptionAsync(System.String,Microsoft.Playwright.LocatorSelectOptionOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para> This method waits for an element matching <see cref="M:Microsoft.Playwright.IPage.SelectOptionAsync(System.String,System.String,Microsoft.Playwright.PageSelectOptionOptions)"/>, waits for <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks, waits until all specified options are present in the <c><select></c> element and selects these options. </para> <para> If the target element is not a <c><select></c> element, this method throws an error. However, if the element is inside the <c><label></c> element that has an associated <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control">control</a>, the control will be used instead. </para> <para>Returns the array of option values that have been successfully selected.</para> <para> Triggers a <c>change</c> and <c>input</c> event once all the provided options have been selected. </para> <para>**Usage**</para> <code> // Single selection matching the value or label<br/> await page.SelectOptionAsync("select#colors", new[] { "blue" });<br/> // single selection matching both the value and the label<br/> await page.SelectOptionAsync("select#colors", new[] { new SelectOptionValue() { Label = "blue" } });<br/> // multiple<br/> await page.SelectOptionAsync("select#colors", new[] { "red", "green", "blue" }); </code> </summary> <param name="selector"> A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used. </param> <param name="values"> Options to select. If the <c><select></c> has the <c>multiple</c> attribute, all matching options are selected, otherwise only the first option matching one of the passed options is selected. String values are matching both values and labels. Option is considered matching if all specified properties match. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.SelectOptionAsync(System.String,System.Collections.Generic.IEnumerable{System.String},Microsoft.Playwright.PageSelectOptionOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.SelectOptionAsync(System.String,Microsoft.Playwright.LocatorSelectOptionOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para> This method waits for an element matching <see cref="M:Microsoft.Playwright.IPage.SelectOptionAsync(System.String,System.String,Microsoft.Playwright.PageSelectOptionOptions)"/>, waits for <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks, waits until all specified options are present in the <c><select></c> element and selects these options. </para> <para> If the target element is not a <c><select></c> element, this method throws an error. However, if the element is inside the <c><label></c> element that has an associated <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control">control</a>, the control will be used instead. </para> <para>Returns the array of option values that have been successfully selected.</para> <para> Triggers a <c>change</c> and <c>input</c> event once all the provided options have been selected. </para> <para>**Usage**</para> <code> // Single selection matching the value or label<br/> await page.SelectOptionAsync("select#colors", new[] { "blue" });<br/> // single selection matching both the value and the label<br/> await page.SelectOptionAsync("select#colors", new[] { new SelectOptionValue() { Label = "blue" } });<br/> // multiple<br/> await page.SelectOptionAsync("select#colors", new[] { "red", "green", "blue" }); </code> </summary> <param name="selector"> A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used. </param> <param name="values"> Options to select. If the <c><select></c> has the <c>multiple</c> attribute, all matching options are selected, otherwise only the first option matching one of the passed options is selected. String values are matching both values and labels. Option is considered matching if all specified properties match. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.SelectOptionAsync(System.String,Microsoft.Playwright.SelectOptionValue,Microsoft.Playwright.PageSelectOptionOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.SelectOptionAsync(System.String,Microsoft.Playwright.LocatorSelectOptionOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para> This method waits for an element matching <see cref="M:Microsoft.Playwright.IPage.SelectOptionAsync(System.String,System.String,Microsoft.Playwright.PageSelectOptionOptions)"/>, waits for <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks, waits until all specified options are present in the <c><select></c> element and selects these options. </para> <para> If the target element is not a <c><select></c> element, this method throws an error. However, if the element is inside the <c><label></c> element that has an associated <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control">control</a>, the control will be used instead. </para> <para>Returns the array of option values that have been successfully selected.</para> <para> Triggers a <c>change</c> and <c>input</c> event once all the provided options have been selected. </para> <para>**Usage**</para> <code> // Single selection matching the value or label<br/> await page.SelectOptionAsync("select#colors", new[] { "blue" });<br/> // single selection matching both the value and the label<br/> await page.SelectOptionAsync("select#colors", new[] { new SelectOptionValue() { Label = "blue" } });<br/> // multiple<br/> await page.SelectOptionAsync("select#colors", new[] { "red", "green", "blue" }); </code> </summary> <param name="selector"> A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used. </param> <param name="values"> Options to select. If the <c><select></c> has the <c>multiple</c> attribute, all matching options are selected, otherwise only the first option matching one of the passed options is selected. String values are matching both values and labels. Option is considered matching if all specified properties match. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.SelectOptionAsync(System.String,System.Collections.Generic.IEnumerable{Microsoft.Playwright.IElementHandle},Microsoft.Playwright.PageSelectOptionOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.SelectOptionAsync(System.String,Microsoft.Playwright.LocatorSelectOptionOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para> This method waits for an element matching <see cref="M:Microsoft.Playwright.IPage.SelectOptionAsync(System.String,System.String,Microsoft.Playwright.PageSelectOptionOptions)"/>, waits for <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks, waits until all specified options are present in the <c><select></c> element and selects these options. </para> <para> If the target element is not a <c><select></c> element, this method throws an error. However, if the element is inside the <c><label></c> element that has an associated <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control">control</a>, the control will be used instead. </para> <para>Returns the array of option values that have been successfully selected.</para> <para> Triggers a <c>change</c> and <c>input</c> event once all the provided options have been selected. </para> <para>**Usage**</para> <code> // Single selection matching the value or label<br/> await page.SelectOptionAsync("select#colors", new[] { "blue" });<br/> // single selection matching both the value and the label<br/> await page.SelectOptionAsync("select#colors", new[] { new SelectOptionValue() { Label = "blue" } });<br/> // multiple<br/> await page.SelectOptionAsync("select#colors", new[] { "red", "green", "blue" }); </code> </summary> <param name="selector"> A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used. </param> <param name="values"> Options to select. If the <c><select></c> has the <c>multiple</c> attribute, all matching options are selected, otherwise only the first option matching one of the passed options is selected. String values are matching both values and labels. Option is considered matching if all specified properties match. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.SelectOptionAsync(System.String,System.Collections.Generic.IEnumerable{Microsoft.Playwright.SelectOptionValue},Microsoft.Playwright.PageSelectOptionOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.SelectOptionAsync(System.String,Microsoft.Playwright.LocatorSelectOptionOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para> This method waits for an element matching <see cref="M:Microsoft.Playwright.IPage.SelectOptionAsync(System.String,System.String,Microsoft.Playwright.PageSelectOptionOptions)"/>, waits for <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks, waits until all specified options are present in the <c><select></c> element and selects these options. </para> <para> If the target element is not a <c><select></c> element, this method throws an error. However, if the element is inside the <c><label></c> element that has an associated <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control">control</a>, the control will be used instead. </para> <para>Returns the array of option values that have been successfully selected.</para> <para> Triggers a <c>change</c> and <c>input</c> event once all the provided options have been selected. </para> <para>**Usage**</para> <code> // Single selection matching the value or label<br/> await page.SelectOptionAsync("select#colors", new[] { "blue" });<br/> // single selection matching both the value and the label<br/> await page.SelectOptionAsync("select#colors", new[] { new SelectOptionValue() { Label = "blue" } });<br/> // multiple<br/> await page.SelectOptionAsync("select#colors", new[] { "red", "green", "blue" }); </code> </summary> <param name="selector"> A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used. </param> <param name="values"> Options to select. If the <c><select></c> has the <c>multiple</c> attribute, all matching options are selected, otherwise only the first option matching one of the passed options is selected. String values are matching both values and labels. Option is considered matching if all specified properties match. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.SetCheckedAsync(System.String,System.Boolean,Microsoft.Playwright.PageSetCheckedOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.SetCheckedAsync(System.Boolean,Microsoft.Playwright.LocatorSetCheckedOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para> This method checks or unchecks an element matching <see cref="M:Microsoft.Playwright.IPage.SetCheckedAsync(System.String,System.Boolean,Microsoft.Playwright.PageSetCheckedOptions)"/> by performing the following steps: </para> <list type="ordinal"> <item><description> Find an element matching <see cref="M:Microsoft.Playwright.IPage.SetCheckedAsync(System.String,System.Boolean,Microsoft.Playwright.PageSetCheckedOptions)"/>. If there is none, wait until a matching element is attached to the DOM. </description></item> <item><description> Ensure that matched element is a checkbox or a radio input. If not, this method throws. </description></item> <item><description>If the element already has the right checked state, this method returns immediately.</description></item> <item><description> Wait for <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks on the matched element, unless <see cref="M:Microsoft.Playwright.IPage.SetCheckedAsync(System.String,System.Boolean,Microsoft.Playwright.PageSetCheckedOptions)"/> option is set. If the element is detached during the checks, the whole action is retried. </description></item> <item><description>Scroll the element into view if needed.</description></item> <item><description>Use <see cref="P:Microsoft.Playwright.IPage.Mouse"/> to click in the center of the element.</description></item> <item><description>Ensure that the element is now checked or unchecked. If not, this method throws.</description></item> </list> <para> When all steps combined have not finished during the specified <see cref="M:Microsoft.Playwright.IPage.SetCheckedAsync(System.String,System.Boolean,Microsoft.Playwright.PageSetCheckedOptions)"/>, this method throws a <see cref="T:System.TimeoutException"/>. Passing zero timeout disables this. </para> </summary> <param name="selector"> A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used. </param> <param name="checkedState">Whether to check or uncheck the checkbox.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.SetContentAsync(System.String,Microsoft.Playwright.PageSetContentOptions)"> <summary> <para> This method internally calls <a href="https://developer.mozilla.org/en-US/docs/Web/API/Document/write">document.write()</a>, inheriting all its specific characteristics and behaviors. </para> </summary> <param name="html">HTML markup to assign to the page.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.SetDefaultNavigationTimeout(System.Single)"> <summary> <para> This setting will change the default maximum navigation time for the following methods and related shortcuts: </para> <list type="bullet"> <item><description><see cref="M:Microsoft.Playwright.IPage.GoBackAsync(Microsoft.Playwright.PageGoBackOptions)"/></description></item> <item><description><see cref="M:Microsoft.Playwright.IPage.GoForwardAsync(Microsoft.Playwright.PageGoForwardOptions)"/></description></item> <item><description><see cref="M:Microsoft.Playwright.IPage.GotoAsync(System.String,Microsoft.Playwright.PageGotoOptions)"/></description></item> <item><description><see cref="M:Microsoft.Playwright.IPage.ReloadAsync(Microsoft.Playwright.PageReloadOptions)"/></description></item> <item><description><see cref="M:Microsoft.Playwright.IPage.SetContentAsync(System.String,Microsoft.Playwright.PageSetContentOptions)"/></description></item> <item><description><see cref="M:Microsoft.Playwright.IPage.RunAndWaitForNavigationAsync(System.Func{System.Threading.Tasks.Task},Microsoft.Playwright.PageRunAndWaitForNavigationOptions)"/></description></item> <item><description><see cref="M:Microsoft.Playwright.IPage.WaitForURLAsync(System.String,Microsoft.Playwright.PageWaitForURLOptions)"/></description></item> </list> <para> <see cref="M:Microsoft.Playwright.IPage.SetDefaultNavigationTimeout(System.Single)"/> takes priority over <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/>, <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> and <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultNavigationTimeout(System.Single)"/>. </para> </summary> <remarks> <para> <see cref="M:Microsoft.Playwright.IPage.SetDefaultNavigationTimeout(System.Single)"/> takes priority over <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/>, <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> and <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultNavigationTimeout(System.Single)"/>. </para> </remarks> <param name="timeout">Maximum navigation time in milliseconds</param> </member> <member name="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"> <summary> <para> This setting will change the default maximum time for all the methods accepting <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> option. </para> <para><see cref="M:Microsoft.Playwright.IPage.SetDefaultNavigationTimeout(System.Single)"/> takes priority over <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/>.</para> </summary> <remarks> <para> <see cref="M:Microsoft.Playwright.IPage.SetDefaultNavigationTimeout(System.Single)"/> takes priority over <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/>. </para> </remarks> <param name="timeout">Maximum time in milliseconds. Pass <c>0</c> to disable timeout.</param> </member> <member name="M:Microsoft.Playwright.IPage.SetExtraHTTPHeadersAsync(System.Collections.Generic.IEnumerable{System.Collections.Generic.KeyValuePair{System.String,System.String}})"> <summary> <para>The extra HTTP headers will be sent with every request the page initiates.</para> <para> <see cref="M:Microsoft.Playwright.IPage.SetExtraHTTPHeadersAsync(System.Collections.Generic.IEnumerable{System.Collections.Generic.KeyValuePair{System.String,System.String}})"/> does not guarantee the order of headers in the outgoing requests. </para> </summary> <remarks> <para> <see cref="M:Microsoft.Playwright.IPage.SetExtraHTTPHeadersAsync(System.Collections.Generic.IEnumerable{System.Collections.Generic.KeyValuePair{System.String,System.String}})"/> does not guarantee the order of headers in the outgoing requests. </para> </remarks> <param name="headers"> An object containing additional HTTP headers to be sent with every request. All header values must be strings. </param> </member> <member name="M:Microsoft.Playwright.IPage.SetInputFilesAsync(System.String,System.String,Microsoft.Playwright.PageSetInputFilesOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.SetInputFilesAsync(System.String,Microsoft.Playwright.LocatorSetInputFilesOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para> Sets the value of the file input to these file paths or files. If some of the <c>filePaths</c> are relative paths, then they are resolved relative to the current working directory. For empty array, clears the selected files. For inputs with a <c>[webkitdirectory]</c> attribute, only a single directory path is supported. </para> <para> This method expects <see cref="M:Microsoft.Playwright.IPage.SetInputFilesAsync(System.String,System.String,Microsoft.Playwright.PageSetInputFilesOptions)"/> to point to an <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input">input element</a>. However, if the element is inside the <c><label></c> element that has an associated <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control">control</a>, targets the control instead. </para> </summary> <param name="selector"> A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used. </param> <param name="files"> </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.SetInputFilesAsync(System.String,System.Collections.Generic.IEnumerable{System.String},Microsoft.Playwright.PageSetInputFilesOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.SetInputFilesAsync(System.String,Microsoft.Playwright.LocatorSetInputFilesOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para> Sets the value of the file input to these file paths or files. If some of the <c>filePaths</c> are relative paths, then they are resolved relative to the current working directory. For empty array, clears the selected files. For inputs with a <c>[webkitdirectory]</c> attribute, only a single directory path is supported. </para> <para> This method expects <see cref="M:Microsoft.Playwright.IPage.SetInputFilesAsync(System.String,System.String,Microsoft.Playwright.PageSetInputFilesOptions)"/> to point to an <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input">input element</a>. However, if the element is inside the <c><label></c> element that has an associated <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control">control</a>, targets the control instead. </para> </summary> <param name="selector"> A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used. </param> <param name="files"> </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.SetInputFilesAsync(System.String,Microsoft.Playwright.FilePayload,Microsoft.Playwright.PageSetInputFilesOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.SetInputFilesAsync(System.String,Microsoft.Playwright.LocatorSetInputFilesOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para> Sets the value of the file input to these file paths or files. If some of the <c>filePaths</c> are relative paths, then they are resolved relative to the current working directory. For empty array, clears the selected files. For inputs with a <c>[webkitdirectory]</c> attribute, only a single directory path is supported. </para> <para> This method expects <see cref="M:Microsoft.Playwright.IPage.SetInputFilesAsync(System.String,System.String,Microsoft.Playwright.PageSetInputFilesOptions)"/> to point to an <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input">input element</a>. However, if the element is inside the <c><label></c> element that has an associated <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control">control</a>, targets the control instead. </para> </summary> <param name="selector"> A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used. </param> <param name="files"> </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.SetInputFilesAsync(System.String,System.Collections.Generic.IEnumerable{Microsoft.Playwright.FilePayload},Microsoft.Playwright.PageSetInputFilesOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.SetInputFilesAsync(System.String,Microsoft.Playwright.LocatorSetInputFilesOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para> Sets the value of the file input to these file paths or files. If some of the <c>filePaths</c> are relative paths, then they are resolved relative to the current working directory. For empty array, clears the selected files. For inputs with a <c>[webkitdirectory]</c> attribute, only a single directory path is supported. </para> <para> This method expects <see cref="M:Microsoft.Playwright.IPage.SetInputFilesAsync(System.String,System.String,Microsoft.Playwright.PageSetInputFilesOptions)"/> to point to an <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input">input element</a>. However, if the element is inside the <c><label></c> element that has an associated <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control">control</a>, targets the control instead. </para> </summary> <param name="selector"> A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used. </param> <param name="files"> </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.SetViewportSizeAsync(System.Int32,System.Int32)"> <summary> <para> In the case of multiple pages in a single browser, each page can have its own viewport size. However, <see cref="M:Microsoft.Playwright.IBrowser.NewContextAsync(Microsoft.Playwright.BrowserNewContextOptions)"/> allows to set viewport size (and more) for all pages in the context at once. </para> <para> <see cref="M:Microsoft.Playwright.IPage.SetViewportSizeAsync(System.Int32,System.Int32)"/> will resize the page. A lot of websites don't expect phones to change size, so you should set the viewport size before navigating to the page. <see cref="M:Microsoft.Playwright.IPage.SetViewportSizeAsync(System.Int32,System.Int32)"/> will also reset <c>screen</c> size, use <see cref="M:Microsoft.Playwright.IBrowser.NewContextAsync(Microsoft.Playwright.BrowserNewContextOptions)"/> with <c>screen</c> and <c>viewport</c> parameters if you need better control of these properties. </para> <para>**Usage**</para> <code> var page = await browser.NewPageAsync();<br/> await page.SetViewportSizeAsync(640, 480);<br/> await page.GotoAsync("https://www.microsoft.com"); </code> </summary> <param name="width">Page width in pixels.</param> <param name="height">Page height in pixels.</param> </member> <member name="M:Microsoft.Playwright.IPage.TapAsync(System.String,Microsoft.Playwright.PageTapOptions)"> <summary> <para>Use locator-based <see cref="M:Microsoft.Playwright.ILocator.TapAsync(Microsoft.Playwright.LocatorTapOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>.</para> <para> This method taps an element matching <see cref="M:Microsoft.Playwright.IPage.TapAsync(System.String,Microsoft.Playwright.PageTapOptions)"/> by performing the following steps: </para> <list type="ordinal"> <item><description> Find an element matching <see cref="M:Microsoft.Playwright.IPage.TapAsync(System.String,Microsoft.Playwright.PageTapOptions)"/>. If there is none, wait until a matching element is attached to the DOM. </description></item> <item><description> Wait for <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks on the matched element, unless <see cref="M:Microsoft.Playwright.IPage.TapAsync(System.String,Microsoft.Playwright.PageTapOptions)"/> option is set. If the element is detached during the checks, the whole action is retried. </description></item> <item><description>Scroll the element into view if needed.</description></item> <item><description> Use <see cref="P:Microsoft.Playwright.IPage.Touchscreen"/> to tap the center of the element, or the specified <see cref="M:Microsoft.Playwright.IPage.TapAsync(System.String,Microsoft.Playwright.PageTapOptions)"/>. </description></item> </list> <para> When all steps combined have not finished during the specified <see cref="M:Microsoft.Playwright.IPage.TapAsync(System.String,Microsoft.Playwright.PageTapOptions)"/>, this method throws a <see cref="T:System.TimeoutException"/>. Passing zero timeout disables this. </para> <para> <see cref="M:Microsoft.Playwright.IPage.TapAsync(System.String,Microsoft.Playwright.PageTapOptions)"/> the method will throw if <see cref="M:Microsoft.Playwright.IBrowser.NewContextAsync(Microsoft.Playwright.BrowserNewContextOptions)"/> option of the browser context is false. </para> </summary> <remarks> <para> <see cref="M:Microsoft.Playwright.IPage.TapAsync(System.String,Microsoft.Playwright.PageTapOptions)"/> the method will throw if <see cref="M:Microsoft.Playwright.IBrowser.NewContextAsync(Microsoft.Playwright.BrowserNewContextOptions)"/> option of the browser context is false. </para> </remarks> <param name="selector"> A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.TextContentAsync(System.String,Microsoft.Playwright.PageTextContentOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.TextContentAsync(Microsoft.Playwright.LocatorTextContentOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para>Returns <c>element.textContent</c>.</para> </summary> <param name="selector"> A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.TitleAsync"> <summary><para>Returns the page's title.</para></summary> </member> <member name="M:Microsoft.Playwright.IPage.TypeAsync(System.String,System.String,Microsoft.Playwright.PageTypeOptions)"> <summary> <para> **DEPRECATED** In most cases, you should use <see cref="M:Microsoft.Playwright.ILocator.FillAsync(System.String,Microsoft.Playwright.LocatorFillOptions)"/> instead. You only need to press keys one by one if there is special keyboard handling on the page - in this case use <see cref="M:Microsoft.Playwright.ILocator.PressSequentiallyAsync(System.String,Microsoft.Playwright.LocatorPressSequentiallyOptions)"/>. </para> <para> Sends a <c>keydown</c>, <c>keypress</c>/<c>input</c>, and <c>keyup</c> event for each character in the text. <c>page.type</c> can be used to send fine-grained keyboard events. To fill values in form fields, use <see cref="M:Microsoft.Playwright.IPage.FillAsync(System.String,System.String,Microsoft.Playwright.PageFillOptions)"/>. </para> <para>To press a special key, like <c>Control</c> or <c>ArrowDown</c>, use <see cref="M:Microsoft.Playwright.IKeyboard.PressAsync(System.String,Microsoft.Playwright.KeyboardPressOptions)"/>.</para> <para>**Usage**</para> </summary> <param name="selector"> A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used. </param> <param name="text">A text to type into a focused element.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.UncheckAsync(System.String,Microsoft.Playwright.PageUncheckOptions)"> <summary> <para> Use locator-based <see cref="M:Microsoft.Playwright.ILocator.UncheckAsync(Microsoft.Playwright.LocatorUncheckOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para> This method unchecks an element matching <see cref="M:Microsoft.Playwright.IPage.UncheckAsync(System.String,Microsoft.Playwright.PageUncheckOptions)"/> by performing the following steps: </para> <list type="ordinal"> <item><description> Find an element matching <see cref="M:Microsoft.Playwright.IPage.UncheckAsync(System.String,Microsoft.Playwright.PageUncheckOptions)"/>. If there is none, wait until a matching element is attached to the DOM. </description></item> <item><description> Ensure that matched element is a checkbox or a radio input. If not, this method throws. If the element is already unchecked, this method returns immediately. </description></item> <item><description> Wait for <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks on the matched element, unless <see cref="M:Microsoft.Playwright.IPage.UncheckAsync(System.String,Microsoft.Playwright.PageUncheckOptions)"/> option is set. If the element is detached during the checks, the whole action is retried. </description></item> <item><description>Scroll the element into view if needed.</description></item> <item><description>Use <see cref="P:Microsoft.Playwright.IPage.Mouse"/> to click in the center of the element.</description></item> <item><description>Ensure that the element is now unchecked. If not, this method throws.</description></item> </list> <para> When all steps combined have not finished during the specified <see cref="M:Microsoft.Playwright.IPage.UncheckAsync(System.String,Microsoft.Playwright.PageUncheckOptions)"/>, this method throws a <see cref="T:System.TimeoutException"/>. Passing zero timeout disables this. </para> </summary> <param name="selector"> A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.UnrouteAllAsync(Microsoft.Playwright.PageUnrouteAllOptions)"> <summary><para>Removes all routes created with <see cref="M:Microsoft.Playwright.IPage.RouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.PageRouteOptions)"/> and <see cref="M:Microsoft.Playwright.IPage.RouteFromHARAsync(System.String,Microsoft.Playwright.PageRouteFromHAROptions)"/>.</para></summary> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.UnrouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute})"> <summary> <para> Removes a route created with <see cref="M:Microsoft.Playwright.IPage.RouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.PageRouteOptions)"/>. When <see cref="M:Microsoft.Playwright.IPage.UnrouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute})"/> is not specified, removes all routes for the <see cref="M:Microsoft.Playwright.IPage.UnrouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute})"/>. </para> </summary> <param name="url"> A glob pattern, regex pattern or predicate receiving <see cref="!:URL"/> to match while routing. </param> <param name="handler">Optional handler function to route the request.</param> </member> <member name="M:Microsoft.Playwright.IPage.UnrouteAsync(System.Text.RegularExpressions.Regex,System.Action{Microsoft.Playwright.IRoute})"> <summary> <para> Removes a route created with <see cref="M:Microsoft.Playwright.IPage.RouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.PageRouteOptions)"/>. When <see cref="M:Microsoft.Playwright.IPage.UnrouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute})"/> is not specified, removes all routes for the <see cref="M:Microsoft.Playwright.IPage.UnrouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute})"/>. </para> </summary> <param name="url"> A glob pattern, regex pattern or predicate receiving <see cref="!:URL"/> to match while routing. </param> <param name="handler">Optional handler function to route the request.</param> </member> <member name="M:Microsoft.Playwright.IPage.UnrouteAsync(System.Func{System.String,System.Boolean},System.Action{Microsoft.Playwright.IRoute})"> <summary> <para> Removes a route created with <see cref="M:Microsoft.Playwright.IPage.RouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.PageRouteOptions)"/>. When <see cref="M:Microsoft.Playwright.IPage.UnrouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute})"/> is not specified, removes all routes for the <see cref="M:Microsoft.Playwright.IPage.UnrouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute})"/>. </para> </summary> <param name="url"> A glob pattern, regex pattern or predicate receiving <see cref="!:URL"/> to match while routing. </param> <param name="handler">Optional handler function to route the request.</param> </member> <member name="P:Microsoft.Playwright.IPage.Video"> <summary><para>Video object associated with this page.</para></summary> </member> <member name="M:Microsoft.Playwright.IPage.WaitForConsoleMessageAsync(Microsoft.Playwright.PageWaitForConsoleMessageOptions)"> <summary> <para> Performs action and waits for a <see cref="T:Microsoft.Playwright.IConsoleMessage"/> to be logged by in the page. If predicate is provided, it passes <see cref="T:Microsoft.Playwright.IConsoleMessage"/> value into the <c>predicate</c> function and waits for <c>predicate(message)</c> to return a truthy value. Will throw an error if the page is closed before the <see cref="E:Microsoft.Playwright.IPage.Console"/> event is fired. </para> </summary> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.RunAndWaitForConsoleMessageAsync(System.Func{System.Threading.Tasks.Task},Microsoft.Playwright.PageRunAndWaitForConsoleMessageOptions)"> <summary> <para> Performs action and waits for a <see cref="T:Microsoft.Playwright.IConsoleMessage"/> to be logged by in the page. If predicate is provided, it passes <see cref="T:Microsoft.Playwright.IConsoleMessage"/> value into the <c>predicate</c> function and waits for <c>predicate(message)</c> to return a truthy value. Will throw an error if the page is closed before the <see cref="E:Microsoft.Playwright.IPage.Console"/> event is fired. </para> </summary> <param name="action">Action that triggers the event.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.WaitForDownloadAsync(Microsoft.Playwright.PageWaitForDownloadOptions)"> <summary> <para> Performs action and waits for a new <see cref="T:Microsoft.Playwright.IDownload"/>. If predicate is provided, it passes <see cref="T:Microsoft.Playwright.IDownload"/> value into the <c>predicate</c> function and waits for <c>predicate(download)</c> to return a truthy value. Will throw an error if the page is closed before the download event is fired. </para> </summary> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.RunAndWaitForDownloadAsync(System.Func{System.Threading.Tasks.Task},Microsoft.Playwright.PageRunAndWaitForDownloadOptions)"> <summary> <para> Performs action and waits for a new <see cref="T:Microsoft.Playwright.IDownload"/>. If predicate is provided, it passes <see cref="T:Microsoft.Playwright.IDownload"/> value into the <c>predicate</c> function and waits for <c>predicate(download)</c> to return a truthy value. Will throw an error if the page is closed before the download event is fired. </para> </summary> <param name="action">Action that triggers the event.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.WaitForFileChooserAsync(Microsoft.Playwright.PageWaitForFileChooserOptions)"> <summary> <para> Performs action and waits for a new <see cref="T:Microsoft.Playwright.IFileChooser"/> to be created. If predicate is provided, it passes <see cref="T:Microsoft.Playwright.IFileChooser"/> value into the <c>predicate</c> function and waits for <c>predicate(fileChooser)</c> to return a truthy value. Will throw an error if the page is closed before the file chooser is opened. </para> </summary> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.RunAndWaitForFileChooserAsync(System.Func{System.Threading.Tasks.Task},Microsoft.Playwright.PageRunAndWaitForFileChooserOptions)"> <summary> <para> Performs action and waits for a new <see cref="T:Microsoft.Playwright.IFileChooser"/> to be created. If predicate is provided, it passes <see cref="T:Microsoft.Playwright.IFileChooser"/> value into the <c>predicate</c> function and waits for <c>predicate(fileChooser)</c> to return a truthy value. Will throw an error if the page is closed before the file chooser is opened. </para> </summary> <param name="action">Action that triggers the event.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.WaitForFunctionAsync(System.String,System.Object,Microsoft.Playwright.PageWaitForFunctionOptions)"> <summary> <para> Returns when the <see cref="M:Microsoft.Playwright.IPage.WaitForFunctionAsync(System.String,System.Object,Microsoft.Playwright.PageWaitForFunctionOptions)"/> returns a truthy value. It resolves to a JSHandle of the truthy value. </para> <para>**Usage**</para> <para> The <see cref="M:Microsoft.Playwright.IPage.WaitForFunctionAsync(System.String,System.Object,Microsoft.Playwright.PageWaitForFunctionOptions)"/> can be used to observe viewport size change: </para> <code> using Microsoft.Playwright;<br/> using System.Threading.Tasks;<br/> <br/> class FrameExamples<br/> {<br/> public static async Task WaitForFunction()<br/> {<br/> using var playwright = await Playwright.CreateAsync();<br/> await using var browser = await playwright.Webkit.LaunchAsync();<br/> var page = await browser.NewPageAsync();<br/> await page.SetViewportSizeAsync(50, 50);<br/> await page.MainFrame.WaitForFunctionAsync("window.innerWidth < 100");<br/> }<br/> } </code> <para> To pass an argument to the predicate of <see cref="M:Microsoft.Playwright.IPage.WaitForFunctionAsync(System.String,System.Object,Microsoft.Playwright.PageWaitForFunctionOptions)"/> function: </para> <code> var selector = ".foo";<br/> await page.WaitForFunctionAsync("selector => !!document.querySelector(selector)", selector); </code> </summary> <param name="expression"> JavaScript expression to be evaluated in the browser context. If the expression evaluates to a function, the function is automatically invoked. </param> <param name="arg">Optional argument to pass to <see cref="M:Microsoft.Playwright.IPage.WaitForFunctionAsync(System.String,System.Object,Microsoft.Playwright.PageWaitForFunctionOptions)"/>.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.WaitForLoadStateAsync(System.Nullable{Microsoft.Playwright.LoadState},Microsoft.Playwright.PageWaitForLoadStateOptions)"> <summary> <para>Returns when the required load state has been reached.</para> <para> This resolves when the page reaches a required load state, <c>load</c> by default. The navigation must have been committed when this method is called. If current document has already reached the required state, resolves immediately. </para> <para> Most of the time, this method is not needed because Playwright <a href="https://playwright.dev/dotnet/docs/actionability">auto-waits before every action</a>. </para> <para>**Usage**</para> <code> await page.GetByRole(AriaRole.Button).ClickAsync(); // Click triggers navigation.<br/> await page.WaitForLoadStateAsync(); // The promise resolves after 'load' event. </code> <code> var popup = await page.RunAndWaitForPopupAsync(async () =><br/> {<br/> await page.GetByRole(AriaRole.Button).ClickAsync(); // click triggers the popup<br/> });<br/> // Wait for the "DOMContentLoaded" event.<br/> await popup.WaitForLoadStateAsync(LoadState.DOMContentLoaded);<br/> Console.WriteLine(await popup.TitleAsync()); // popup is ready to use. </code> </summary> <remarks> <para> Most of the time, this method is not needed because Playwright <a href="https://playwright.dev/dotnet/docs/actionability">auto-waits before every action</a>. </para> </remarks> <param name="state"> Optional load state to wait for, defaults to <c>load</c>. If the state has been already reached while loading current document, the method resolves immediately. Can be one of: <list type="bullet"> <item><description><c>'load'</c> - wait for the <c>load</c> event to be fired.</description></item> <item><description><c>'domcontentloaded'</c> - wait for the <c>DOMContentLoaded</c> event to be fired.</description></item> <item><description> <c>'networkidle'</c> - **DISCOURAGED** wait until there are no network connections for at least <c>500</c> ms. Don't use this method for testing, rely on web assertions to assess readiness instead. </description></item> </list> </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.WaitForNavigationAsync(Microsoft.Playwright.PageWaitForNavigationOptions)"> <summary> <para> **DEPRECATED** This method is inherently racy, please use <see cref="M:Microsoft.Playwright.IPage.WaitForURLAsync(System.String,Microsoft.Playwright.PageWaitForURLOptions)"/> instead. </para> <para> Waits for the main frame navigation and returns the main resource response. In case of multiple redirects, the navigation will resolve with the response of the last redirect. In case of navigation to a different anchor or navigation due to History API usage, the navigation will resolve with <c>null</c>. </para> <para>**Usage**</para> <para> This resolves when the page navigates to a new URL or reloads. It is useful for when you run code which will indirectly cause the page to navigate. e.g. The click target has an <c>onclick</c> handler that triggers navigation from a <c>setTimeout</c>. Consider this example: </para> <code> await page.RunAndWaitForNavigationAsync(async () =><br/> {<br/> // This action triggers the navigation after a timeout.<br/> await page.GetByText("Navigate after timeout").ClickAsync();<br/> });<br/> <br/> // The method continues after navigation has finished </code> <para> Usage of the <a href="https://developer.mozilla.org/en-US/docs/Web/API/History_API">History API</a> to change the URL is considered a navigation. </para> </summary> <remarks> <para> Usage of the <a href="https://developer.mozilla.org/en-US/docs/Web/API/History_API">History API</a> to change the URL is considered a navigation. </para> </remarks> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.RunAndWaitForNavigationAsync(System.Func{System.Threading.Tasks.Task},Microsoft.Playwright.PageRunAndWaitForNavigationOptions)"> <summary> <para> **DEPRECATED** This method is inherently racy, please use <see cref="M:Microsoft.Playwright.IPage.WaitForURLAsync(System.String,Microsoft.Playwright.PageWaitForURLOptions)"/> instead. </para> <para> Waits for the main frame navigation and returns the main resource response. In case of multiple redirects, the navigation will resolve with the response of the last redirect. In case of navigation to a different anchor or navigation due to History API usage, the navigation will resolve with <c>null</c>. </para> <para>**Usage**</para> <para> This resolves when the page navigates to a new URL or reloads. It is useful for when you run code which will indirectly cause the page to navigate. e.g. The click target has an <c>onclick</c> handler that triggers navigation from a <c>setTimeout</c>. Consider this example: </para> <code> await page.RunAndWaitForNavigationAsync(async () =><br/> {<br/> // This action triggers the navigation after a timeout.<br/> await page.GetByText("Navigate after timeout").ClickAsync();<br/> });<br/> <br/> // The method continues after navigation has finished </code> <para> Usage of the <a href="https://developer.mozilla.org/en-US/docs/Web/API/History_API">History API</a> to change the URL is considered a navigation. </para> </summary> <remarks> <para> Usage of the <a href="https://developer.mozilla.org/en-US/docs/Web/API/History_API">History API</a> to change the URL is considered a navigation. </para> </remarks> <param name="action">Action that triggers the event.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.WaitForPopupAsync(Microsoft.Playwright.PageWaitForPopupOptions)"> <summary> <para> Performs action and waits for a popup <see cref="T:Microsoft.Playwright.IPage"/>. If predicate is provided, it passes <see cref="E:Microsoft.Playwright.IPage.Popup"/> value into the <c>predicate</c> function and waits for <c>predicate(page)</c> to return a truthy value. Will throw an error if the page is closed before the popup event is fired. </para> </summary> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.RunAndWaitForPopupAsync(System.Func{System.Threading.Tasks.Task},Microsoft.Playwright.PageRunAndWaitForPopupOptions)"> <summary> <para> Performs action and waits for a popup <see cref="T:Microsoft.Playwright.IPage"/>. If predicate is provided, it passes <see cref="E:Microsoft.Playwright.IPage.Popup"/> value into the <c>predicate</c> function and waits for <c>predicate(page)</c> to return a truthy value. Will throw an error if the page is closed before the popup event is fired. </para> </summary> <param name="action">Action that triggers the event.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.WaitForRequestAsync(System.String,Microsoft.Playwright.PageWaitForRequestOptions)"> <summary> <para> Waits for the matching request and returns it. See <a href="https://playwright.dev/dotnet/docs/events#waiting-for-event">waiting for event</a> for more details about events. </para> <para>**Usage**</para> <code> // Waits for the next request with the specified url.<br/> await page.RunAndWaitForRequestAsync(async () =><br/> {<br/> await page.GetByText("trigger request").ClickAsync();<br/> }, "http://example.com/resource");<br/> <br/> // Alternative way with a predicate.<br/> await page.RunAndWaitForRequestAsync(async () =><br/> {<br/> await page.GetByText("trigger request").ClickAsync();<br/> }, request => request.Url == "https://example.com" && request.Method == "GET"); </code> </summary> <param name="urlOrPredicate"> Request URL string, regex or predicate receiving <see cref="T:Microsoft.Playwright.IRequest"/> object. When a <see cref="M:Microsoft.Playwright.IBrowser.NewContextAsync(Microsoft.Playwright.BrowserNewContextOptions)"/> via the context options was provided and the passed URL is a path, it gets merged via the <a href="https://developer.mozilla.org/en-US/docs/Web/API/URL/URL"><c>new URL()</c></a> constructor. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.WaitForRequestAsync(System.Text.RegularExpressions.Regex,Microsoft.Playwright.PageWaitForRequestOptions)"> <summary> <para> Waits for the matching request and returns it. See <a href="https://playwright.dev/dotnet/docs/events#waiting-for-event">waiting for event</a> for more details about events. </para> <para>**Usage**</para> <code> // Waits for the next request with the specified url.<br/> await page.RunAndWaitForRequestAsync(async () =><br/> {<br/> await page.GetByText("trigger request").ClickAsync();<br/> }, "http://example.com/resource");<br/> <br/> // Alternative way with a predicate.<br/> await page.RunAndWaitForRequestAsync(async () =><br/> {<br/> await page.GetByText("trigger request").ClickAsync();<br/> }, request => request.Url == "https://example.com" && request.Method == "GET"); </code> </summary> <param name="urlOrPredicate"> Request URL string, regex or predicate receiving <see cref="T:Microsoft.Playwright.IRequest"/> object. When a <see cref="M:Microsoft.Playwright.IBrowser.NewContextAsync(Microsoft.Playwright.BrowserNewContextOptions)"/> via the context options was provided and the passed URL is a path, it gets merged via the <a href="https://developer.mozilla.org/en-US/docs/Web/API/URL/URL"><c>new URL()</c></a> constructor. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.WaitForRequestAsync(System.Func{Microsoft.Playwright.IRequest,System.Boolean},Microsoft.Playwright.PageWaitForRequestOptions)"> <summary> <para> Waits for the matching request and returns it. See <a href="https://playwright.dev/dotnet/docs/events#waiting-for-event">waiting for event</a> for more details about events. </para> <para>**Usage**</para> <code> // Waits for the next request with the specified url.<br/> await page.RunAndWaitForRequestAsync(async () =><br/> {<br/> await page.GetByText("trigger request").ClickAsync();<br/> }, "http://example.com/resource");<br/> <br/> // Alternative way with a predicate.<br/> await page.RunAndWaitForRequestAsync(async () =><br/> {<br/> await page.GetByText("trigger request").ClickAsync();<br/> }, request => request.Url == "https://example.com" && request.Method == "GET"); </code> </summary> <param name="urlOrPredicate"> Request URL string, regex or predicate receiving <see cref="T:Microsoft.Playwright.IRequest"/> object. When a <see cref="M:Microsoft.Playwright.IBrowser.NewContextAsync(Microsoft.Playwright.BrowserNewContextOptions)"/> via the context options was provided and the passed URL is a path, it gets merged via the <a href="https://developer.mozilla.org/en-US/docs/Web/API/URL/URL"><c>new URL()</c></a> constructor. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.RunAndWaitForRequestAsync(System.Func{System.Threading.Tasks.Task},System.String,Microsoft.Playwright.PageRunAndWaitForRequestOptions)"> <summary> <para> Waits for the matching request and returns it. See <a href="https://playwright.dev/dotnet/docs/events#waiting-for-event">waiting for event</a> for more details about events. </para> <para>**Usage**</para> <code> // Waits for the next request with the specified url.<br/> await page.RunAndWaitForRequestAsync(async () =><br/> {<br/> await page.GetByText("trigger request").ClickAsync();<br/> }, "http://example.com/resource");<br/> <br/> // Alternative way with a predicate.<br/> await page.RunAndWaitForRequestAsync(async () =><br/> {<br/> await page.GetByText("trigger request").ClickAsync();<br/> }, request => request.Url == "https://example.com" && request.Method == "GET"); </code> </summary> <param name="action">Action that triggers the event.</param> <param name="urlOrPredicate"> Request URL string, regex or predicate receiving <see cref="T:Microsoft.Playwright.IRequest"/> object. When a <see cref="M:Microsoft.Playwright.IBrowser.NewContextAsync(Microsoft.Playwright.BrowserNewContextOptions)"/> via the context options was provided and the passed URL is a path, it gets merged via the <a href="https://developer.mozilla.org/en-US/docs/Web/API/URL/URL"><c>new URL()</c></a> constructor. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.RunAndWaitForRequestAsync(System.Func{System.Threading.Tasks.Task},System.Text.RegularExpressions.Regex,Microsoft.Playwright.PageRunAndWaitForRequestOptions)"> <summary> <para> Waits for the matching request and returns it. See <a href="https://playwright.dev/dotnet/docs/events#waiting-for-event">waiting for event</a> for more details about events. </para> <para>**Usage**</para> <code> // Waits for the next request with the specified url.<br/> await page.RunAndWaitForRequestAsync(async () =><br/> {<br/> await page.GetByText("trigger request").ClickAsync();<br/> }, "http://example.com/resource");<br/> <br/> // Alternative way with a predicate.<br/> await page.RunAndWaitForRequestAsync(async () =><br/> {<br/> await page.GetByText("trigger request").ClickAsync();<br/> }, request => request.Url == "https://example.com" && request.Method == "GET"); </code> </summary> <param name="action">Action that triggers the event.</param> <param name="urlOrPredicate"> Request URL string, regex or predicate receiving <see cref="T:Microsoft.Playwright.IRequest"/> object. When a <see cref="M:Microsoft.Playwright.IBrowser.NewContextAsync(Microsoft.Playwright.BrowserNewContextOptions)"/> via the context options was provided and the passed URL is a path, it gets merged via the <a href="https://developer.mozilla.org/en-US/docs/Web/API/URL/URL"><c>new URL()</c></a> constructor. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.RunAndWaitForRequestAsync(System.Func{System.Threading.Tasks.Task},System.Func{Microsoft.Playwright.IRequest,System.Boolean},Microsoft.Playwright.PageRunAndWaitForRequestOptions)"> <summary> <para> Waits for the matching request and returns it. See <a href="https://playwright.dev/dotnet/docs/events#waiting-for-event">waiting for event</a> for more details about events. </para> <para>**Usage**</para> <code> // Waits for the next request with the specified url.<br/> await page.RunAndWaitForRequestAsync(async () =><br/> {<br/> await page.GetByText("trigger request").ClickAsync();<br/> }, "http://example.com/resource");<br/> <br/> // Alternative way with a predicate.<br/> await page.RunAndWaitForRequestAsync(async () =><br/> {<br/> await page.GetByText("trigger request").ClickAsync();<br/> }, request => request.Url == "https://example.com" && request.Method == "GET"); </code> </summary> <param name="action">Action that triggers the event.</param> <param name="urlOrPredicate"> Request URL string, regex or predicate receiving <see cref="T:Microsoft.Playwright.IRequest"/> object. When a <see cref="M:Microsoft.Playwright.IBrowser.NewContextAsync(Microsoft.Playwright.BrowserNewContextOptions)"/> via the context options was provided and the passed URL is a path, it gets merged via the <a href="https://developer.mozilla.org/en-US/docs/Web/API/URL/URL"><c>new URL()</c></a> constructor. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.WaitForRequestFinishedAsync(Microsoft.Playwright.PageWaitForRequestFinishedOptions)"> <summary> <para> Performs action and waits for a <see cref="T:Microsoft.Playwright.IRequest"/> to finish loading. If predicate is provided, it passes <see cref="T:Microsoft.Playwright.IRequest"/> value into the <c>predicate</c> function and waits for <c>predicate(request)</c> to return a truthy value. Will throw an error if the page is closed before the <see cref="E:Microsoft.Playwright.IPage.RequestFinished"/> event is fired. </para> </summary> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.RunAndWaitForRequestFinishedAsync(System.Func{System.Threading.Tasks.Task},Microsoft.Playwright.PageRunAndWaitForRequestFinishedOptions)"> <summary> <para> Performs action and waits for a <see cref="T:Microsoft.Playwright.IRequest"/> to finish loading. If predicate is provided, it passes <see cref="T:Microsoft.Playwright.IRequest"/> value into the <c>predicate</c> function and waits for <c>predicate(request)</c> to return a truthy value. Will throw an error if the page is closed before the <see cref="E:Microsoft.Playwright.IPage.RequestFinished"/> event is fired. </para> </summary> <param name="action">Action that triggers the event.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.WaitForResponseAsync(System.String,Microsoft.Playwright.PageWaitForResponseOptions)"> <summary> <para> Returns the matched response. See <a href="https://playwright.dev/dotnet/docs/events#waiting-for-event">waiting for event</a> for more details about events. </para> <para>**Usage**</para> <code> // Waits for the next response with the specified url.<br/> await page.RunAndWaitForResponseAsync(async () =><br/> {<br/> await page.GetByText("trigger response").ClickAsync();<br/> }, "http://example.com/resource");<br/> <br/> // Alternative way with a predicate.<br/> await page.RunAndWaitForResponseAsync(async () =><br/> {<br/> await page.GetByText("trigger response").ClickAsync();<br/> }, response => response.Url == "https://example.com" && response.Status == 200 && response.Request.Method == "GET"); </code> </summary> <param name="urlOrPredicate"> Request URL string, regex or predicate receiving <see cref="T:Microsoft.Playwright.IResponse"/> object. When a <see cref="M:Microsoft.Playwright.IBrowser.NewContextAsync(Microsoft.Playwright.BrowserNewContextOptions)"/> via the context options was provided and the passed URL is a path, it gets merged via the <a href="https://developer.mozilla.org/en-US/docs/Web/API/URL/URL"><c>new URL()</c></a> constructor. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.WaitForResponseAsync(System.Text.RegularExpressions.Regex,Microsoft.Playwright.PageWaitForResponseOptions)"> <summary> <para> Returns the matched response. See <a href="https://playwright.dev/dotnet/docs/events#waiting-for-event">waiting for event</a> for more details about events. </para> <para>**Usage**</para> <code> // Waits for the next response with the specified url.<br/> await page.RunAndWaitForResponseAsync(async () =><br/> {<br/> await page.GetByText("trigger response").ClickAsync();<br/> }, "http://example.com/resource");<br/> <br/> // Alternative way with a predicate.<br/> await page.RunAndWaitForResponseAsync(async () =><br/> {<br/> await page.GetByText("trigger response").ClickAsync();<br/> }, response => response.Url == "https://example.com" && response.Status == 200 && response.Request.Method == "GET"); </code> </summary> <param name="urlOrPredicate"> Request URL string, regex or predicate receiving <see cref="T:Microsoft.Playwright.IResponse"/> object. When a <see cref="M:Microsoft.Playwright.IBrowser.NewContextAsync(Microsoft.Playwright.BrowserNewContextOptions)"/> via the context options was provided and the passed URL is a path, it gets merged via the <a href="https://developer.mozilla.org/en-US/docs/Web/API/URL/URL"><c>new URL()</c></a> constructor. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.WaitForResponseAsync(System.Func{Microsoft.Playwright.IResponse,System.Boolean},Microsoft.Playwright.PageWaitForResponseOptions)"> <summary> <para> Returns the matched response. See <a href="https://playwright.dev/dotnet/docs/events#waiting-for-event">waiting for event</a> for more details about events. </para> <para>**Usage**</para> <code> // Waits for the next response with the specified url.<br/> await page.RunAndWaitForResponseAsync(async () =><br/> {<br/> await page.GetByText("trigger response").ClickAsync();<br/> }, "http://example.com/resource");<br/> <br/> // Alternative way with a predicate.<br/> await page.RunAndWaitForResponseAsync(async () =><br/> {<br/> await page.GetByText("trigger response").ClickAsync();<br/> }, response => response.Url == "https://example.com" && response.Status == 200 && response.Request.Method == "GET"); </code> </summary> <param name="urlOrPredicate"> Request URL string, regex or predicate receiving <see cref="T:Microsoft.Playwright.IResponse"/> object. When a <see cref="M:Microsoft.Playwright.IBrowser.NewContextAsync(Microsoft.Playwright.BrowserNewContextOptions)"/> via the context options was provided and the passed URL is a path, it gets merged via the <a href="https://developer.mozilla.org/en-US/docs/Web/API/URL/URL"><c>new URL()</c></a> constructor. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.RunAndWaitForResponseAsync(System.Func{System.Threading.Tasks.Task},System.String,Microsoft.Playwright.PageRunAndWaitForResponseOptions)"> <summary> <para> Returns the matched response. See <a href="https://playwright.dev/dotnet/docs/events#waiting-for-event">waiting for event</a> for more details about events. </para> <para>**Usage**</para> <code> // Waits for the next response with the specified url.<br/> await page.RunAndWaitForResponseAsync(async () =><br/> {<br/> await page.GetByText("trigger response").ClickAsync();<br/> }, "http://example.com/resource");<br/> <br/> // Alternative way with a predicate.<br/> await page.RunAndWaitForResponseAsync(async () =><br/> {<br/> await page.GetByText("trigger response").ClickAsync();<br/> }, response => response.Url == "https://example.com" && response.Status == 200 && response.Request.Method == "GET"); </code> </summary> <param name="action">Action that triggers the event.</param> <param name="urlOrPredicate"> Request URL string, regex or predicate receiving <see cref="T:Microsoft.Playwright.IResponse"/> object. When a <see cref="M:Microsoft.Playwright.IBrowser.NewContextAsync(Microsoft.Playwright.BrowserNewContextOptions)"/> via the context options was provided and the passed URL is a path, it gets merged via the <a href="https://developer.mozilla.org/en-US/docs/Web/API/URL/URL"><c>new URL()</c></a> constructor. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.RunAndWaitForResponseAsync(System.Func{System.Threading.Tasks.Task},System.Text.RegularExpressions.Regex,Microsoft.Playwright.PageRunAndWaitForResponseOptions)"> <summary> <para> Returns the matched response. See <a href="https://playwright.dev/dotnet/docs/events#waiting-for-event">waiting for event</a> for more details about events. </para> <para>**Usage**</para> <code> // Waits for the next response with the specified url.<br/> await page.RunAndWaitForResponseAsync(async () =><br/> {<br/> await page.GetByText("trigger response").ClickAsync();<br/> }, "http://example.com/resource");<br/> <br/> // Alternative way with a predicate.<br/> await page.RunAndWaitForResponseAsync(async () =><br/> {<br/> await page.GetByText("trigger response").ClickAsync();<br/> }, response => response.Url == "https://example.com" && response.Status == 200 && response.Request.Method == "GET"); </code> </summary> <param name="action">Action that triggers the event.</param> <param name="urlOrPredicate"> Request URL string, regex or predicate receiving <see cref="T:Microsoft.Playwright.IResponse"/> object. When a <see cref="M:Microsoft.Playwright.IBrowser.NewContextAsync(Microsoft.Playwright.BrowserNewContextOptions)"/> via the context options was provided and the passed URL is a path, it gets merged via the <a href="https://developer.mozilla.org/en-US/docs/Web/API/URL/URL"><c>new URL()</c></a> constructor. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.RunAndWaitForResponseAsync(System.Func{System.Threading.Tasks.Task},System.Func{Microsoft.Playwright.IResponse,System.Boolean},Microsoft.Playwright.PageRunAndWaitForResponseOptions)"> <summary> <para> Returns the matched response. See <a href="https://playwright.dev/dotnet/docs/events#waiting-for-event">waiting for event</a> for more details about events. </para> <para>**Usage**</para> <code> // Waits for the next response with the specified url.<br/> await page.RunAndWaitForResponseAsync(async () =><br/> {<br/> await page.GetByText("trigger response").ClickAsync();<br/> }, "http://example.com/resource");<br/> <br/> // Alternative way with a predicate.<br/> await page.RunAndWaitForResponseAsync(async () =><br/> {<br/> await page.GetByText("trigger response").ClickAsync();<br/> }, response => response.Url == "https://example.com" && response.Status == 200 && response.Request.Method == "GET"); </code> </summary> <param name="action">Action that triggers the event.</param> <param name="urlOrPredicate"> Request URL string, regex or predicate receiving <see cref="T:Microsoft.Playwright.IResponse"/> object. When a <see cref="M:Microsoft.Playwright.IBrowser.NewContextAsync(Microsoft.Playwright.BrowserNewContextOptions)"/> via the context options was provided and the passed URL is a path, it gets merged via the <a href="https://developer.mozilla.org/en-US/docs/Web/API/URL/URL"><c>new URL()</c></a> constructor. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.WaitForSelectorAsync(System.String,Microsoft.Playwright.PageWaitForSelectorOptions)"> <summary> <para> Use web assertions that assert visibility or a locator-based <see cref="M:Microsoft.Playwright.ILocator.WaitForAsync(Microsoft.Playwright.LocatorWaitForOptions)"/> instead. Read more about <a href="https://playwright.dev/dotnet/docs/locators">locators</a>. </para> <para> Returns when element specified by selector satisfies <see cref="M:Microsoft.Playwright.IPage.WaitForSelectorAsync(System.String,Microsoft.Playwright.PageWaitForSelectorOptions)"/> option. Returns <c>null</c> if waiting for <c>hidden</c> or <c>detached</c>. </para> <para> Playwright automatically waits for element to be ready before performing an action. Using <see cref="T:Microsoft.Playwright.ILocator"/> objects and web-first assertions makes the code wait-for-selector-free. </para> <para> Wait for the <see cref="M:Microsoft.Playwright.IPage.WaitForSelectorAsync(System.String,Microsoft.Playwright.PageWaitForSelectorOptions)"/> to satisfy <see cref="M:Microsoft.Playwright.IPage.WaitForSelectorAsync(System.String,Microsoft.Playwright.PageWaitForSelectorOptions)"/> option (either appear/disappear from dom, or become visible/hidden). If at the moment of calling the method <see cref="M:Microsoft.Playwright.IPage.WaitForSelectorAsync(System.String,Microsoft.Playwright.PageWaitForSelectorOptions)"/> already satisfies the condition, the method will return immediately. If the selector doesn't satisfy the condition for the <see cref="M:Microsoft.Playwright.IPage.WaitForSelectorAsync(System.String,Microsoft.Playwright.PageWaitForSelectorOptions)"/> milliseconds, the function will throw. </para> <para>**Usage**</para> <para>This method works across navigations:</para> <code> using Microsoft.Playwright;<br/> using System;<br/> using System.Threading.Tasks;<br/> <br/> class FrameExamples<br/> {<br/> public static async Task Images()<br/> {<br/> using var playwright = await Playwright.CreateAsync();<br/> await using var browser = await playwright.Chromium.LaunchAsync();<br/> var page = await browser.NewPageAsync();<br/> <br/> foreach (var currentUrl in new[] { "https://www.google.com", "https://bbc.com" })<br/> {<br/> await page.GotoAsync(currentUrl);<br/> var element = await page.WaitForSelectorAsync("img");<br/> Console.WriteLine($"Loaded image: {await element.GetAttributeAsync("src")}");<br/> }<br/> <br/> await browser.CloseAsync();<br/> }<br/> } </code> </summary> <remarks> <para> Playwright automatically waits for element to be ready before performing an action. Using <see cref="T:Microsoft.Playwright.ILocator"/> objects and web-first assertions makes the code wait-for-selector-free. </para> </remarks> <param name="selector">A selector to query for.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.WaitForTimeoutAsync(System.Single)"> <summary> <para> Never wait for timeout in production. Tests that wait for time are inherently flaky. Use <see cref="T:Microsoft.Playwright.ILocator"/> actions and web assertions that wait automatically. </para> <para>Waits for the given <see cref="M:Microsoft.Playwright.IPage.WaitForTimeoutAsync(System.Single)"/> in milliseconds.</para> <para> Note that <c>page.waitForTimeout()</c> should only be used for debugging. Tests using the timer in production are going to be flaky. Use signals such as network events, selectors becoming visible and others instead. </para> <para>**Usage**</para> <code> // Wait for 1 second<br/> await page.WaitForTimeoutAsync(1000); </code> </summary> <param name="timeout">A timeout to wait for</param> </member> <member name="M:Microsoft.Playwright.IPage.WaitForURLAsync(System.String,Microsoft.Playwright.PageWaitForURLOptions)"> <summary> <para>Waits for the main frame to navigate to the given URL.</para> <para>**Usage**</para> <code> await page.ClickAsync("a.delayed-navigation"); // clicking the link will indirectly cause a navigation<br/> await page.WaitForURLAsync("**/target.html"); </code> </summary> <param name="url"> A glob pattern, regex pattern or predicate receiving <see cref="!:URL"/> to match while waiting for the navigation. Note that if the parameter is a string without wildcard characters, the method will wait for navigation to URL that is exactly equal to the string. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.WaitForURLAsync(System.Text.RegularExpressions.Regex,Microsoft.Playwright.PageWaitForURLOptions)"> <summary> <para>Waits for the main frame to navigate to the given URL.</para> <para>**Usage**</para> <code> await page.ClickAsync("a.delayed-navigation"); // clicking the link will indirectly cause a navigation<br/> await page.WaitForURLAsync("**/target.html"); </code> </summary> <param name="url"> A glob pattern, regex pattern or predicate receiving <see cref="!:URL"/> to match while waiting for the navigation. Note that if the parameter is a string without wildcard characters, the method will wait for navigation to URL that is exactly equal to the string. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.WaitForURLAsync(System.Func{System.String,System.Boolean},Microsoft.Playwright.PageWaitForURLOptions)"> <summary> <para>Waits for the main frame to navigate to the given URL.</para> <para>**Usage**</para> <code> await page.ClickAsync("a.delayed-navigation"); // clicking the link will indirectly cause a navigation<br/> await page.WaitForURLAsync("**/target.html"); </code> </summary> <param name="url"> A glob pattern, regex pattern or predicate receiving <see cref="!:URL"/> to match while waiting for the navigation. Note that if the parameter is a string without wildcard characters, the method will wait for navigation to URL that is exactly equal to the string. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.WaitForWebSocketAsync(Microsoft.Playwright.PageWaitForWebSocketOptions)"> <summary> <para> Performs action and waits for a new <see cref="T:Microsoft.Playwright.IWebSocket"/>. If predicate is provided, it passes <see cref="T:Microsoft.Playwright.IWebSocket"/> value into the <c>predicate</c> function and waits for <c>predicate(webSocket)</c> to return a truthy value. Will throw an error if the page is closed before the WebSocket event is fired. </para> </summary> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.RunAndWaitForWebSocketAsync(System.Func{System.Threading.Tasks.Task},Microsoft.Playwright.PageRunAndWaitForWebSocketOptions)"> <summary> <para> Performs action and waits for a new <see cref="T:Microsoft.Playwright.IWebSocket"/>. If predicate is provided, it passes <see cref="T:Microsoft.Playwright.IWebSocket"/> value into the <c>predicate</c> function and waits for <c>predicate(webSocket)</c> to return a truthy value. Will throw an error if the page is closed before the WebSocket event is fired. </para> </summary> <param name="action">Action that triggers the event.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.WaitForWorkerAsync(Microsoft.Playwright.PageWaitForWorkerOptions)"> <summary> <para> Performs action and waits for a new <see cref="T:Microsoft.Playwright.IWorker"/>. If predicate is provided, it passes <see cref="T:Microsoft.Playwright.IWorker"/> value into the <c>predicate</c> function and waits for <c>predicate(worker)</c> to return a truthy value. Will throw an error if the page is closed before the worker event is fired. </para> </summary> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPage.RunAndWaitForWorkerAsync(System.Func{System.Threading.Tasks.Task},Microsoft.Playwright.PageRunAndWaitForWorkerOptions)"> <summary> <para> Performs action and waits for a new <see cref="T:Microsoft.Playwright.IWorker"/>. If predicate is provided, it passes <see cref="T:Microsoft.Playwright.IWorker"/> value into the <c>predicate</c> function and waits for <c>predicate(worker)</c> to return a truthy value. Will throw an error if the page is closed before the worker event is fired. </para> </summary> <param name="action">Action that triggers the event.</param> <param name="options">Call options</param> </member> <member name="P:Microsoft.Playwright.IPage.Workers"> <summary> <para> This method returns all of the dedicated <a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API">WebWorkers</a> associated with the page. </para> <para>This does not contain ServiceWorkers</para> </summary> <remarks><para>This does not contain ServiceWorkers</para></remarks> </member> <member name="M:Microsoft.Playwright.IPage.RouteAsync(System.String,System.Func{Microsoft.Playwright.IRoute,System.Threading.Tasks.Task},Microsoft.Playwright.PageRouteOptions)"> <inheritdoc cref="M:Microsoft.Playwright.IPage.RouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.PageRouteOptions)"/> </member> <member name="M:Microsoft.Playwright.IPage.RouteAsync(System.Text.RegularExpressions.Regex,System.Func{Microsoft.Playwright.IRoute,System.Threading.Tasks.Task},Microsoft.Playwright.PageRouteOptions)"> <inheritdoc cref="M:Microsoft.Playwright.IPage.RouteAsync(System.Text.RegularExpressions.Regex,System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.PageRouteOptions)"/> </member> <member name="M:Microsoft.Playwright.IPage.RouteAsync(System.Func{System.String,System.Boolean},System.Func{Microsoft.Playwright.IRoute,System.Threading.Tasks.Task},Microsoft.Playwright.PageRouteOptions)"> <inheritdoc cref="M:Microsoft.Playwright.IPage.RouteAsync(System.Func{System.String,System.Boolean},System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.PageRouteOptions)"/> </member> <member name="M:Microsoft.Playwright.IPage.UnrouteAsync(System.String,System.Func{Microsoft.Playwright.IRoute,System.Threading.Tasks.Task})"> <inheritdoc cref="M:Microsoft.Playwright.IPage.UnrouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute})"/> </member> <member name="M:Microsoft.Playwright.IPage.UnrouteAsync(System.Text.RegularExpressions.Regex,System.Func{Microsoft.Playwright.IRoute,System.Threading.Tasks.Task})"> <inheritdoc cref="M:Microsoft.Playwright.IPage.UnrouteAsync(System.Text.RegularExpressions.Regex,System.Action{Microsoft.Playwright.IRoute})"/> </member> <member name="M:Microsoft.Playwright.IPage.UnrouteAsync(System.Func{System.String,System.Boolean},System.Func{Microsoft.Playwright.IRoute,System.Threading.Tasks.Task})"> <inheritdoc cref="M:Microsoft.Playwright.IPage.UnrouteAsync(System.Func{System.String,System.Boolean},System.Action{Microsoft.Playwright.IRoute})"/> </member> <member name="M:Microsoft.Playwright.IPage.AddLocatorHandlerAsync(Microsoft.Playwright.ILocator,System.Func{System.Threading.Tasks.Task},Microsoft.Playwright.PageAddLocatorHandlerOptions)"> <inheritdoc cref="M:Microsoft.Playwright.IPage.AddLocatorHandlerAsync(Microsoft.Playwright.ILocator,System.Func{Microsoft.Playwright.ILocator,System.Threading.Tasks.Task},Microsoft.Playwright.PageAddLocatorHandlerOptions)" /> </member> <member name="T:Microsoft.Playwright.IPageAssertions"> <summary> <para> The <see cref="T:Microsoft.Playwright.IPageAssertions"/> class provides assertion methods that can be used to make assertions about the <see cref="T:Microsoft.Playwright.IPage"/> state in the tests. </para> <code> using System.Text.RegularExpressions;<br/> using Microsoft.Playwright;<br/> using Microsoft.Playwright.MSTest;<br/> <br/> namespace PlaywrightTests;<br/> <br/> [TestClass]<br/> public class ExampleTests : PageTest<br/> {<br/> [TestMethod]<br/> public async Task NavigateToLoginPage()<br/> {<br/> await Page.GetByRole(AriaRole.Button, new() { Name = "Sign In" }).ClickAsync();<br/> await Expect(Page).ToHaveURLAsync(new Regex(".*/login"));<br/> }<br/> } </code> </summary> </member> <member name="P:Microsoft.Playwright.IPageAssertions.Not"> <summary> <para> Makes the assertion check for the opposite condition. For example, this code tests that the page URL doesn't contain <c>"error"</c>: </para> <code>await Expect(Page).Not.ToHaveURLAsync("error");</code> </summary> </member> <member name="M:Microsoft.Playwright.IPageAssertions.ToHaveTitleAsync(System.String,Microsoft.Playwright.PageAssertionsToHaveTitleOptions)"> <summary> <para>Ensures the page has the given title.</para> <para>**Usage**</para> <code>await Expect(Page).ToHaveTitleAsync("Playwright");</code> </summary> <param name="titleOrRegExp">Expected title or RegExp.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPageAssertions.ToHaveTitleAsync(System.Text.RegularExpressions.Regex,Microsoft.Playwright.PageAssertionsToHaveTitleOptions)"> <summary> <para>Ensures the page has the given title.</para> <para>**Usage**</para> <code>await Expect(Page).ToHaveTitleAsync("Playwright");</code> </summary> <param name="titleOrRegExp">Expected title or RegExp.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPageAssertions.ToHaveURLAsync(System.String,Microsoft.Playwright.PageAssertionsToHaveURLOptions)"> <summary> <para>Ensures the page is navigated to the given URL.</para> <para>**Usage**</para> <code>await Expect(Page).ToHaveURLAsync(new Regex(".*checkout"));</code> </summary> <param name="urlOrRegExp">Expected URL string or RegExp.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IPageAssertions.ToHaveURLAsync(System.Text.RegularExpressions.Regex,Microsoft.Playwright.PageAssertionsToHaveURLOptions)"> <summary> <para>Ensures the page is navigated to the given URL.</para> <para>**Usage**</para> <code>await Expect(Page).ToHaveURLAsync(new Regex(".*checkout"));</code> </summary> <param name="urlOrRegExp">Expected URL string or RegExp.</param> <param name="options">Call options</param> </member> <member name="T:Microsoft.Playwright.IPlaywright"> <summary> <para> Playwright module provides a method to launch a browser instance. The following is a typical example of using Playwright to drive automation: </para> <code> using Microsoft.Playwright;<br/> using System.Threading.Tasks;<br/> <br/> class PlaywrightExample<br/> {<br/> public static async Task Main()<br/> {<br/> using var playwright = await Playwright.CreateAsync();<br/> await using var browser = await playwright.Chromium.LaunchAsync();<br/> var page = await browser.NewPageAsync();<br/> <br/> await page.GotoAsync("https://www.microsoft.com");<br/> // other actions...<br/> }<br/> } </code> </summary> <summary> The main entry point for Playwright. </summary> </member> <member name="P:Microsoft.Playwright.IPlaywright.Chromium"> <summary> <para> This object can be used to launch or connect to Chromium, returning instances of <see cref="T:Microsoft.Playwright.IBrowser"/>. </para> </summary> </member> <member name="P:Microsoft.Playwright.IPlaywright.Devices"> <summary> <para> Returns a dictionary of devices to be used with <see cref="M:Microsoft.Playwright.IBrowser.NewContextAsync(Microsoft.Playwright.BrowserNewContextOptions)"/> or <see cref="M:Microsoft.Playwright.IBrowser.NewPageAsync(Microsoft.Playwright.BrowserNewPageOptions)"/>. </para> <code> using Microsoft.Playwright;<br/> using System.Threading.Tasks;<br/> <br/> class PlaywrightExample<br/> {<br/> public static async Task Main()<br/> {<br/> using var playwright = await Playwright.CreateAsync();<br/> await using var browser = await playwright.Webkit.LaunchAsync();<br/> await using var context = await browser.NewContextAsync(playwright.Devices["iPhone 6"]);<br/> <br/> var page = await context.NewPageAsync();<br/> await page.GotoAsync("https://www.theverge.com");<br/> // other actions...<br/> }<br/> } </code> </summary> </member> <member name="P:Microsoft.Playwright.IPlaywright.Firefox"> <summary> <para> This object can be used to launch or connect to Firefox, returning instances of <see cref="T:Microsoft.Playwright.IBrowser"/>. </para> </summary> </member> <member name="P:Microsoft.Playwright.IPlaywright.APIRequest"> <summary><para>Exposes API that can be used for the Web API testing.</para></summary> </member> <member name="P:Microsoft.Playwright.IPlaywright.Selectors"> <summary> <para> Selectors can be used to install custom selector engines. See <a href="https://playwright.dev/dotnet/docs/extensibility">extensibility</a> for more information. </para> </summary> </member> <member name="P:Microsoft.Playwright.IPlaywright.Webkit"> <summary> <para> This object can be used to launch or connect to WebKit, returning instances of <see cref="T:Microsoft.Playwright.IBrowser"/>. </para> </summary> </member> <member name="P:Microsoft.Playwright.IPlaywright.Item(System.String)"> <summary> Gets a <see cref="T:Microsoft.Playwright.IBrowserType"/>. </summary> <param name="browserType"><see cref="T:Microsoft.Playwright.IBrowserType"/> name. You can get the names from <see cref="T:Microsoft.Playwright.BrowserType"/>. e.g.: <see cref="F:Microsoft.Playwright.BrowserType.Chromium"/>, <see cref="F:Microsoft.Playwright.BrowserType.Firefox"/> or <see cref="F:Microsoft.Playwright.BrowserType.Webkit"/>. </param> </member> <member name="T:Microsoft.Playwright.IPlaywrightAssertions"> <summary> <para> Playwright gives you Web-First Assertions with convenience methods for creating assertions that will wait and retry until the expected condition is met. </para> <para>Consider the following example:</para> <code> using Microsoft.Playwright;<br/> using Microsoft.Playwright.MSTest;<br/> <br/> namespace PlaywrightTests;<br/> <br/> [TestClass]<br/> public class ExampleTests : PageTest<br/> {<br/> [TestMethod]<br/> public async Task StatusBecomesSubmitted()<br/> {<br/> await Page.GetByRole(AriaRole.Button, new() { Name = "Submit" }).ClickAsync();<br/> await Expect(Page.Locator(".status")).ToHaveTextAsync("Submitted");<br/> }<br/> } </code> <para> Playwright will be re-testing the node with the selector <c>.status</c> until fetched Node has the <c>"Submitted"</c> text. It will be re-fetching the node and checking it over and over, until the condition is met or until the timeout is reached. You can pass this timeout as an option. </para> <para>By default, the timeout for assertions is set to 5 seconds.</para> </summary> </member> <member name="M:Microsoft.Playwright.IPlaywrightAssertions.Expect(Microsoft.Playwright.IAPIResponse)"> <summary> <para>Creates a <see cref="T:Microsoft.Playwright.IAPIResponseAssertions"/> object for the given <see cref="T:Microsoft.Playwright.IAPIResponse"/>.</para> <para>**Usage**</para> </summary> <param name="response"><see cref="T:Microsoft.Playwright.IAPIResponse"/> object to use for assertions.</param> </member> <member name="M:Microsoft.Playwright.IPlaywrightAssertions.Expect(Microsoft.Playwright.ILocator)"> <summary> <para>Creates a <see cref="T:Microsoft.Playwright.ILocatorAssertions"/> object for the given <see cref="T:Microsoft.Playwright.ILocator"/>.</para> <para>**Usage**</para> <code>await Expect(locator).ToBeVisibleAsync();</code> </summary> <param name="locator"><see cref="T:Microsoft.Playwright.ILocator"/> object to use for assertions.</param> </member> <member name="M:Microsoft.Playwright.IPlaywrightAssertions.Expect(Microsoft.Playwright.IPage)"> <summary> <para>Creates a <see cref="T:Microsoft.Playwright.IPageAssertions"/> object for the given <see cref="T:Microsoft.Playwright.IPage"/>.</para> <para>**Usage**</para> <code>await Expect(Page).ToHaveTitleAsync("News");</code> </summary> <param name="page"><see cref="T:Microsoft.Playwright.IPage"/> object to use for assertions.</param> </member> <member name="T:Microsoft.Playwright.IRequest"> <summary> <para> Whenever the page sends a request for a network resource the following sequence of events are emitted by <see cref="T:Microsoft.Playwright.IPage"/>: </para> <list type="bullet"> <item><description><see cref="E:Microsoft.Playwright.IPage.Request"/> emitted when the request is issued by the page.</description></item> <item><description> <see cref="E:Microsoft.Playwright.IPage.Response"/> emitted when/if the response status and headers are received for the request. </description></item> <item><description> <see cref="E:Microsoft.Playwright.IPage.RequestFinished"/> emitted when the response body is downloaded and the request is complete. </description></item> </list> <para> If request fails at some point, then instead of <c>'requestfinished'</c> event (and possibly instead of 'response' event), the <see cref="E:Microsoft.Playwright.IPage.RequestFailed"/> event is emitted. </para> <para> HTTP Error responses, such as 404 or 503, are still successful responses from HTTP standpoint, so request will complete with <c>'requestfinished'</c> event. </para> <para> If request gets a 'redirect' response, the request is successfully finished with the <c>requestfinished</c> event, and a new request is issued to a redirected url. </para> </summary> <remarks> <para> HTTP Error responses, such as 404 or 503, are still successful responses from HTTP standpoint, so request will complete with <c>'requestfinished'</c> event. </para> </remarks> </member> <member name="M:Microsoft.Playwright.IRequest.AllHeadersAsync"> <summary> <para> An object with all the request HTTP headers associated with this request. The header names are lower-cased. </para> </summary> </member> <member name="P:Microsoft.Playwright.IRequest.Failure"> <summary> <para> The method returns <c>null</c> unless this request has failed, as reported by <c>requestfailed</c> event. </para> <para>**Usage**</para> <para>Example of logging of all the failed requests:</para> <code> page.RequestFailed += (_, request) =><br/> {<br/> Console.WriteLine(request.Failure);<br/> }; </code> </summary> </member> <member name="P:Microsoft.Playwright.IRequest.Frame"> <summary> <para>Returns the <see cref="T:Microsoft.Playwright.IFrame"/> that initiated this request.</para> <para>**Usage**</para> <code>var frameUrl = request.Frame.Url;</code> <para>**Details**</para> <para>Note that in some cases the frame is not available, and this method will throw.</para> <list type="bullet"> <item><description> When request originates in the Service Worker. You can use <c>request.serviceWorker()</c> to check that. </description></item> <item><description> When navigation request is issued before the corresponding frame is created. You can use <see cref="P:Microsoft.Playwright.IRequest.IsNavigationRequest"/> to check that. </description></item> </list> <para>Here is an example that handles all the cases:</para> </summary> </member> <member name="P:Microsoft.Playwright.IRequest.Headers"> <summary> <para> An object with the request HTTP headers. The header names are lower-cased. Note that this method does not return security-related headers, including cookie-related ones. You can use <see cref="M:Microsoft.Playwright.IRequest.AllHeadersAsync"/> for complete list of headers that include <c>cookie</c> information. </para> </summary> </member> <member name="M:Microsoft.Playwright.IRequest.HeadersArrayAsync"> <summary> <para> An array with all the request HTTP headers associated with this request. Unlike <see cref="M:Microsoft.Playwright.IRequest.AllHeadersAsync"/>, header names are NOT lower-cased. Headers with multiple entries, such as <c>Set-Cookie</c>, appear in the array multiple times. </para> </summary> </member> <member name="M:Microsoft.Playwright.IRequest.HeaderValueAsync(System.String)"> <summary><para>Returns the value of the header matching the name. The name is case-insensitive.</para></summary> <param name="name">Name of the header.</param> </member> <member name="P:Microsoft.Playwright.IRequest.IsNavigationRequest"> <summary> <para>Whether this request is driving frame's navigation.</para> <para> Some navigation requests are issued before the corresponding frame is created, and therefore do not have <see cref="P:Microsoft.Playwright.IRequest.Frame"/> available. </para> </summary> </member> <member name="P:Microsoft.Playwright.IRequest.Method"> <summary><para>Request's method (GET, POST, etc.)</para></summary> </member> <member name="P:Microsoft.Playwright.IRequest.PostData"> <summary><para>Request's post body, if any.</para></summary> </member> <member name="P:Microsoft.Playwright.IRequest.PostDataBuffer"> <summary><para>Request's post body in a binary form, if any.</para></summary> </member> <member name="M:Microsoft.Playwright.IRequest.PostDataJSON"> <summary> <para> Returns parsed request's body for <c>form-urlencoded</c> and JSON as a fallback if any. </para> <para> When the response is <c>application/x-www-form-urlencoded</c> then a key/value object of the values will be returned. Otherwise it will be parsed as JSON. </para> </summary> </member> <member name="P:Microsoft.Playwright.IRequest.RedirectedFrom"> <summary> <para>Request that was redirected by the server to this one, if any.</para> <para> When the server responds with a redirect, Playwright creates a new <see cref="T:Microsoft.Playwright.IRequest"/> object. The two requests are connected by <c>redirectedFrom()</c> and <c>redirectedTo()</c> methods. When multiple server redirects has happened, it is possible to construct the whole redirect chain by repeatedly calling <c>redirectedFrom()</c>. </para> <para>**Usage**</para> <para>For example, if the website <c>http://example.com</c> redirects to <c>https://example.com</c>:</para> <code> var response = await page.GotoAsync("http://www.microsoft.com");<br/> Console.WriteLine(response.Request.RedirectedFrom?.Url); // http://www.microsoft.com </code> <para>If the website <c>https://google.com</c> has no redirects:</para> <code> var response = await page.GotoAsync("https://www.google.com");<br/> Console.WriteLine(response.Request.RedirectedFrom?.Url); // null </code> </summary> </member> <member name="P:Microsoft.Playwright.IRequest.RedirectedTo"> <summary> <para>New request issued by the browser if the server responded with redirect.</para> <para>**Usage**</para> <para>This method is the opposite of <see cref="P:Microsoft.Playwright.IRequest.RedirectedFrom"/>:</para> <code>Console.WriteLine(request.RedirectedFrom?.RedirectedTo == request); // True</code> </summary> </member> <member name="P:Microsoft.Playwright.IRequest.ResourceType"> <summary> <para> Contains the request's resource type as it was perceived by the rendering engine. ResourceType will be one of the following: <c>document</c>, <c>stylesheet</c>, <c>image</c>, <c>media</c>, <c>font</c>, <c>script</c>, <c>texttrack</c>, <c>xhr</c>, <c>fetch</c>, <c>eventsource</c>, <c>websocket</c>, <c>manifest</c>, <c>other</c>. </para> </summary> </member> <member name="M:Microsoft.Playwright.IRequest.ResponseAsync"> <summary> <para> Returns the matching <see cref="T:Microsoft.Playwright.IResponse"/> object, or <c>null</c> if the response was not received due to error. </para> </summary> </member> <member name="M:Microsoft.Playwright.IRequest.SizesAsync"> <summary><para>Returns resource size information for given request.</para></summary> </member> <member name="P:Microsoft.Playwright.IRequest.Timing"> <summary> <para> Returns resource timing information for given request. Most of the timing values become available upon the response, <c>responseEnd</c> becomes available when request finishes. Find more information at <a href="https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming">Resource Timing API</a>. </para> <para>**Usage**</para> <code> var request = await page.RunAndWaitForRequestFinishedAsync(async () =><br/> {<br/> await page.GotoAsync("https://www.microsoft.com");<br/> });<br/> Console.WriteLine(request.Timing.ResponseEnd); </code> </summary> </member> <member name="P:Microsoft.Playwright.IRequest.Url"> <summary><para>URL of the request.</para></summary> </member> <member name="T:Microsoft.Playwright.IResponse"> <summary><para><see cref="T:Microsoft.Playwright.IResponse"/> class represents responses which are received by page.</para></summary> </member> <member name="M:Microsoft.Playwright.IResponse.AllHeadersAsync"> <summary><para>An object with all the response HTTP headers associated with this response.</para></summary> </member> <member name="M:Microsoft.Playwright.IResponse.BodyAsync"> <summary><para>Returns the buffer with response body.</para></summary> </member> <member name="M:Microsoft.Playwright.IResponse.FinishedAsync"> <summary><para>Waits for this response to finish, returns always <c>null</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.IResponse.Frame"> <summary><para>Returns the <see cref="T:Microsoft.Playwright.IFrame"/> that initiated this response.</para></summary> </member> <member name="P:Microsoft.Playwright.IResponse.FromServiceWorker"> <summary> <para> Indicates whether this Response was fulfilled by a Service Worker's Fetch Handler (i.e. via <a href="https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent/respondWith">FetchEvent.respondWith</a>). </para> </summary> </member> <member name="P:Microsoft.Playwright.IResponse.Headers"> <summary> <para> An object with the response HTTP headers. The header names are lower-cased. Note that this method does not return security-related headers, including cookie-related ones. You can use <see cref="M:Microsoft.Playwright.IResponse.AllHeadersAsync"/> for complete list of headers that include <c>cookie</c> information. </para> </summary> </member> <member name="M:Microsoft.Playwright.IResponse.HeadersArrayAsync"> <summary> <para> An array with all the request HTTP headers associated with this response. Unlike <see cref="M:Microsoft.Playwright.IResponse.AllHeadersAsync"/>, header names are NOT lower-cased. Headers with multiple entries, such as <c>Set-Cookie</c>, appear in the array multiple times. </para> </summary> </member> <member name="M:Microsoft.Playwright.IResponse.HeaderValueAsync(System.String)"> <summary> <para> Returns the value of the header matching the name. The name is case-insensitive. If multiple headers have the same name (except <c>set-cookie</c>), they are returned as a list separated by <c>, </c>. For <c>set-cookie</c>, the <c>\n</c> separator is used. If no headers are found, <c>null</c> is returned. </para> </summary> <param name="name">Name of the header.</param> </member> <member name="M:Microsoft.Playwright.IResponse.HeaderValuesAsync(System.String)"> <summary> <para> Returns all values of the headers matching the name, for example <c>set-cookie</c>. The name is case-insensitive. </para> </summary> <param name="name">Name of the header.</param> </member> <member name="M:Microsoft.Playwright.IResponse.JsonAsync"> <summary> <para>Returns the JSON representation of response body.</para> <para>This method will throw if the response body is not parsable via <c>JSON.parse</c>.</para> </summary> </member> <member name="P:Microsoft.Playwright.IResponse.Ok"> <summary> <para> Contains a boolean stating whether the response was successful (status in the range 200-299) or not. </para> </summary> </member> <member name="P:Microsoft.Playwright.IResponse.Request"> <summary><para>Returns the matching <see cref="T:Microsoft.Playwright.IRequest"/> object.</para></summary> </member> <member name="M:Microsoft.Playwright.IResponse.SecurityDetailsAsync"> <summary><para>Returns SSL and other security information.</para></summary> </member> <member name="M:Microsoft.Playwright.IResponse.ServerAddrAsync"> <summary><para>Returns the IP address and port of the server.</para></summary> </member> <member name="P:Microsoft.Playwright.IResponse.Status"> <summary><para>Contains the status code of the response (e.g., 200 for a success).</para></summary> </member> <member name="P:Microsoft.Playwright.IResponse.StatusText"> <summary><para>Contains the status text of the response (e.g. usually an "OK" for a success).</para></summary> </member> <member name="M:Microsoft.Playwright.IResponse.TextAsync"> <summary><para>Returns the text representation of response body.</para></summary> </member> <member name="P:Microsoft.Playwright.IResponse.Url"> <summary><para>Contains the URL of the response.</para></summary> </member> <member name="T:Microsoft.Playwright.IRoute"> <summary> <para> Whenever a network route is set up with <see cref="M:Microsoft.Playwright.IPage.RouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.PageRouteOptions)"/> or <see cref="M:Microsoft.Playwright.IBrowserContext.RouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.BrowserContextRouteOptions)"/>, the <c>Route</c> object allows to handle the route. </para> <para>Learn more about <a href="https://playwright.dev/dotnet/docs/network">networking</a>.</para> </summary> </member> <member name="M:Microsoft.Playwright.IRoute.AbortAsync(System.String)"> <summary><para>Aborts the route's request.</para></summary> <param name="errorCode"> Optional error code. Defaults to <c>failed</c>, could be one of the following: <list type="bullet"> <item><description><c>'aborted'</c> - An operation was aborted (due to user action)</description></item> <item><description> <c>'accessdenied'</c> - Permission to access a resource, other than the network, was denied </description></item> <item><description> <c>'addressunreachable'</c> - The IP address is unreachable. This usually means that there is no route to the specified host or network. </description></item> <item><description><c>'blockedbyclient'</c> - The client chose to block the request.</description></item> <item><description> <c>'blockedbyresponse'</c> - The request failed because the response was delivered along with requirements which are not met ('X-Frame-Options' and 'Content-Security-Policy' ancestor checks, for instance). </description></item> <item><description> <c>'connectionaborted'</c> - A connection timed out as a result of not receiving an ACK for data sent. </description></item> <item><description><c>'connectionclosed'</c> - A connection was closed (corresponding to a TCP FIN).</description></item> <item><description><c>'connectionfailed'</c> - A connection attempt failed.</description></item> <item><description><c>'connectionrefused'</c> - A connection attempt was refused.</description></item> <item><description><c>'connectionreset'</c> - A connection was reset (corresponding to a TCP RST).</description></item> <item><description><c>'internetdisconnected'</c> - The Internet connection has been lost.</description></item> <item><description><c>'namenotresolved'</c> - The host name could not be resolved.</description></item> <item><description><c>'timedout'</c> - An operation timed out.</description></item> <item><description><c>'failed'</c> - A generic failure occurred.</description></item> </list> </param> </member> <member name="M:Microsoft.Playwright.IRoute.ContinueAsync(Microsoft.Playwright.RouteContinueOptions)"> <summary> <para>Sends route's request to the network with optional overrides.</para> <para>**Usage**</para> <code> await page.RouteAsync("**/*", async route =><br/> {<br/> var headers = new Dictionary<string, string>(route.Request.Headers) { { "foo", "bar" } };<br/> headers.Remove("origin");<br/> await route.ContinueAsync(new() { Headers = headers });<br/> }); </code> <para>**Details**</para> <para> The <see cref="M:Microsoft.Playwright.IRoute.ContinueAsync(Microsoft.Playwright.RouteContinueOptions)"/> option applies to both the routed request and any redirects it initiates. However, <see cref="M:Microsoft.Playwright.IRoute.ContinueAsync(Microsoft.Playwright.RouteContinueOptions)"/>, <see cref="M:Microsoft.Playwright.IRoute.ContinueAsync(Microsoft.Playwright.RouteContinueOptions)"/>, and <see cref="M:Microsoft.Playwright.IRoute.ContinueAsync(Microsoft.Playwright.RouteContinueOptions)"/> only apply to the original request and are not carried over to redirected requests. </para> <para> <see cref="M:Microsoft.Playwright.IRoute.ContinueAsync(Microsoft.Playwright.RouteContinueOptions)"/> will immediately send the request to the network, other matching handlers won't be invoked. Use <see cref="M:Microsoft.Playwright.IRoute.FallbackAsync(Microsoft.Playwright.RouteFallbackOptions)"/> If you want next matching handler in the chain to be invoked. </para> <para> The <c>Cookie</c> header cannot be overridden using this method. If a value is provided, it will be ignored, and the cookie will be loaded from the browser's cookie store. To set custom cookies, use <see cref="M:Microsoft.Playwright.IBrowserContext.AddCookiesAsync(System.Collections.Generic.IEnumerable{Microsoft.Playwright.Cookie})"/>. </para> </summary> <remarks> <para> The <c>Cookie</c> header cannot be overridden using this method. If a value is provided, it will be ignored, and the cookie will be loaded from the browser's cookie store. To set custom cookies, use <see cref="M:Microsoft.Playwright.IBrowserContext.AddCookiesAsync(System.Collections.Generic.IEnumerable{Microsoft.Playwright.Cookie})"/>. </para> </remarks> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IRoute.FallbackAsync(Microsoft.Playwright.RouteFallbackOptions)"> <summary> <para> Continues route's request with optional overrides. The method is similar to <see cref="M:Microsoft.Playwright.IRoute.ContinueAsync(Microsoft.Playwright.RouteContinueOptions)"/> with the difference that other matching handlers will be invoked before sending the request. </para> <para>**Usage**</para> <para> When several routes match the given pattern, they run in the order opposite to their registration. That way the last registered route can always override all the previous ones. In the example below, request will be handled by the bottom-most handler first, then it'll fall back to the previous one and in the end will be aborted by the first registered route. </para> <code> await page.RouteAsync("**/*", route => {<br/> // Runs last.<br/> await route.AbortAsync();<br/> });<br/> <br/> await page.RouteAsync("**/*", route => {<br/> // Runs second.<br/> await route.FallbackAsync();<br/> });<br/> <br/> await page.RouteAsync("**/*", route => {<br/> // Runs first.<br/> await route.FallbackAsync();<br/> }); </code> <para> Registering multiple routes is useful when you want separate handlers to handle different kinds of requests, for example API calls vs page resources or GET requests vs POST requests as in the example below. </para> <code> // Handle GET requests.<br/> await page.RouteAsync("**/*", route => {<br/> if (route.Request.Method != "GET") {<br/> await route.FallbackAsync();<br/> return;<br/> }<br/> // Handling GET only.<br/> // ...<br/> });<br/> <br/> // Handle POST requests.<br/> await page.RouteAsync("**/*", route => {<br/> if (route.Request.Method != "POST") {<br/> await route.FallbackAsync();<br/> return;<br/> }<br/> // Handling POST only.<br/> // ...<br/> }); </code> <para> One can also modify request while falling back to the subsequent handler, that way intermediate route handler can modify url, method, headers and postData of the request. </para> <code> await page.RouteAsync("**/*", async route =><br/> {<br/> var headers = new Dictionary<string, string>(route.Request.Headers) { { "foo", "foo-value" } };<br/> headers.Remove("bar");<br/> await route.FallbackAsync(new() { Headers = headers });<br/> }); </code> <para> Use <see cref="M:Microsoft.Playwright.IRoute.ContinueAsync(Microsoft.Playwright.RouteContinueOptions)"/> to immediately send the request to the network, other matching handlers won't be invoked in that case. </para> </summary> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IRoute.FetchAsync(Microsoft.Playwright.RouteFetchOptions)"> <summary> <para> Performs the request and fetches result without fulfilling it, so that the response could be modified and then fulfilled. </para> <para>**Usage**</para> <code> await page.RouteAsync("https://dog.ceo/api/breeds/list/all", async route =><br/> {<br/> var response = await route.FetchAsync();<br/> dynamic json = await response.JsonAsync();<br/> json.message.big_red_dog = new string[] {};<br/> await route.FulfillAsync(new() { Response = response, Json = json });<br/> }); </code> <para>**Details**</para> <para> Note that <see cref="M:Microsoft.Playwright.IRoute.FetchAsync(Microsoft.Playwright.RouteFetchOptions)"/> option will apply to the fetched request as well as any redirects initiated by it. If you want to only apply <see cref="M:Microsoft.Playwright.IRoute.FetchAsync(Microsoft.Playwright.RouteFetchOptions)"/> to the original request, but not to redirects, look into <see cref="M:Microsoft.Playwright.IRoute.ContinueAsync(Microsoft.Playwright.RouteContinueOptions)"/> instead. </para> </summary> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IRoute.FulfillAsync(Microsoft.Playwright.RouteFulfillOptions)"> <summary> <para>Fulfills route's request with given response.</para> <para>**Usage**</para> <para>An example of fulfilling all requests with 404 responses:</para> <code> await page.RouteAsync("**/*", route => route.FulfillAsync(new ()<br/> {<br/> Status = 404,<br/> ContentType = "text/plain",<br/> Body = "Not Found!"<br/> })); </code> <para>An example of serving static file:</para> <code>await page.RouteAsync("**/xhr_endpoint", route => route.FulfillAsync(new() { Path = "mock_data.json" }));</code> </summary> <param name="options">Call options</param> </member> <member name="P:Microsoft.Playwright.IRoute.Request"> <summary><para>A request to be routed.</para></summary> </member> <member name="T:Microsoft.Playwright.ISelectors"> <summary> <para> Selectors can be used to install custom selector engines. See <a href="https://playwright.dev/dotnet/docs/extensibility">extensibility</a> for more information. </para> </summary> </member> <member name="M:Microsoft.Playwright.ISelectors.RegisterAsync(System.String,Microsoft.Playwright.SelectorsRegisterOptions)"> <summary> <para>Selectors must be registered before creating the page.</para> <para>**Usage**</para> <para>An example of registering selector engine that queries elements based on a tag name:</para> <code> using Microsoft.Playwright;<br/> <br/> using var playwright = await Playwright.CreateAsync();<br/> // Script that evaluates to a selector engine instance. The script is evaluated in the page context.<br/> await playwright.Selectors.RegisterAsync("tag", new()<br/> {<br/> Script = @"{<br/> // Returns the first element matching given selector in the root's subtree.<br/> query(root, selector) {<br/> return root.querySelector(selector);<br/> },<br/> // Returns all elements matching given selector in the root's subtree.<br/> queryAll(root, selector) {<br/> return Array.from(root.querySelectorAll(selector));<br/> }<br/> }"<br/> });<br/> <br/> await using var browser = await playwright.Chromium.LaunchAsync();<br/> var page = await browser.NewPageAsync();<br/> await page.SetContentAsync("<div><button>Click me</button></div>");<br/> // Use the selector prefixed with its name.<br/> var button = page.Locator("tag=button");<br/> // Combine it with built-in locators.<br/> await page.Locator("tag=div").GetByText("Click me").ClickAsync();<br/> // Can use it in any methods supporting selectors.<br/> int buttonCount = await page.Locator("tag=button").CountAsync(); </code> </summary> <param name="name"> Name that is used in selectors as a prefix, e.g. <c>{name: 'foo'}</c> enables <c>foo=myselectorbody</c> selectors. May only contain <c>[a-zA-Z0-9_]</c> characters. </param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ISelectors.SetTestIdAttribute(System.String)"> <summary> <para> Defines custom attribute name to be used in <see cref="M:Microsoft.Playwright.IPage.GetByTestId(System.String)"/>. <c>data-testid</c> is used by default. </para> </summary> <param name="attributeName">Test id attribute name.</param> </member> <member name="T:Microsoft.Playwright.ITouchscreen"> <summary> <para> The Touchscreen class operates in main-frame CSS pixels relative to the top-left corner of the viewport. Methods on the touchscreen can only be used in browser contexts that have been initialized with <c>hasTouch</c> set to true. </para> <para> This class is limited to emulating tap gestures. For examples of other gestures simulated by manually dispatching touch events, see the <a href="https://playwright.dev/dotnet/docs/touch-events">emulating legacy touch events</a> page. </para> </summary> </member> <member name="M:Microsoft.Playwright.ITouchscreen.TapAsync(System.Single,System.Single)"> <summary> <para> Dispatches a <c>touchstart</c> and <c>touchend</c> event with a single touch at the position (<see cref="M:Microsoft.Playwright.ITouchscreen.TapAsync(System.Single,System.Single)"/>,<see cref="M:Microsoft.Playwright.ITouchscreen.TapAsync(System.Single,System.Single)"/>). </para> <para> <see cref="M:Microsoft.Playwright.IPage.TapAsync(System.String,Microsoft.Playwright.PageTapOptions)"/> the method will throw if <see cref="M:Microsoft.Playwright.IBrowser.NewContextAsync(Microsoft.Playwright.BrowserNewContextOptions)"/> option of the browser context is false. </para> </summary> <remarks> <para> <see cref="M:Microsoft.Playwright.IPage.TapAsync(System.String,Microsoft.Playwright.PageTapOptions)"/> the method will throw if <see cref="M:Microsoft.Playwright.IBrowser.NewContextAsync(Microsoft.Playwright.BrowserNewContextOptions)"/> option of the browser context is false. </para> </remarks> <param name="x">X coordinate relative to the main frame's viewport in CSS pixels.</param> <param name="y">Y coordinate relative to the main frame's viewport in CSS pixels.</param> </member> <member name="T:Microsoft.Playwright.ITracing"> <summary> <para> API for collecting and saving Playwright traces. Playwright traces can be opened in <a href="https://playwright.dev/dotnet/docs/trace-viewer">Trace Viewer</a> after Playwright script runs. </para> <para> Start recording a trace before performing actions. At the end, stop tracing and save it to a file. </para> <code> using var playwright = await Playwright.CreateAsync();<br/> var browser = await playwright.Chromium.LaunchAsync();<br/> await using var context = await browser.NewContextAsync();<br/> await context.Tracing.StartAsync(new()<br/> {<br/> Screenshots = true,<br/> Snapshots = true<br/> });<br/> var page = await context.NewPageAsync();<br/> await page.GotoAsync("https://playwright.dev");<br/> await context.Tracing.StopAsync(new()<br/> {<br/> Path = "trace.zip"<br/> }); </code> </summary> </member> <member name="M:Microsoft.Playwright.ITracing.StartAsync(Microsoft.Playwright.TracingStartOptions)"> <summary> <para>Start tracing.</para> <para>**Usage**</para> <code> using var playwright = await Playwright.CreateAsync();<br/> var browser = await playwright.Chromium.LaunchAsync();<br/> await using var context = await browser.NewContextAsync();<br/> await context.Tracing.StartAsync(new()<br/> {<br/> Screenshots = true,<br/> Snapshots = true<br/> });<br/> var page = await context.NewPageAsync();<br/> await page.GotoAsync("https://playwright.dev");<br/> await context.Tracing.StopAsync(new()<br/> {<br/> Path = "trace.zip"<br/> }); </code> </summary> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ITracing.StartChunkAsync(Microsoft.Playwright.TracingStartChunkOptions)"> <summary> <para> Start a new trace chunk. If you'd like to record multiple traces on the same <see cref="T:Microsoft.Playwright.IBrowserContext"/>, use <see cref="M:Microsoft.Playwright.ITracing.StartAsync(Microsoft.Playwright.TracingStartOptions)"/> once, and then create multiple trace chunks with <see cref="M:Microsoft.Playwright.ITracing.StartChunkAsync(Microsoft.Playwright.TracingStartChunkOptions)"/> and <see cref="M:Microsoft.Playwright.ITracing.StopChunkAsync(Microsoft.Playwright.TracingStopChunkOptions)"/>. </para> <para>**Usage**</para> <code> using var playwright = await Playwright.CreateAsync();<br/> var browser = await playwright.Chromium.LaunchAsync();<br/> await using var context = await browser.NewContextAsync();<br/> await context.Tracing.StartAsync(new()<br/> {<br/> Screenshots = true,<br/> Snapshots = true<br/> });<br/> var page = await context.NewPageAsync();<br/> await page.GotoAsync("https://playwright.dev");<br/> <br/> await context.Tracing.StartChunkAsync();<br/> await page.GetByText("Get Started").ClickAsync();<br/> // Everything between StartChunkAsync and StopChunkAsync will be recorded in the trace.<br/> await context.Tracing.StopChunkAsync(new()<br/> {<br/> Path = "trace1.zip"<br/> });<br/> <br/> await context.Tracing.StartChunkAsync();<br/> await page.GotoAsync("http://example.com");<br/> // Save a second trace file with different actions.<br/> await context.Tracing.StopChunkAsync(new()<br/> {<br/> Path = "trace2.zip"<br/> }); </code> </summary> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ITracing.GroupAsync(System.String,Microsoft.Playwright.TracingGroupOptions)"> <summary> <para>Use <c>test.step</c> instead when available.</para> <para> Creates a new group within the trace, assigning any subsequent API calls to this group, until <see cref="M:Microsoft.Playwright.ITracing.GroupEndAsync"/> is called. Groups can be nested and will be visible in the trace viewer. </para> <para>**Usage**</para> <code> // All actions between GroupAsync and GroupEndAsync<br/> // will be shown in the trace viewer as a group.<br/> await Page.Context.Tracing.GroupAsync("Open Playwright.dev > API");<br/> await Page.GotoAsync("https://playwright.dev/");<br/> await Page.GetByRole(AriaRole.Link, new() { Name = "API" }).ClickAsync();<br/> await Page.Context.Tracing.GroupEndAsync(); </code> </summary> <remarks><para>Use <c>test.step</c> instead when available.</para></remarks> <param name="name">Group name shown in the trace viewer.</param> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ITracing.GroupEndAsync"> <summary><para>Closes the last group created by <see cref="M:Microsoft.Playwright.ITracing.GroupAsync(System.String,Microsoft.Playwright.TracingGroupOptions)"/>.</para></summary> </member> <member name="M:Microsoft.Playwright.ITracing.StopAsync(Microsoft.Playwright.TracingStopOptions)"> <summary><para>Stop tracing.</para></summary> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.ITracing.StopChunkAsync(Microsoft.Playwright.TracingStopChunkOptions)"> <summary> <para> Stop the trace chunk. See <see cref="M:Microsoft.Playwright.ITracing.StartChunkAsync(Microsoft.Playwright.TracingStartChunkOptions)"/> for more details about multiple trace chunks. </para> </summary> <param name="options">Call options</param> </member> <member name="T:Microsoft.Playwright.IVideo"> <summary> <para> When browser context is created with the <c>recordVideo</c> option, each page has a video object associated with it. </para> <code>Console.WriteLine(await page.Video.GetPathAsync());</code> </summary> </member> <member name="M:Microsoft.Playwright.IVideo.DeleteAsync"> <summary><para>Deletes the video file. Will wait for the video to finish if necessary.</para></summary> </member> <member name="M:Microsoft.Playwright.IVideo.PathAsync"> <summary> <para> Returns the file system path this video will be recorded to. The video is guaranteed to be written to the filesystem upon closing the browser context. This method throws when connected remotely. </para> </summary> </member> <member name="M:Microsoft.Playwright.IVideo.SaveAsAsync(System.String)"> <summary> <para> Saves the video to a user-specified path. It is safe to call this method while the video is still in progress, or after the page has closed. This method waits until the page is closed and the video is fully saved. </para> </summary> <param name="path">Path where the video should be saved.</param> </member> <member name="T:Microsoft.Playwright.IWebError"> <summary> <para> <see cref="T:Microsoft.Playwright.IWebError"/> class represents an unhandled exception thrown in the page. It is dispatched via the <see cref="E:Microsoft.Playwright.IBrowserContext.WebError"/> event. </para> <code> // Log all uncaught errors to the terminal<br/> context.WebError += (_, webError) =><br/> {<br/> Console.WriteLine("Uncaught exception: " + webError.Error);<br/> }; </code> </summary> </member> <member name="P:Microsoft.Playwright.IWebError.Page"> <summary><para>The page that produced this unhandled exception, if any.</para></summary> </member> <member name="P:Microsoft.Playwright.IWebError.Error"> <summary><para>Unhandled error that was thrown.</para></summary> </member> <member name="T:Microsoft.Playwright.IWebSocket"> <summary> <para> The <see cref="T:Microsoft.Playwright.IWebSocket"/> class represents WebSocket connections within a page. It provides the ability to inspect and manipulate the data being transmitted and received. </para> <para>If you want to intercept or modify WebSocket frames, consider using <see cref="T:Microsoft.Playwright.IWebSocketRoute"/>.</para> </summary> </member> <member name="E:Microsoft.Playwright.IWebSocket.Close"> <summary><para>Fired when the websocket closes.</para></summary> </member> <member name="E:Microsoft.Playwright.IWebSocket.FrameReceived"> <summary><para>Fired when the websocket receives a frame.</para></summary> </member> <member name="E:Microsoft.Playwright.IWebSocket.FrameSent"> <summary><para>Fired when the websocket sends a frame.</para></summary> </member> <member name="E:Microsoft.Playwright.IWebSocket.SocketError"> <summary><para>Fired when the websocket has an error.</para></summary> </member> <member name="P:Microsoft.Playwright.IWebSocket.IsClosed"> <summary><para>Indicates that the web socket has been closed.</para></summary> </member> <member name="P:Microsoft.Playwright.IWebSocket.Url"> <summary><para>Contains the URL of the WebSocket.</para></summary> </member> <member name="T:Microsoft.Playwright.IWebSocketFrame"> <summary> <para> The <see cref="T:Microsoft.Playwright.IWebSocketFrame"/> class represents frames sent over <see cref="T:Microsoft.Playwright.IWebSocket"/> connections in the page. Frame payload is returned by either <see cref="P:Microsoft.Playwright.IWebSocketFrame.Text"/> or <see cref="P:Microsoft.Playwright.IWebSocketFrame.Binary"/> method depending on the its type. </para> </summary> </member> <member name="P:Microsoft.Playwright.IWebSocketFrame.Binary"> <summary><para>Returns binary payload.</para></summary> </member> <member name="P:Microsoft.Playwright.IWebSocketFrame.Text"> <summary><para>Returns text payload.</para></summary> </member> <member name="T:Microsoft.Playwright.IWebSocketRoute"> <summary> <para> Whenever a <a href="https://developer.mozilla.org/en-US/docs/Web/API/WebSocket"><c>WebSocket</c></a> route is set up with <see cref="M:Microsoft.Playwright.IPage.RouteWebSocketAsync(System.String,System.Action{Microsoft.Playwright.IWebSocketRoute})"/> or <see cref="M:Microsoft.Playwright.IBrowserContext.RouteWebSocketAsync(System.String,System.Action{Microsoft.Playwright.IWebSocketRoute})"/>, the <c>WebSocketRoute</c> object allows to handle the WebSocket, like an actual server would do. </para> <para>**Mocking**</para> <para> By default, the routed WebSocket will not connect to the server. This way, you can mock entire communcation over the WebSocket. Here is an example that responds to a <c>"request"</c> with a <c>"response"</c>. </para> <code> await page.RouteWebSocketAsync("wss://example.com/ws", ws => {<br/> ws.OnMessage(frame => {<br/> if (frame.Text == "request")<br/> ws.Send("response");<br/> });<br/> }); </code> <para> Since we do not call <see cref="M:Microsoft.Playwright.IWebSocketRoute.ConnectToServer"/> inside the WebSocket route handler, Playwright assumes that WebSocket will be mocked, and opens the WebSocket inside the page automatically. </para> <para>Here is another example that handles JSON messages:</para> <code> await page.RouteWebSocketAsync("wss://example.com/ws", ws => {<br/> ws.OnMessage(frame => {<br/> using var jsonDoc = JsonDocument.Parse(frame.Text);<br/> JsonElement root = jsonDoc.RootElement;<br/> if (root.TryGetProperty("request", out JsonElement requestElement) && requestElement.GetString() == "question")<br/> {<br/> var response = new Dictionary<string, string> { ["response"] = "answer" };<br/> string jsonResponse = JsonSerializer.Serialize(response);<br/> ws.Send(jsonResponse);<br/> }<br/> });<br/> }); </code> <para>**Intercepting**</para> <para> Alternatively, you may want to connect to the actual server, but intercept messages in-between and modify or block them. Calling <see cref="M:Microsoft.Playwright.IWebSocketRoute.ConnectToServer"/> returns a server-side <c>WebSocketRoute</c> instance that you can send messages to, or handle incoming messages. </para> <para> Below is an example that modifies some messages sent by the page to the server. Messages sent from the server to the page are left intact, relying on the default forwarding. </para> <code> await page.RouteWebSocketAsync("/ws", ws => {<br/> var server = ws.ConnectToServer();<br/> ws.OnMessage(frame => {<br/> if (frame.Text == "request")<br/> server.Send("request2");<br/> else<br/> server.Send(frame.Text);<br/> });<br/> }); </code> <para> After connecting to the server, all **messages are forwarded** between the page and the server by default. </para> <para> However, if you call <see cref="M:Microsoft.Playwright.IWebSocketRoute.OnMessage(System.Action{Microsoft.Playwright.IWebSocketFrame})"/> on the original route, messages from the page to the server **will not be forwarded** anymore, but should instead be handled by the <see cref="M:Microsoft.Playwright.IWebSocketRoute.OnMessage(System.Action{Microsoft.Playwright.IWebSocketFrame})"/>. </para> <para> Similarly, calling <see cref="M:Microsoft.Playwright.IWebSocketRoute.OnMessage(System.Action{Microsoft.Playwright.IWebSocketFrame})"/> on the server-side WebSocket will **stop forwarding messages** from the server to the page, and <see cref="M:Microsoft.Playwright.IWebSocketRoute.OnMessage(System.Action{Microsoft.Playwright.IWebSocketFrame})"/> should take care of them. </para> <para> The following example blocks some messages in both directions. Since it calls <see cref="M:Microsoft.Playwright.IWebSocketRoute.OnMessage(System.Action{Microsoft.Playwright.IWebSocketFrame})"/> in both directions, there is no automatic forwarding at all. </para> <code> await page.RouteWebSocketAsync("/ws", ws => {<br/> var server = ws.ConnectToServer();<br/> ws.OnMessage(frame => {<br/> if (frame.Text != "blocked-from-the-page")<br/> server.Send(frame.Text);<br/> });<br/> server.OnMessage(frame => {<br/> if (frame.Text != "blocked-from-the-server")<br/> ws.Send(frame.Text);<br/> });<br/> }); </code> </summary> </member> <member name="M:Microsoft.Playwright.IWebSocketRoute.CloseAsync(Microsoft.Playwright.WebSocketRouteCloseOptions)"> <summary><para>Closes one side of the WebSocket connection.</para></summary> <param name="options">Call options</param> </member> <member name="M:Microsoft.Playwright.IWebSocketRoute.ConnectToServer"> <summary> <para> By default, routed WebSocket does not connect to the server, so you can mock entire WebSocket communication. This method connects to the actual WebSocket server, and returns the server-side <see cref="T:Microsoft.Playwright.IWebSocketRoute"/> instance, giving the ability to send and receive messages from the server. </para> <para>Once connected to the server:</para> <list type="bullet"> <item><description> Messages received from the server will be **automatically forwarded** to the WebSocket in the page, unless <see cref="M:Microsoft.Playwright.IWebSocketRoute.OnMessage(System.Action{Microsoft.Playwright.IWebSocketFrame})"/> is called on the server-side <c>WebSocketRoute</c>. </description></item> <item><description> Messages sent by the <a href="https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/send"><c>WebSocket.send()</c></a> call in the page will be **automatically forwarded** to the server, unless <see cref="M:Microsoft.Playwright.IWebSocketRoute.OnMessage(System.Action{Microsoft.Playwright.IWebSocketFrame})"/> is called on the original <c>WebSocketRoute</c>. </description></item> </list> <para>See examples at the top for more details.</para> </summary> </member> <member name="M:Microsoft.Playwright.IWebSocketRoute.OnClose(System.Action{System.Nullable{System.Int32},System.String})"> <summary> <para>Allows to handle <a href="https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/close"><c>WebSocket.close</c></a>.</para> <para> By default, closing one side of the connection, either in the page or on the server, will close the other side. However, when <see cref="M:Microsoft.Playwright.IWebSocketRoute.OnClose(System.Action{System.Nullable{System.Int32},System.String})"/> handler is set up, the default forwarding of closure is disabled, and handler should take care of it. </para> </summary> <param name="handler"> Function that will handle WebSocket closure. Received an optional <a href="https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/close#code">close code</a> and an optional <a href="https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/close#reason">close reason</a>. </param> </member> <member name="M:Microsoft.Playwright.IWebSocketRoute.OnMessage(System.Action{Microsoft.Playwright.IWebSocketFrame})"> <summary> <para> This method allows to handle messages that are sent by the WebSocket, either from the page or from the server. </para> <para> When called on the original WebSocket route, this method handles messages sent from the page. You can handle this messages by responding to them with <see cref="M:Microsoft.Playwright.IWebSocketRoute.Send(System.Byte[])"/>, forwarding them to the server-side connection returned by <see cref="M:Microsoft.Playwright.IWebSocketRoute.ConnectToServer"/> or do something else. </para> <para> Once this method is called, messages are not automatically forwarded to the server or to the page - you should do that manually by calling <see cref="M:Microsoft.Playwright.IWebSocketRoute.Send(System.Byte[])"/>. See examples at the top for more details. </para> <para>Calling this method again will override the handler with a new one.</para> </summary> <param name="handler">Function that will handle messages.</param> </member> <member name="M:Microsoft.Playwright.IWebSocketRoute.Send(System.Byte[])"> <summary> <para> Sends a message to the WebSocket. When called on the original WebSocket, sends the message to the page. When called on the result of <see cref="M:Microsoft.Playwright.IWebSocketRoute.ConnectToServer"/>, sends the message to the server. See examples at the top for more details. </para> </summary> <param name="message">Message to send.</param> </member> <member name="P:Microsoft.Playwright.IWebSocketRoute.Url"> <summary><para>URL of the WebSocket created in the page.</para></summary> </member> <member name="M:Microsoft.Playwright.IWebSocketRoute.Send(System.String)"> <inheritdoc cref="M:Microsoft.Playwright.IWebSocketRoute.Send(System.Byte[])" /> </member> <member name="T:Microsoft.Playwright.IWorker"> <summary> <para> The Worker class represents a <a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API">WebWorker</a>. <c>worker</c> event is emitted on the page object to signal a worker creation. <c>close</c> event is emitted on the worker object when the worker is gone. </para> <code> page.Worker += (_, worker) =><br/> {<br/> Console.WriteLine($"Worker created: {worker.Url}");<br/> worker.Close += (_, _) => Console.WriteLine($"Worker closed {worker.Url}");<br/> };<br/> <br/> Console.WriteLine("Current Workers:");<br/> foreach(var pageWorker in page.Workers)<br/> {<br/> Console.WriteLine($"\tWorker: {pageWorker.Url}");<br/> } </code> </summary> </member> <member name="E:Microsoft.Playwright.IWorker.Close"> <summary> <para> Emitted when this dedicated <a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API">WebWorker</a> is terminated. </para> </summary> </member> <member name="M:Microsoft.Playwright.IWorker.EvaluateAsync``1(System.String,System.Object)"> <summary> <para>Returns the return value of <see cref="M:Microsoft.Playwright.IWorker.EvaluateAsync``1(System.String,System.Object)"/>.</para> <para> If the function passed to the <see cref="M:Microsoft.Playwright.IWorker.EvaluateAsync``1(System.String,System.Object)"/> returns a <see cref="T:System.Threading.Tasks.Task"/>, then <see cref="M:Microsoft.Playwright.IWorker.EvaluateAsync``1(System.String,System.Object)"/> would wait for the promise to resolve and return its value. </para> <para> If the function passed to the <see cref="M:Microsoft.Playwright.IWorker.EvaluateAsync``1(System.String,System.Object)"/> returns a non-<see cref="!:Serializable"/> value, then <see cref="M:Microsoft.Playwright.IWorker.EvaluateAsync``1(System.String,System.Object)"/> returns <c>undefined</c>. Playwright also supports transferring some additional values that are not serializable by <c>JSON</c>: <c>-0</c>, <c>NaN</c>, <c>Infinity</c>, <c>-Infinity</c>. </para> </summary> <param name="expression"> JavaScript expression to be evaluated in the browser context. If the expression evaluates to a function, the function is automatically invoked. </param> <param name="arg">Optional argument to pass to <see cref="M:Microsoft.Playwright.IWorker.EvaluateAsync``1(System.String,System.Object)"/>.</param> </member> <member name="M:Microsoft.Playwright.IWorker.EvaluateHandleAsync(System.String,System.Object)"> <summary> <para> Returns the return value of <see cref="M:Microsoft.Playwright.IWorker.EvaluateHandleAsync(System.String,System.Object)"/> as a <see cref="T:Microsoft.Playwright.IJSHandle"/>. </para> <para> The only difference between <see cref="M:Microsoft.Playwright.IWorker.EvaluateAsync``1(System.String,System.Object)"/> and <see cref="M:Microsoft.Playwright.IWorker.EvaluateHandleAsync(System.String,System.Object)"/> is that <see cref="M:Microsoft.Playwright.IWorker.EvaluateHandleAsync(System.String,System.Object)"/> returns <see cref="T:Microsoft.Playwright.IJSHandle"/>. </para> <para> If the function passed to the <see cref="M:Microsoft.Playwright.IWorker.EvaluateHandleAsync(System.String,System.Object)"/> returns a <see cref="T:System.Threading.Tasks.Task"/>, then <see cref="M:Microsoft.Playwright.IWorker.EvaluateHandleAsync(System.String,System.Object)"/> would wait for the promise to resolve and return its value. </para> </summary> <param name="expression"> JavaScript expression to be evaluated in the browser context. If the expression evaluates to a function, the function is automatically invoked. </param> <param name="arg">Optional argument to pass to <see cref="M:Microsoft.Playwright.IWorker.EvaluateHandleAsync(System.String,System.Object)"/>.</param> </member> <member name="P:Microsoft.Playwright.AccessibilitySnapshotOptions.InterestingOnly"> <summary><para>Prune uninteresting nodes from the tree. Defaults to <c>true</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.AccessibilitySnapshotOptions.Root"> <summary><para>The root DOM element for the snapshot. Defaults to the whole page.</para></summary> </member> <member name="P:Microsoft.Playwright.APIRequestContextOptions.Data"> <summary> <para> Allows to set post data of the request. If the data parameter is an object, it will be serialized to json string and <c>content-type</c> header will be set to <c>application/json</c> if not explicitly set. Otherwise the <c>content-type</c> header will be set to <c>application/octet-stream</c> if not explicitly set. </para> </summary> </member> <member name="P:Microsoft.Playwright.APIRequestContextOptions.DataByte"> <summary> <para> Allows to set post data of the request. If the data parameter is an object, it will be serialized to json string and <c>content-type</c> header will be set to <c>application/json</c> if not explicitly set. Otherwise the <c>content-type</c> header will be set to <c>application/octet-stream</c> if not explicitly set. </para> </summary> </member> <member name="P:Microsoft.Playwright.APIRequestContextOptions.DataObject"> <summary> <para> Allows to set post data of the request. If the data parameter is an object, it will be serialized to json string and <c>content-type</c> header will be set to <c>application/json</c> if not explicitly set. Otherwise the <c>content-type</c> header will be set to <c>application/octet-stream</c> if not explicitly set. </para> </summary> </member> <member name="P:Microsoft.Playwright.APIRequestContextOptions.DataString"> <summary> <para> Allows to set post data of the request. If the data parameter is an object, it will be serialized to json string and <c>content-type</c> header will be set to <c>application/json</c> if not explicitly set. Otherwise the <c>content-type</c> header will be set to <c>application/octet-stream</c> if not explicitly set. </para> </summary> </member> <member name="P:Microsoft.Playwright.APIRequestContextOptions.FailOnStatusCode"> <summary> <para> Whether to throw on response codes other than 2xx and 3xx. By default response object is returned for all status codes. </para> </summary> </member> <member name="P:Microsoft.Playwright.APIRequestContextOptions.Form"> <summary> <para> Provides an object that will be serialized as html form using <c>application/x-www-form-urlencoded</c> encoding and sent as this request body. If this parameter is specified <c>content-type</c> header will be set to <c>application/x-www-form-urlencoded</c> unless explicitly provided. </para> <para>An instance of <see cref="T:Microsoft.Playwright.IFormData"/> can be created via <see cref="M:Microsoft.Playwright.IAPIRequestContext.CreateFormData"/>.</para> </summary> </member> <member name="P:Microsoft.Playwright.APIRequestContextOptions.Headers"> <summary> <para> Allows to set HTTP headers. These headers will apply to the fetched request as well as any redirects initiated by it. </para> </summary> </member> <member name="P:Microsoft.Playwright.APIRequestContextOptions.IgnoreHTTPSErrors"> <summary><para>Whether to ignore HTTPS errors when sending network requests. Defaults to <c>false</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.APIRequestContextOptions.MaxRedirects"> <summary> <para> Maximum number of request redirects that will be followed automatically. An error will be thrown if the number is exceeded. Defaults to <c>20</c>. Pass <c>0</c> to not follow redirects. </para> </summary> </member> <member name="P:Microsoft.Playwright.APIRequestContextOptions.MaxRetries"> <summary> <para> Maximum number of times network errors should be retried. Currently only <c>ECONNRESET</c> error is retried. Does not retry based on HTTP response codes. An error will be thrown if the limit is exceeded. Defaults to <c>0</c> - no retries. </para> </summary> </member> <member name="P:Microsoft.Playwright.APIRequestContextOptions.Method"> <summary> <para> If set changes the fetch method (e.g. <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/PUT">PUT</a> or <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST">POST</a>). If not specified, GET method is used. </para> </summary> </member> <member name="P:Microsoft.Playwright.APIRequestContextOptions.Multipart"> <summary> <para> Provides an object that will be serialized as html form using <c>multipart/form-data</c> encoding and sent as this request body. If this parameter is specified <c>content-type</c> header will be set to <c>multipart/form-data</c> unless explicitly provided. File values can be passed as file-like object containing file name, mime-type and its content. </para> <para>An instance of <see cref="T:Microsoft.Playwright.IFormData"/> can be created via <see cref="M:Microsoft.Playwright.IAPIRequestContext.CreateFormData"/>.</para> </summary> </member> <member name="P:Microsoft.Playwright.APIRequestContextOptions.Params"> <summary><para>Query parameters to be sent with the URL.</para></summary> </member> <member name="P:Microsoft.Playwright.APIRequestContextOptions.ParamsString"> <summary><para>Query parameters to be sent with the URL.</para></summary> </member> <member name="P:Microsoft.Playwright.APIRequestContextOptions.Timeout"> <summary> <para> Request timeout in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. </para> </summary> </member> <member name="P:Microsoft.Playwright.APIRequestContextStorageStateOptions.IndexedDB"> <summary><para>Set to <c>true</c> to include IndexedDB in the storage state snapshot.</para></summary> </member> <member name="P:Microsoft.Playwright.APIRequestContextStorageStateOptions.Path"> <summary> <para> The file path to save the storage state to. If <see cref="M:Microsoft.Playwright.IAPIRequestContext.StorageStateAsync(Microsoft.Playwright.APIRequestContextStorageStateOptions)"/> is a relative path, then it is resolved relative to current working directory. If no path is provided, storage state is still returned, but won't be saved to the disk. </para> </summary> </member> <member name="P:Microsoft.Playwright.APIRequestNewContextOptions.BaseURL"> <summary> <para> Methods like <see cref="M:Microsoft.Playwright.IAPIRequestContext.GetAsync(System.String,Microsoft.Playwright.APIRequestContextOptions)"/> take the base URL into consideration by using the <a href="https://developer.mozilla.org/en-US/docs/Web/API/URL/URL"><c>URL()</c></a> constructor for building the corresponding URL. Examples: </para> <list type="bullet"> <item><description> baseURL: <c>http://localhost:3000</c> and sending request to <c>/bar.html</c> results in <c>http://localhost:3000/bar.html</c> </description></item> <item><description> baseURL: <c>http://localhost:3000/foo/</c> and sending request to <c>./bar.html</c> results in <c>http://localhost:3000/foo/bar.html</c> </description></item> <item><description> baseURL: <c>http://localhost:3000/foo</c> (without trailing slash) and navigating to <c>./bar.html</c> results in <c>http://localhost:3000/bar.html</c> </description></item> </list> </summary> </member> <member name="P:Microsoft.Playwright.APIRequestNewContextOptions.ClientCertificates"> <summary> <para> TLS Client Authentication allows the server to request a client certificate and verify it. </para> <para>**Details**</para> <para> An array of client certificates to be used. Each certificate object must have either both <c>certPath</c> and <c>keyPath</c>, a single <c>pfxPath</c>, or their corresponding direct value equivalents (<c>cert</c> and <c>key</c>, or <c>pfx</c>). Optionally, <c>passphrase</c> property should be provided if the certificate is encrypted. The <c>origin</c> property should be provided with an exact match to the request origin that the certificate is valid for. </para> <para> When using WebKit on macOS, accessing <c>localhost</c> will not pick up client certificates. You can make it work by replacing <c>localhost</c> with <c>local.playwright</c>. </para> </summary> <remarks> <para> When using WebKit on macOS, accessing <c>localhost</c> will not pick up client certificates. You can make it work by replacing <c>localhost</c> with <c>local.playwright</c>. </para> </remarks> </member> <member name="P:Microsoft.Playwright.APIRequestNewContextOptions.ExtraHTTPHeaders"> <summary> <para> An object containing additional HTTP headers to be sent with every request. Defaults to none. </para> </summary> </member> <member name="P:Microsoft.Playwright.APIRequestNewContextOptions.FailOnStatusCode"> <summary> <para> Whether to throw on response codes other than 2xx and 3xx. By default response object is returned for all status codes. </para> </summary> </member> <member name="P:Microsoft.Playwright.APIRequestNewContextOptions.HttpCredentials"> <summary> <para> Credentials for <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication">HTTP authentication</a>. If no origin is specified, the username and password are sent to any servers upon unauthorized responses. </para> </summary> </member> <member name="P:Microsoft.Playwright.APIRequestNewContextOptions.IgnoreHTTPSErrors"> <summary><para>Whether to ignore HTTPS errors when sending network requests. Defaults to <c>false</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.APIRequestNewContextOptions.MaxRedirects"> <summary> <para> Maximum number of request redirects that will be followed automatically. An error will be thrown if the number is exceeded. Defaults to <c>20</c>. Pass <c>0</c> to not follow redirects. This can be overwritten for each request individually. </para> </summary> </member> <member name="P:Microsoft.Playwright.APIRequestNewContextOptions.Proxy"> <summary><para>Network proxy settings.</para></summary> </member> <member name="P:Microsoft.Playwright.APIRequestNewContextOptions.StorageState"> <summary> <para> Populates context with given storage state. This option can be used to initialize context with logged-in information obtained via <see cref="M:Microsoft.Playwright.IBrowserContext.StorageStateAsync(Microsoft.Playwright.BrowserContextStorageStateOptions)"/> or <see cref="M:Microsoft.Playwright.IAPIRequestContext.StorageStateAsync(Microsoft.Playwright.APIRequestContextStorageStateOptions)"/>. Either a path to the file with saved storage, or the value returned by one of <see cref="M:Microsoft.Playwright.IBrowserContext.StorageStateAsync(Microsoft.Playwright.BrowserContextStorageStateOptions)"/> or <see cref="M:Microsoft.Playwright.IAPIRequestContext.StorageStateAsync(Microsoft.Playwright.APIRequestContextStorageStateOptions)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.APIRequestNewContextOptions.StorageStatePath"> <summary> <para> Populates context with given storage state. This option can be used to initialize context with logged-in information obtained via <see cref="M:Microsoft.Playwright.IBrowserContext.StorageStateAsync(Microsoft.Playwright.BrowserContextStorageStateOptions)"/>. Path to the file with saved storage state. </para> </summary> </member> <member name="P:Microsoft.Playwright.APIRequestNewContextOptions.Timeout"> <summary> <para> Maximum time in milliseconds to wait for the response. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. </para> </summary> </member> <member name="P:Microsoft.Playwright.APIRequestNewContextOptions.UserAgent"> <summary><para>Specific user agent to use in this context.</para></summary> </member> <member name="P:Microsoft.Playwright.BrowserCloseOptions.Reason"> <summary><para>The reason to be reported to the operations interrupted by the browser closure.</para></summary> </member> <member name="P:Microsoft.Playwright.BrowserContextClearCookiesOptions.Domain"> <summary><para>Only removes cookies with the given domain.</para></summary> </member> <member name="P:Microsoft.Playwright.BrowserContextClearCookiesOptions.DomainRegex"> <summary><para>Only removes cookies with the given domain.</para></summary> </member> <member name="P:Microsoft.Playwright.BrowserContextClearCookiesOptions.DomainString"> <summary><para>Only removes cookies with the given domain.</para></summary> </member> <member name="P:Microsoft.Playwright.BrowserContextClearCookiesOptions.Name"> <summary><para>Only removes cookies with the given name.</para></summary> </member> <member name="P:Microsoft.Playwright.BrowserContextClearCookiesOptions.NameRegex"> <summary><para>Only removes cookies with the given name.</para></summary> </member> <member name="P:Microsoft.Playwright.BrowserContextClearCookiesOptions.NameString"> <summary><para>Only removes cookies with the given name.</para></summary> </member> <member name="P:Microsoft.Playwright.BrowserContextClearCookiesOptions.Path"> <summary><para>Only removes cookies with the given path.</para></summary> </member> <member name="P:Microsoft.Playwright.BrowserContextClearCookiesOptions.PathRegex"> <summary><para>Only removes cookies with the given path.</para></summary> </member> <member name="P:Microsoft.Playwright.BrowserContextClearCookiesOptions.PathString"> <summary><para>Only removes cookies with the given path.</para></summary> </member> <member name="P:Microsoft.Playwright.BrowserContextCloseOptions.Reason"> <summary><para>The reason to be reported to the operations interrupted by the context closure.</para></summary> </member> <member name="P:Microsoft.Playwright.BrowserContextExposeBindingOptions.Handle"> <summary> <para>**DEPRECATED** This option will be removed in the future.</para> <para> Whether to pass the argument as a handle, instead of passing by value. When passing a handle, only one argument is supported. When passing by value, multiple arguments are supported. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserContextGrantPermissionsOptions.Origin"> <summary><para>The <see cref="!:origin"/> to grant permissions to, e.g. "https://example.com".</para></summary> </member> <member name="P:Microsoft.Playwright.BrowserContextRouteFromHAROptions.NotFound"> <summary> <list type="bullet"> <item><description>If set to 'abort' any request not found in the HAR file will be aborted.</description></item> <item><description>If set to 'fallback' falls through to the next route handler in the handler chain.</description></item> </list> <para>Defaults to abort.</para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserContextRouteFromHAROptions.Update"> <summary> <para> If specified, updates the given HAR with the actual network information instead of serving from file. The file is written to disk when <see cref="M:Microsoft.Playwright.IBrowserContext.CloseAsync(Microsoft.Playwright.BrowserContextCloseOptions)"/> is called. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserContextRouteFromHAROptions.UpdateContent"> <summary> <para> Optional setting to control resource content management. If <c>attach</c> is specified, resources are persisted as separate files or entries in the ZIP archive. If <c>embed</c> is specified, content is stored inline the HAR file. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserContextRouteFromHAROptions.UpdateMode"> <summary> <para> When set to <c>minimal</c>, only record information necessary for routing from HAR. This omits sizes, timing, page, cookies, security and other types of HAR information that are not used when replaying from HAR. Defaults to <c>minimal</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserContextRouteFromHAROptions.Url"> <summary> <para> A glob pattern, regular expression or predicate to match the request URL. Only requests with URL matching the pattern will be served from the HAR file. If not specified, all requests are served from the HAR file. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserContextRouteFromHAROptions.UrlRegex"> <summary> <para> A glob pattern, regular expression or predicate to match the request URL. Only requests with URL matching the pattern will be served from the HAR file. If not specified, all requests are served from the HAR file. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserContextRouteFromHAROptions.UrlString"> <summary> <para> A glob pattern, regular expression or predicate to match the request URL. Only requests with URL matching the pattern will be served from the HAR file. If not specified, all requests are served from the HAR file. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserContextRouteOptions.Times"> <summary><para>How often a route should be used. By default it will be used every time.</para></summary> </member> <member name="P:Microsoft.Playwright.BrowserContextRunAndWaitForConsoleMessageOptions.Predicate"> <summary> <para> Receives the <see cref="T:Microsoft.Playwright.IConsoleMessage"/> object and resolves to truthy value when the waiting should resolve. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserContextRunAndWaitForConsoleMessageOptions.Timeout"> <summary> <para> Maximum time to wait for in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/>. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserContextRunAndWaitForPageOptions.Predicate"> <summary> <para> Receives the <see cref="T:Microsoft.Playwright.IPage"/> object and resolves to truthy value when the waiting should resolve. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserContextRunAndWaitForPageOptions.Timeout"> <summary> <para> Maximum time to wait for in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/>. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserContextStorageStateOptions.IndexedDB"> <summary> <para> Set to <c>true</c> to include <a href="https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API">IndexedDB</a> in the storage state snapshot. If your application uses IndexedDB to store authentication tokens, like Firebase Authentication, enable this. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserContextStorageStateOptions.Path"> <summary> <para> The file path to save the storage state to. If <see cref="M:Microsoft.Playwright.IBrowserContext.StorageStateAsync(Microsoft.Playwright.BrowserContextStorageStateOptions)"/> is a relative path, then it is resolved relative to current working directory. If no path is provided, storage state is still returned, but won't be saved to the disk. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserContextUnrouteAllOptions.Behavior"> <summary> <para> Specifies whether to wait for already running handlers and what to do if they throw errors: </para> <list type="bullet"> <item><description> <c>'default'</c> - do not wait for current handler calls (if any) to finish, if unrouted handler throws, it may result in unhandled error </description></item> <item><description><c>'wait'</c> - wait for current handler calls (if any) to finish</description></item> <item><description> <c>'ignoreErrors'</c> - do not wait for current handler calls (if any) to finish, all errors thrown by the handlers after unrouting are silently caught </description></item> </list> </summary> </member> <member name="P:Microsoft.Playwright.BrowserContextWaitForConsoleMessageOptions.Predicate"> <summary> <para> Receives the <see cref="T:Microsoft.Playwright.IConsoleMessage"/> object and resolves to truthy value when the waiting should resolve. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserContextWaitForConsoleMessageOptions.Timeout"> <summary> <para> Maximum time to wait for in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/>. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserContextWaitForPageOptions.Predicate"> <summary> <para> Receives the <see cref="T:Microsoft.Playwright.IPage"/> object and resolves to truthy value when the waiting should resolve. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserContextWaitForPageOptions.Timeout"> <summary> <para> Maximum time to wait for in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/>. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserNewContextOptions.AcceptDownloads"> <summary> <para> Whether to automatically download all the attachments. Defaults to <c>true</c> where all the downloads are accepted. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserNewContextOptions.BaseURL"> <summary> <para> When using <see cref="M:Microsoft.Playwright.IPage.GotoAsync(System.String,Microsoft.Playwright.PageGotoOptions)"/>, <see cref="M:Microsoft.Playwright.IPage.RouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.PageRouteOptions)"/>, <see cref="M:Microsoft.Playwright.IPage.WaitForURLAsync(System.String,Microsoft.Playwright.PageWaitForURLOptions)"/>, <see cref="M:Microsoft.Playwright.IPage.RunAndWaitForRequestAsync(System.Func{System.Threading.Tasks.Task},System.String,Microsoft.Playwright.PageRunAndWaitForRequestOptions)"/>, or <see cref="M:Microsoft.Playwright.IPage.RunAndWaitForResponseAsync(System.Func{System.Threading.Tasks.Task},System.String,Microsoft.Playwright.PageRunAndWaitForResponseOptions)"/> it takes the base URL in consideration by using the <a href="https://developer.mozilla.org/en-US/docs/Web/API/URL/URL"><c>URL()</c></a> constructor for building the corresponding URL. Unset by default. Examples: </para> <list type="bullet"> <item><description> baseURL: <c>http://localhost:3000</c> and navigating to <c>/bar.html</c> results in <c>http://localhost:3000/bar.html</c> </description></item> <item><description> baseURL: <c>http://localhost:3000/foo/</c> and navigating to <c>./bar.html</c> results in <c>http://localhost:3000/foo/bar.html</c> </description></item> <item><description> baseURL: <c>http://localhost:3000/foo</c> (without trailing slash) and navigating to <c>./bar.html</c> results in <c>http://localhost:3000/bar.html</c> </description></item> </list> </summary> </member> <member name="P:Microsoft.Playwright.BrowserNewContextOptions.BypassCSP"> <summary><para>Toggles bypassing page's Content-Security-Policy. Defaults to <c>false</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.BrowserNewContextOptions.ClientCertificates"> <summary> <para> TLS Client Authentication allows the server to request a client certificate and verify it. </para> <para>**Details**</para> <para> An array of client certificates to be used. Each certificate object must have either both <c>certPath</c> and <c>keyPath</c>, a single <c>pfxPath</c>, or their corresponding direct value equivalents (<c>cert</c> and <c>key</c>, or <c>pfx</c>). Optionally, <c>passphrase</c> property should be provided if the certificate is encrypted. The <c>origin</c> property should be provided with an exact match to the request origin that the certificate is valid for. </para> <para> When using WebKit on macOS, accessing <c>localhost</c> will not pick up client certificates. You can make it work by replacing <c>localhost</c> with <c>local.playwright</c>. </para> </summary> <remarks> <para> When using WebKit on macOS, accessing <c>localhost</c> will not pick up client certificates. You can make it work by replacing <c>localhost</c> with <c>local.playwright</c>. </para> </remarks> </member> <member name="P:Microsoft.Playwright.BrowserNewContextOptions.ColorScheme"> <summary> <para> Emulates <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme">prefers-colors-scheme</a> media feature, supported values are <c>'light'</c> and <c>'dark'</c>. See <see cref="M:Microsoft.Playwright.IPage.EmulateMediaAsync(Microsoft.Playwright.PageEmulateMediaOptions)"/> for more details. Passing <c>'null'</c> resets emulation to system defaults. Defaults to <c>'light'</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserNewContextOptions.Contrast"> <summary> <para> Emulates <c>'prefers-contrast'</c> media feature, supported values are <c>'no-preference'</c>, <c>'more'</c>. See <see cref="M:Microsoft.Playwright.IPage.EmulateMediaAsync(Microsoft.Playwright.PageEmulateMediaOptions)"/> for more details. Passing <c>'null'</c> resets emulation to system defaults. Defaults to <c>'no-preference'</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserNewContextOptions.DeviceScaleFactor"> <summary> <para> Specify device scale factor (can be thought of as dpr). Defaults to <c>1</c>. Learn more about <a href="https://playwright.dev/dotnet/docs/emulation#devices">emulating devices with device scale factor</a>. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserNewContextOptions.ExtraHTTPHeaders"> <summary> <para> An object containing additional HTTP headers to be sent with every request. Defaults to none. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserNewContextOptions.ForcedColors"> <summary> <para> Emulates <c>'forced-colors'</c> media feature, supported values are <c>'active'</c>, <c>'none'</c>. See <see cref="M:Microsoft.Playwright.IPage.EmulateMediaAsync(Microsoft.Playwright.PageEmulateMediaOptions)"/> for more details. Passing <c>'null'</c> resets emulation to system defaults. Defaults to <c>'none'</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserNewContextOptions.HasTouch"> <summary> <para> Specifies if viewport supports touch events. Defaults to false. Learn more about <a href="https://playwright.dev/dotnet/docs/emulation#devices">mobile emulation</a>. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserNewContextOptions.HttpCredentials"> <summary> <para> Credentials for <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication">HTTP authentication</a>. If no origin is specified, the username and password are sent to any servers upon unauthorized responses. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserNewContextOptions.IgnoreHTTPSErrors"> <summary><para>Whether to ignore HTTPS errors when sending network requests. Defaults to <c>false</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.BrowserNewContextOptions.IsMobile"> <summary> <para> Whether the <c>meta viewport</c> tag is taken into account and touch events are enabled. isMobile is a part of device, so you don't actually need to set it manually. Defaults to <c>false</c> and is not supported in Firefox. Learn more about <a href="https://playwright.dev/dotnet/docs/emulation#ismobile">mobile emulation</a>. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserNewContextOptions.JavaScriptEnabled"> <summary> <para> Whether or not to enable JavaScript in the context. Defaults to <c>true</c>. Learn more about <a href="https://playwright.dev/dotnet/docs/emulation#javascript-enabled">disabling JavaScript</a>. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserNewContextOptions.Locale"> <summary> <para> Specify user locale, for example <c>en-GB</c>, <c>de-DE</c>, etc. Locale will affect <c>navigator.language</c> value, <c>Accept-Language</c> request header value as well as number and date formatting rules. Defaults to the system default locale. Learn more about emulation in our <a href="https://playwright.dev/dotnet/docs/emulation#locale--timezone">emulation guide</a>. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserNewContextOptions.Offline"> <summary> <para> Whether to emulate network being offline. Defaults to <c>false</c>. Learn more about <a href="https://playwright.dev/dotnet/docs/emulation#offline">network emulation</a>. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserNewContextOptions.Permissions"> <summary> <para> A list of permissions to grant to all pages in this context. See <see cref="M:Microsoft.Playwright.IBrowserContext.GrantPermissionsAsync(System.Collections.Generic.IEnumerable{System.String},Microsoft.Playwright.BrowserContextGrantPermissionsOptions)"/> for more details. Defaults to none. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserNewContextOptions.Proxy"> <summary><para>Network proxy settings to use with this context. Defaults to none.</para></summary> </member> <member name="P:Microsoft.Playwright.BrowserNewContextOptions.RecordHarContent"> <summary> <para> Optional setting to control resource content management. If <c>omit</c> is specified, content is not persisted. If <c>attach</c> is specified, resources are persisted as separate files and all of these files are archived along with the HAR file. Defaults to <c>embed</c>, which stores content inline the HAR file as per HAR specification. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserNewContextOptions.RecordHarMode"> <summary> <para> When set to <c>minimal</c>, only record information necessary for routing from HAR. This omits sizes, timing, page, cookies, security and other types of HAR information that are not used when replaying from HAR. Defaults to <c>full</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserNewContextOptions.RecordHarOmitContent"> <summary> <para> Optional setting to control whether to omit request content from the HAR. Defaults to <c>false</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserNewContextOptions.RecordHarPath"> <summary> <para> Enables <a href="http://www.softwareishard.com/blog/har-12-spec">HAR</a> recording for all pages into the specified HAR file on the filesystem. If not specified, the HAR is not recorded. Make sure to call <see cref="M:Microsoft.Playwright.IBrowserContext.CloseAsync(Microsoft.Playwright.BrowserContextCloseOptions)"/> for the HAR to be saved. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserNewContextOptions.RecordVideoDir"> <summary> <para> Enables video recording for all pages into the specified directory. If not specified videos are not recorded. Make sure to call <see cref="M:Microsoft.Playwright.IBrowserContext.CloseAsync(Microsoft.Playwright.BrowserContextCloseOptions)"/> for videos to be saved. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserNewContextOptions.RecordVideoSize"> <summary> <para> Dimensions of the recorded videos. If not specified the size will be equal to <c>viewport</c> scaled down to fit into 800x800. If <c>viewport</c> is not configured explicitly the video size defaults to 800x450. Actual picture of each page will be scaled down if necessary to fit the specified size. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserNewContextOptions.ReducedMotion"> <summary> <para> Emulates <c>'prefers-reduced-motion'</c> media feature, supported values are <c>'reduce'</c>, <c>'no-preference'</c>. See <see cref="M:Microsoft.Playwright.IPage.EmulateMediaAsync(Microsoft.Playwright.PageEmulateMediaOptions)"/> for more details. Passing <c>'null'</c> resets emulation to system defaults. Defaults to <c>'no-preference'</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserNewContextOptions.ScreenSize"> <summary> <para> Emulates consistent window screen size available inside web page via <c>window.screen</c>. Is only used when the <see cref="M:Microsoft.Playwright.IBrowser.NewContextAsync(Microsoft.Playwright.BrowserNewContextOptions)"/> is set. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserNewContextOptions.ServiceWorkers"> <summary> <para>Whether to allow sites to register Service workers. Defaults to <c>'allow'</c>.</para> <list type="bullet"> <item><description> <c>'allow'</c>: <a href="https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API">Service Workers</a> can be registered. </description></item> <item><description><c>'block'</c>: Playwright will block all registration of Service Workers.</description></item> </list> </summary> </member> <member name="P:Microsoft.Playwright.BrowserNewContextOptions.StorageState"> <summary> <para> Populates context with given storage state. This option can be used to initialize context with logged-in information obtained via <see cref="M:Microsoft.Playwright.IBrowserContext.StorageStateAsync(Microsoft.Playwright.BrowserContextStorageStateOptions)"/>. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserNewContextOptions.StorageStatePath"> <summary> <para> Populates context with given storage state. This option can be used to initialize context with logged-in information obtained via <see cref="M:Microsoft.Playwright.IBrowserContext.StorageStateAsync(Microsoft.Playwright.BrowserContextStorageStateOptions)"/>. Path to the file with saved storage state. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserNewContextOptions.StrictSelectors"> <summary> <para> If set to true, enables strict selectors mode for this context. In the strict selectors mode all operations on selectors that imply single target DOM element will throw when more than one element matches the selector. This option does not affect any Locator APIs (Locators are always strict). Defaults to <c>false</c>. See <see cref="T:Microsoft.Playwright.ILocator"/> to learn more about the strict mode. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserNewContextOptions.TimezoneId"> <summary> <para> Changes the timezone of the context. See <a href="https://cs.chromium.org/chromium/src/third_party/icu/source/data/misc/metaZones.txt?rcl=faee8bc70570192d82d2978a71e2a615788597d1">ICU's metaZones.txt</a> for a list of supported timezone IDs. Defaults to the system timezone. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserNewContextOptions.UserAgent"> <summary><para>Specific user agent to use in this context.</para></summary> </member> <member name="P:Microsoft.Playwright.BrowserNewContextOptions.ViewportSize"> <summary> <para> Emulates consistent viewport for each page. Defaults to an 1280x720 viewport. Use <c>ViewportSize.NoViewport</c> to disable the consistent viewport emulation. Learn more about <a href="https://playwright.dev/dotnet/docs/emulation#viewport">viewport emulation</a>. </para> <para> The <c>ViewportSize.NoViewport</c> value opts out from the default presets, makes viewport depend on the host window size defined by the operating system. It makes the execution of the tests non-deterministic. </para> </summary> <remarks> <para> The <c>ViewportSize.NoViewport</c> value opts out from the default presets, makes viewport depend on the host window size defined by the operating system. It makes the execution of the tests non-deterministic. </para> </remarks> </member> <member name="P:Microsoft.Playwright.BrowserNewPageOptions.AcceptDownloads"> <summary> <para> Whether to automatically download all the attachments. Defaults to <c>true</c> where all the downloads are accepted. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserNewPageOptions.BaseURL"> <summary> <para> When using <see cref="M:Microsoft.Playwright.IPage.GotoAsync(System.String,Microsoft.Playwright.PageGotoOptions)"/>, <see cref="M:Microsoft.Playwright.IPage.RouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.PageRouteOptions)"/>, <see cref="M:Microsoft.Playwright.IPage.WaitForURLAsync(System.String,Microsoft.Playwright.PageWaitForURLOptions)"/>, <see cref="M:Microsoft.Playwright.IPage.RunAndWaitForRequestAsync(System.Func{System.Threading.Tasks.Task},System.String,Microsoft.Playwright.PageRunAndWaitForRequestOptions)"/>, or <see cref="M:Microsoft.Playwright.IPage.RunAndWaitForResponseAsync(System.Func{System.Threading.Tasks.Task},System.String,Microsoft.Playwright.PageRunAndWaitForResponseOptions)"/> it takes the base URL in consideration by using the <a href="https://developer.mozilla.org/en-US/docs/Web/API/URL/URL"><c>URL()</c></a> constructor for building the corresponding URL. Unset by default. Examples: </para> <list type="bullet"> <item><description> baseURL: <c>http://localhost:3000</c> and navigating to <c>/bar.html</c> results in <c>http://localhost:3000/bar.html</c> </description></item> <item><description> baseURL: <c>http://localhost:3000/foo/</c> and navigating to <c>./bar.html</c> results in <c>http://localhost:3000/foo/bar.html</c> </description></item> <item><description> baseURL: <c>http://localhost:3000/foo</c> (without trailing slash) and navigating to <c>./bar.html</c> results in <c>http://localhost:3000/bar.html</c> </description></item> </list> </summary> </member> <member name="P:Microsoft.Playwright.BrowserNewPageOptions.BypassCSP"> <summary><para>Toggles bypassing page's Content-Security-Policy. Defaults to <c>false</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.BrowserNewPageOptions.ClientCertificates"> <summary> <para> TLS Client Authentication allows the server to request a client certificate and verify it. </para> <para>**Details**</para> <para> An array of client certificates to be used. Each certificate object must have either both <c>certPath</c> and <c>keyPath</c>, a single <c>pfxPath</c>, or their corresponding direct value equivalents (<c>cert</c> and <c>key</c>, or <c>pfx</c>). Optionally, <c>passphrase</c> property should be provided if the certificate is encrypted. The <c>origin</c> property should be provided with an exact match to the request origin that the certificate is valid for. </para> <para> When using WebKit on macOS, accessing <c>localhost</c> will not pick up client certificates. You can make it work by replacing <c>localhost</c> with <c>local.playwright</c>. </para> </summary> <remarks> <para> When using WebKit on macOS, accessing <c>localhost</c> will not pick up client certificates. You can make it work by replacing <c>localhost</c> with <c>local.playwright</c>. </para> </remarks> </member> <member name="P:Microsoft.Playwright.BrowserNewPageOptions.ColorScheme"> <summary> <para> Emulates <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme">prefers-colors-scheme</a> media feature, supported values are <c>'light'</c> and <c>'dark'</c>. See <see cref="M:Microsoft.Playwright.IPage.EmulateMediaAsync(Microsoft.Playwright.PageEmulateMediaOptions)"/> for more details. Passing <c>'null'</c> resets emulation to system defaults. Defaults to <c>'light'</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserNewPageOptions.Contrast"> <summary> <para> Emulates <c>'prefers-contrast'</c> media feature, supported values are <c>'no-preference'</c>, <c>'more'</c>. See <see cref="M:Microsoft.Playwright.IPage.EmulateMediaAsync(Microsoft.Playwright.PageEmulateMediaOptions)"/> for more details. Passing <c>'null'</c> resets emulation to system defaults. Defaults to <c>'no-preference'</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserNewPageOptions.DeviceScaleFactor"> <summary> <para> Specify device scale factor (can be thought of as dpr). Defaults to <c>1</c>. Learn more about <a href="https://playwright.dev/dotnet/docs/emulation#devices">emulating devices with device scale factor</a>. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserNewPageOptions.ExtraHTTPHeaders"> <summary> <para> An object containing additional HTTP headers to be sent with every request. Defaults to none. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserNewPageOptions.ForcedColors"> <summary> <para> Emulates <c>'forced-colors'</c> media feature, supported values are <c>'active'</c>, <c>'none'</c>. See <see cref="M:Microsoft.Playwright.IPage.EmulateMediaAsync(Microsoft.Playwright.PageEmulateMediaOptions)"/> for more details. Passing <c>'null'</c> resets emulation to system defaults. Defaults to <c>'none'</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserNewPageOptions.HasTouch"> <summary> <para> Specifies if viewport supports touch events. Defaults to false. Learn more about <a href="https://playwright.dev/dotnet/docs/emulation#devices">mobile emulation</a>. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserNewPageOptions.HttpCredentials"> <summary> <para> Credentials for <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication">HTTP authentication</a>. If no origin is specified, the username and password are sent to any servers upon unauthorized responses. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserNewPageOptions.IgnoreHTTPSErrors"> <summary><para>Whether to ignore HTTPS errors when sending network requests. Defaults to <c>false</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.BrowserNewPageOptions.IsMobile"> <summary> <para> Whether the <c>meta viewport</c> tag is taken into account and touch events are enabled. isMobile is a part of device, so you don't actually need to set it manually. Defaults to <c>false</c> and is not supported in Firefox. Learn more about <a href="https://playwright.dev/dotnet/docs/emulation#ismobile">mobile emulation</a>. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserNewPageOptions.JavaScriptEnabled"> <summary> <para> Whether or not to enable JavaScript in the context. Defaults to <c>true</c>. Learn more about <a href="https://playwright.dev/dotnet/docs/emulation#javascript-enabled">disabling JavaScript</a>. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserNewPageOptions.Locale"> <summary> <para> Specify user locale, for example <c>en-GB</c>, <c>de-DE</c>, etc. Locale will affect <c>navigator.language</c> value, <c>Accept-Language</c> request header value as well as number and date formatting rules. Defaults to the system default locale. Learn more about emulation in our <a href="https://playwright.dev/dotnet/docs/emulation#locale--timezone">emulation guide</a>. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserNewPageOptions.Offline"> <summary> <para> Whether to emulate network being offline. Defaults to <c>false</c>. Learn more about <a href="https://playwright.dev/dotnet/docs/emulation#offline">network emulation</a>. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserNewPageOptions.Permissions"> <summary> <para> A list of permissions to grant to all pages in this context. See <see cref="M:Microsoft.Playwright.IBrowserContext.GrantPermissionsAsync(System.Collections.Generic.IEnumerable{System.String},Microsoft.Playwright.BrowserContextGrantPermissionsOptions)"/> for more details. Defaults to none. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserNewPageOptions.Proxy"> <summary><para>Network proxy settings to use with this context. Defaults to none.</para></summary> </member> <member name="P:Microsoft.Playwright.BrowserNewPageOptions.RecordHarContent"> <summary> <para> Optional setting to control resource content management. If <c>omit</c> is specified, content is not persisted. If <c>attach</c> is specified, resources are persisted as separate files and all of these files are archived along with the HAR file. Defaults to <c>embed</c>, which stores content inline the HAR file as per HAR specification. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserNewPageOptions.RecordHarMode"> <summary> <para> When set to <c>minimal</c>, only record information necessary for routing from HAR. This omits sizes, timing, page, cookies, security and other types of HAR information that are not used when replaying from HAR. Defaults to <c>full</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserNewPageOptions.RecordHarOmitContent"> <summary> <para> Optional setting to control whether to omit request content from the HAR. Defaults to <c>false</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserNewPageOptions.RecordHarPath"> <summary> <para> Enables <a href="http://www.softwareishard.com/blog/har-12-spec">HAR</a> recording for all pages into the specified HAR file on the filesystem. If not specified, the HAR is not recorded. Make sure to call <see cref="M:Microsoft.Playwright.IBrowserContext.CloseAsync(Microsoft.Playwright.BrowserContextCloseOptions)"/> for the HAR to be saved. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserNewPageOptions.RecordVideoDir"> <summary> <para> Enables video recording for all pages into the specified directory. If not specified videos are not recorded. Make sure to call <see cref="M:Microsoft.Playwright.IBrowserContext.CloseAsync(Microsoft.Playwright.BrowserContextCloseOptions)"/> for videos to be saved. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserNewPageOptions.RecordVideoSize"> <summary> <para> Dimensions of the recorded videos. If not specified the size will be equal to <c>viewport</c> scaled down to fit into 800x800. If <c>viewport</c> is not configured explicitly the video size defaults to 800x450. Actual picture of each page will be scaled down if necessary to fit the specified size. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserNewPageOptions.ReducedMotion"> <summary> <para> Emulates <c>'prefers-reduced-motion'</c> media feature, supported values are <c>'reduce'</c>, <c>'no-preference'</c>. See <see cref="M:Microsoft.Playwright.IPage.EmulateMediaAsync(Microsoft.Playwright.PageEmulateMediaOptions)"/> for more details. Passing <c>'null'</c> resets emulation to system defaults. Defaults to <c>'no-preference'</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserNewPageOptions.ScreenSize"> <summary> <para> Emulates consistent window screen size available inside web page via <c>window.screen</c>. Is only used when the <see cref="M:Microsoft.Playwright.IBrowser.NewPageAsync(Microsoft.Playwright.BrowserNewPageOptions)"/> is set. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserNewPageOptions.ServiceWorkers"> <summary> <para>Whether to allow sites to register Service workers. Defaults to <c>'allow'</c>.</para> <list type="bullet"> <item><description> <c>'allow'</c>: <a href="https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API">Service Workers</a> can be registered. </description></item> <item><description><c>'block'</c>: Playwright will block all registration of Service Workers.</description></item> </list> </summary> </member> <member name="P:Microsoft.Playwright.BrowserNewPageOptions.StorageState"> <summary> <para> Populates context with given storage state. This option can be used to initialize context with logged-in information obtained via <see cref="M:Microsoft.Playwright.IBrowserContext.StorageStateAsync(Microsoft.Playwright.BrowserContextStorageStateOptions)"/>. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserNewPageOptions.StorageStatePath"> <summary> <para> Populates context with given storage state. This option can be used to initialize context with logged-in information obtained via <see cref="M:Microsoft.Playwright.IBrowserContext.StorageStateAsync(Microsoft.Playwright.BrowserContextStorageStateOptions)"/>. Path to the file with saved storage state. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserNewPageOptions.StrictSelectors"> <summary> <para> If set to true, enables strict selectors mode for this context. In the strict selectors mode all operations on selectors that imply single target DOM element will throw when more than one element matches the selector. This option does not affect any Locator APIs (Locators are always strict). Defaults to <c>false</c>. See <see cref="T:Microsoft.Playwright.ILocator"/> to learn more about the strict mode. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserNewPageOptions.TimezoneId"> <summary> <para> Changes the timezone of the context. See <a href="https://cs.chromium.org/chromium/src/third_party/icu/source/data/misc/metaZones.txt?rcl=faee8bc70570192d82d2978a71e2a615788597d1">ICU's metaZones.txt</a> for a list of supported timezone IDs. Defaults to the system timezone. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserNewPageOptions.UserAgent"> <summary><para>Specific user agent to use in this context.</para></summary> </member> <member name="P:Microsoft.Playwright.BrowserNewPageOptions.ViewportSize"> <summary> <para> Emulates consistent viewport for each page. Defaults to an 1280x720 viewport. Use <c>ViewportSize.NoViewport</c> to disable the consistent viewport emulation. Learn more about <a href="https://playwright.dev/dotnet/docs/emulation#viewport">viewport emulation</a>. </para> <para> The <c>ViewportSize.NoViewport</c> value opts out from the default presets, makes viewport depend on the host window size defined by the operating system. It makes the execution of the tests non-deterministic. </para> </summary> <remarks> <para> The <c>ViewportSize.NoViewport</c> value opts out from the default presets, makes viewport depend on the host window size defined by the operating system. It makes the execution of the tests non-deterministic. </para> </remarks> </member> <member name="P:Microsoft.Playwright.BrowserTypeConnectOptions.ExposeNetwork"> <summary> <para> This option exposes network available on the connecting client to the browser being connected to. Consists of a list of rules separated by comma. </para> <para>Available rules:</para> <list type="ordinal"> <item><description> Hostname pattern, for example: <c>example.com</c>, <c>*.org:99</c>, <c>x.*.y.com</c>, <c>*foo.org</c>. </description></item> <item><description>IP literal, for example: <c>127.0.0.1</c>, <c>0.0.0.0:99</c>, <c>[::1]</c>, <c>[0:0::1]:99</c>.</description></item> <item><description> <c><loopback></c> that matches local loopback interfaces: <c>localhost</c>, <c>*.localhost</c>, <c>127.0.0.1</c>, <c>[::1]</c>. </description></item> </list> <para>Some common examples:</para> <list type="ordinal"> <item><description><c>"*"</c> to expose all network.</description></item> <item><description><c>"<loopback>"</c> to expose localhost network.</description></item> <item><description> <c>"*.test.internal-domain,*.staging.internal-domain,<loopback>"</c> to expose test/staging deployments and localhost. </description></item> </list> </summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeConnectOptions.Headers"> <summary><para>Additional HTTP headers to be sent with web socket connect request. Optional.</para></summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeConnectOptions.SlowMo"> <summary> <para> Slows down Playwright operations by the specified amount of milliseconds. Useful so that you can see what is going on. Defaults to 0. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeConnectOptions.Timeout"> <summary> <para> Maximum time in milliseconds to wait for the connection to be established. Defaults to <c>0</c> (no timeout). </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeConnectOverCDPOptions.Headers"> <summary><para>Additional HTTP headers to be sent with connect request. Optional.</para></summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeConnectOverCDPOptions.SlowMo"> <summary> <para> Slows down Playwright operations by the specified amount of milliseconds. Useful so that you can see what is going on. Defaults to 0. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeConnectOverCDPOptions.Timeout"> <summary> <para> Maximum time in milliseconds to wait for the connection to be established. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeLaunchOptions.Args"> <summary> <para>Use custom browser args at your own risk, as some of them may break Playwright functionality.</para> <para> Additional arguments to pass to the browser instance. The list of Chromium flags can be found <a href="https://peter.sh/experiments/chromium-command-line-switches/">here</a>. </para> </summary> <remarks> <para> Use custom browser args at your own risk, as some of them may break Playwright functionality. </para> </remarks> </member> <member name="P:Microsoft.Playwright.BrowserTypeLaunchOptions.Channel"> <summary> <para>Browser distribution channel.</para> <para> Use "chromium" to <a href="https://playwright.dev/dotnet/docs/browsers#chromium-new-headless-mode">opt in to new headless mode</a>. </para> <para> Use "chrome", "chrome-beta", "chrome-dev", "chrome-canary", "msedge", "msedge-beta", "msedge-dev", or "msedge-canary" to use branded <a href="https://playwright.dev/dotnet/docs/browsers#google-chrome--microsoft-edge">Google Chrome and Microsoft Edge</a>. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeLaunchOptions.ChromiumSandbox"> <summary><para>Enable Chromium sandboxing. Defaults to <c>false</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeLaunchOptions.Devtools"> <summary> <para> **DEPRECATED** Use <a href="https://playwright.dev/dotnet/docs/debug">debugging tools</a> instead. </para> <para> **Chromium-only** Whether to auto-open a Developer Tools panel for each tab. If this option is <c>true</c>, the <see cref="M:Microsoft.Playwright.IBrowserType.LaunchAsync(Microsoft.Playwright.BrowserTypeLaunchOptions)"/> option will be set <c>false</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeLaunchOptions.DownloadsPath"> <summary> <para> If specified, accepted downloads are downloaded into this directory. Otherwise, temporary directory is created and is deleted when browser is closed. In either case, the downloads are deleted when the browser context they were created in is closed. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeLaunchOptions.Env"> <summary><para>Specify environment variables that will be visible to the browser. Defaults to <c>process.env</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeLaunchOptions.ExecutablePath"> <summary> <para> Path to a browser executable to run instead of the bundled one. If <see cref="M:Microsoft.Playwright.IBrowserType.LaunchAsync(Microsoft.Playwright.BrowserTypeLaunchOptions)"/> is a relative path, then it is resolved relative to the current working directory. Note that Playwright only works with the bundled Chromium, Firefox or WebKit, use at your own risk. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeLaunchOptions.FirefoxUserPrefs"> <summary><para>Firefox user preferences. Learn more about the Firefox user preferences at <a href="https://support.mozilla.org/en-US/kb/about-config-editor-firefox"><c>about:config</c></a>.</para></summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeLaunchOptions.HandleSIGHUP"> <summary><para>Close the browser process on SIGHUP. Defaults to <c>true</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeLaunchOptions.HandleSIGINT"> <summary><para>Close the browser process on Ctrl-C. Defaults to <c>true</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeLaunchOptions.HandleSIGTERM"> <summary><para>Close the browser process on SIGTERM. Defaults to <c>true</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeLaunchOptions.Headless"> <summary> <para> Whether to run browser in headless mode. More details for <a href="https://developers.google.com/web/updates/2017/04/headless-chrome">Chromium</a> and <a href="https://hacks.mozilla.org/2017/12/using-headless-mode-in-firefox/">Firefox</a>. Defaults to <c>true</c> unless the <see cref="M:Microsoft.Playwright.IBrowserType.LaunchAsync(Microsoft.Playwright.BrowserTypeLaunchOptions)"/> option is <c>true</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeLaunchOptions.IgnoreAllDefaultArgs"> <summary> <para> If <c>true</c>, Playwright does not pass its own configurations args and only uses the ones from <see cref="M:Microsoft.Playwright.IBrowserType.LaunchAsync(Microsoft.Playwright.BrowserTypeLaunchOptions)"/>. Dangerous option; use with care. Defaults to <c>false</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeLaunchOptions.IgnoreDefaultArgs"> <summary> <para> If <c>true</c>, Playwright does not pass its own configurations args and only uses the ones from <see cref="M:Microsoft.Playwright.IBrowserType.LaunchAsync(Microsoft.Playwright.BrowserTypeLaunchOptions)"/>. Dangerous option; use with care. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeLaunchOptions.Proxy"> <summary><para>Network proxy settings.</para></summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeLaunchOptions.SlowMo"> <summary> <para> Slows down Playwright operations by the specified amount of milliseconds. Useful so that you can see what is going on. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeLaunchOptions.Timeout"> <summary> <para> Maximum time in milliseconds to wait for the browser instance to start. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeLaunchOptions.TracesDir"> <summary><para>If specified, traces are saved into this directory.</para></summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeLaunchPersistentContextOptions.AcceptDownloads"> <summary> <para> Whether to automatically download all the attachments. Defaults to <c>true</c> where all the downloads are accepted. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeLaunchPersistentContextOptions.Args"> <summary> <para>Use custom browser args at your own risk, as some of them may break Playwright functionality.</para> <para> Additional arguments to pass to the browser instance. The list of Chromium flags can be found <a href="https://peter.sh/experiments/chromium-command-line-switches/">here</a>. </para> </summary> <remarks> <para> Use custom browser args at your own risk, as some of them may break Playwright functionality. </para> </remarks> </member> <member name="P:Microsoft.Playwright.BrowserTypeLaunchPersistentContextOptions.BaseURL"> <summary> <para> When using <see cref="M:Microsoft.Playwright.IPage.GotoAsync(System.String,Microsoft.Playwright.PageGotoOptions)"/>, <see cref="M:Microsoft.Playwright.IPage.RouteAsync(System.String,System.Action{Microsoft.Playwright.IRoute},Microsoft.Playwright.PageRouteOptions)"/>, <see cref="M:Microsoft.Playwright.IPage.WaitForURLAsync(System.String,Microsoft.Playwright.PageWaitForURLOptions)"/>, <see cref="M:Microsoft.Playwright.IPage.RunAndWaitForRequestAsync(System.Func{System.Threading.Tasks.Task},System.String,Microsoft.Playwright.PageRunAndWaitForRequestOptions)"/>, or <see cref="M:Microsoft.Playwright.IPage.RunAndWaitForResponseAsync(System.Func{System.Threading.Tasks.Task},System.String,Microsoft.Playwright.PageRunAndWaitForResponseOptions)"/> it takes the base URL in consideration by using the <a href="https://developer.mozilla.org/en-US/docs/Web/API/URL/URL"><c>URL()</c></a> constructor for building the corresponding URL. Unset by default. Examples: </para> <list type="bullet"> <item><description> baseURL: <c>http://localhost:3000</c> and navigating to <c>/bar.html</c> results in <c>http://localhost:3000/bar.html</c> </description></item> <item><description> baseURL: <c>http://localhost:3000/foo/</c> and navigating to <c>./bar.html</c> results in <c>http://localhost:3000/foo/bar.html</c> </description></item> <item><description> baseURL: <c>http://localhost:3000/foo</c> (without trailing slash) and navigating to <c>./bar.html</c> results in <c>http://localhost:3000/bar.html</c> </description></item> </list> </summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeLaunchPersistentContextOptions.BypassCSP"> <summary><para>Toggles bypassing page's Content-Security-Policy. Defaults to <c>false</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeLaunchPersistentContextOptions.Channel"> <summary> <para>Browser distribution channel.</para> <para> Use "chromium" to <a href="https://playwright.dev/dotnet/docs/browsers#chromium-new-headless-mode">opt in to new headless mode</a>. </para> <para> Use "chrome", "chrome-beta", "chrome-dev", "chrome-canary", "msedge", "msedge-beta", "msedge-dev", or "msedge-canary" to use branded <a href="https://playwright.dev/dotnet/docs/browsers#google-chrome--microsoft-edge">Google Chrome and Microsoft Edge</a>. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeLaunchPersistentContextOptions.ChromiumSandbox"> <summary><para>Enable Chromium sandboxing. Defaults to <c>false</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeLaunchPersistentContextOptions.ClientCertificates"> <summary> <para> TLS Client Authentication allows the server to request a client certificate and verify it. </para> <para>**Details**</para> <para> An array of client certificates to be used. Each certificate object must have either both <c>certPath</c> and <c>keyPath</c>, a single <c>pfxPath</c>, or their corresponding direct value equivalents (<c>cert</c> and <c>key</c>, or <c>pfx</c>). Optionally, <c>passphrase</c> property should be provided if the certificate is encrypted. The <c>origin</c> property should be provided with an exact match to the request origin that the certificate is valid for. </para> <para> When using WebKit on macOS, accessing <c>localhost</c> will not pick up client certificates. You can make it work by replacing <c>localhost</c> with <c>local.playwright</c>. </para> </summary> <remarks> <para> When using WebKit on macOS, accessing <c>localhost</c> will not pick up client certificates. You can make it work by replacing <c>localhost</c> with <c>local.playwright</c>. </para> </remarks> </member> <member name="P:Microsoft.Playwright.BrowserTypeLaunchPersistentContextOptions.ColorScheme"> <summary> <para> Emulates <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme">prefers-colors-scheme</a> media feature, supported values are <c>'light'</c> and <c>'dark'</c>. See <see cref="M:Microsoft.Playwright.IPage.EmulateMediaAsync(Microsoft.Playwright.PageEmulateMediaOptions)"/> for more details. Passing <c>'null'</c> resets emulation to system defaults. Defaults to <c>'light'</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeLaunchPersistentContextOptions.Contrast"> <summary> <para> Emulates <c>'prefers-contrast'</c> media feature, supported values are <c>'no-preference'</c>, <c>'more'</c>. See <see cref="M:Microsoft.Playwright.IPage.EmulateMediaAsync(Microsoft.Playwright.PageEmulateMediaOptions)"/> for more details. Passing <c>'null'</c> resets emulation to system defaults. Defaults to <c>'no-preference'</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeLaunchPersistentContextOptions.DeviceScaleFactor"> <summary> <para> Specify device scale factor (can be thought of as dpr). Defaults to <c>1</c>. Learn more about <a href="https://playwright.dev/dotnet/docs/emulation#devices">emulating devices with device scale factor</a>. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeLaunchPersistentContextOptions.Devtools"> <summary> <para> **DEPRECATED** Use <a href="https://playwright.dev/dotnet/docs/debug">debugging tools</a> instead. </para> <para> **Chromium-only** Whether to auto-open a Developer Tools panel for each tab. If this option is <c>true</c>, the <see cref="M:Microsoft.Playwright.IBrowserType.LaunchPersistentContextAsync(System.String,Microsoft.Playwright.BrowserTypeLaunchPersistentContextOptions)"/> option will be set <c>false</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeLaunchPersistentContextOptions.DownloadsPath"> <summary> <para> If specified, accepted downloads are downloaded into this directory. Otherwise, temporary directory is created and is deleted when browser is closed. In either case, the downloads are deleted when the browser context they were created in is closed. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeLaunchPersistentContextOptions.Env"> <summary><para>Specify environment variables that will be visible to the browser. Defaults to <c>process.env</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeLaunchPersistentContextOptions.ExecutablePath"> <summary> <para> Path to a browser executable to run instead of the bundled one. If <see cref="M:Microsoft.Playwright.IBrowserType.LaunchPersistentContextAsync(System.String,Microsoft.Playwright.BrowserTypeLaunchPersistentContextOptions)"/> is a relative path, then it is resolved relative to the current working directory. Note that Playwright only works with the bundled Chromium, Firefox or WebKit, use at your own risk. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeLaunchPersistentContextOptions.ExtraHTTPHeaders"> <summary> <para> An object containing additional HTTP headers to be sent with every request. Defaults to none. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeLaunchPersistentContextOptions.FirefoxUserPrefs"> <summary><para>Firefox user preferences. Learn more about the Firefox user preferences at <a href="https://support.mozilla.org/en-US/kb/about-config-editor-firefox"><c>about:config</c></a>.</para></summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeLaunchPersistentContextOptions.ForcedColors"> <summary> <para> Emulates <c>'forced-colors'</c> media feature, supported values are <c>'active'</c>, <c>'none'</c>. See <see cref="M:Microsoft.Playwright.IPage.EmulateMediaAsync(Microsoft.Playwright.PageEmulateMediaOptions)"/> for more details. Passing <c>'null'</c> resets emulation to system defaults. Defaults to <c>'none'</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeLaunchPersistentContextOptions.HandleSIGHUP"> <summary><para>Close the browser process on SIGHUP. Defaults to <c>true</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeLaunchPersistentContextOptions.HandleSIGINT"> <summary><para>Close the browser process on Ctrl-C. Defaults to <c>true</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeLaunchPersistentContextOptions.HandleSIGTERM"> <summary><para>Close the browser process on SIGTERM. Defaults to <c>true</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeLaunchPersistentContextOptions.HasTouch"> <summary> <para> Specifies if viewport supports touch events. Defaults to false. Learn more about <a href="https://playwright.dev/dotnet/docs/emulation#devices">mobile emulation</a>. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeLaunchPersistentContextOptions.Headless"> <summary> <para> Whether to run browser in headless mode. More details for <a href="https://developers.google.com/web/updates/2017/04/headless-chrome">Chromium</a> and <a href="https://hacks.mozilla.org/2017/12/using-headless-mode-in-firefox/">Firefox</a>. Defaults to <c>true</c> unless the <see cref="M:Microsoft.Playwright.IBrowserType.LaunchAsync(Microsoft.Playwright.BrowserTypeLaunchOptions)"/> option is <c>true</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeLaunchPersistentContextOptions.HttpCredentials"> <summary> <para> Credentials for <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication">HTTP authentication</a>. If no origin is specified, the username and password are sent to any servers upon unauthorized responses. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeLaunchPersistentContextOptions.IgnoreAllDefaultArgs"> <summary> <para> If <c>true</c>, Playwright does not pass its own configurations args and only uses the ones from <see cref="M:Microsoft.Playwright.IBrowserType.LaunchPersistentContextAsync(System.String,Microsoft.Playwright.BrowserTypeLaunchPersistentContextOptions)"/>. Dangerous option; use with care. Defaults to <c>false</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeLaunchPersistentContextOptions.IgnoreDefaultArgs"> <summary> <para> If <c>true</c>, Playwright does not pass its own configurations args and only uses the ones from <see cref="M:Microsoft.Playwright.IBrowserType.LaunchPersistentContextAsync(System.String,Microsoft.Playwright.BrowserTypeLaunchPersistentContextOptions)"/>. Dangerous option; use with care. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeLaunchPersistentContextOptions.IgnoreHTTPSErrors"> <summary><para>Whether to ignore HTTPS errors when sending network requests. Defaults to <c>false</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeLaunchPersistentContextOptions.IsMobile"> <summary> <para> Whether the <c>meta viewport</c> tag is taken into account and touch events are enabled. isMobile is a part of device, so you don't actually need to set it manually. Defaults to <c>false</c> and is not supported in Firefox. Learn more about <a href="https://playwright.dev/dotnet/docs/emulation#ismobile">mobile emulation</a>. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeLaunchPersistentContextOptions.JavaScriptEnabled"> <summary> <para> Whether or not to enable JavaScript in the context. Defaults to <c>true</c>. Learn more about <a href="https://playwright.dev/dotnet/docs/emulation#javascript-enabled">disabling JavaScript</a>. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeLaunchPersistentContextOptions.Locale"> <summary> <para> Specify user locale, for example <c>en-GB</c>, <c>de-DE</c>, etc. Locale will affect <c>navigator.language</c> value, <c>Accept-Language</c> request header value as well as number and date formatting rules. Defaults to the system default locale. Learn more about emulation in our <a href="https://playwright.dev/dotnet/docs/emulation#locale--timezone">emulation guide</a>. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeLaunchPersistentContextOptions.Offline"> <summary> <para> Whether to emulate network being offline. Defaults to <c>false</c>. Learn more about <a href="https://playwright.dev/dotnet/docs/emulation#offline">network emulation</a>. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeLaunchPersistentContextOptions.Permissions"> <summary> <para> A list of permissions to grant to all pages in this context. See <see cref="M:Microsoft.Playwright.IBrowserContext.GrantPermissionsAsync(System.Collections.Generic.IEnumerable{System.String},Microsoft.Playwright.BrowserContextGrantPermissionsOptions)"/> for more details. Defaults to none. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeLaunchPersistentContextOptions.Proxy"> <summary><para>Network proxy settings.</para></summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeLaunchPersistentContextOptions.RecordHarContent"> <summary> <para> Optional setting to control resource content management. If <c>omit</c> is specified, content is not persisted. If <c>attach</c> is specified, resources are persisted as separate files and all of these files are archived along with the HAR file. Defaults to <c>embed</c>, which stores content inline the HAR file as per HAR specification. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeLaunchPersistentContextOptions.RecordHarMode"> <summary> <para> When set to <c>minimal</c>, only record information necessary for routing from HAR. This omits sizes, timing, page, cookies, security and other types of HAR information that are not used when replaying from HAR. Defaults to <c>full</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeLaunchPersistentContextOptions.RecordHarOmitContent"> <summary> <para> Optional setting to control whether to omit request content from the HAR. Defaults to <c>false</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeLaunchPersistentContextOptions.RecordHarPath"> <summary> <para> Enables <a href="http://www.softwareishard.com/blog/har-12-spec">HAR</a> recording for all pages into the specified HAR file on the filesystem. If not specified, the HAR is not recorded. Make sure to call <see cref="M:Microsoft.Playwright.IBrowserContext.CloseAsync(Microsoft.Playwright.BrowserContextCloseOptions)"/> for the HAR to be saved. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeLaunchPersistentContextOptions.RecordVideoDir"> <summary> <para> Enables video recording for all pages into the specified directory. If not specified videos are not recorded. Make sure to call <see cref="M:Microsoft.Playwright.IBrowserContext.CloseAsync(Microsoft.Playwright.BrowserContextCloseOptions)"/> for videos to be saved. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeLaunchPersistentContextOptions.RecordVideoSize"> <summary> <para> Dimensions of the recorded videos. If not specified the size will be equal to <c>viewport</c> scaled down to fit into 800x800. If <c>viewport</c> is not configured explicitly the video size defaults to 800x450. Actual picture of each page will be scaled down if necessary to fit the specified size. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeLaunchPersistentContextOptions.ReducedMotion"> <summary> <para> Emulates <c>'prefers-reduced-motion'</c> media feature, supported values are <c>'reduce'</c>, <c>'no-preference'</c>. See <see cref="M:Microsoft.Playwright.IPage.EmulateMediaAsync(Microsoft.Playwright.PageEmulateMediaOptions)"/> for more details. Passing <c>'null'</c> resets emulation to system defaults. Defaults to <c>'no-preference'</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeLaunchPersistentContextOptions.ScreenSize"> <summary> <para> Emulates consistent window screen size available inside web page via <c>window.screen</c>. Is only used when the <see cref="M:Microsoft.Playwright.IBrowserType.LaunchPersistentContextAsync(System.String,Microsoft.Playwright.BrowserTypeLaunchPersistentContextOptions)"/> is set. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeLaunchPersistentContextOptions.ServiceWorkers"> <summary> <para>Whether to allow sites to register Service workers. Defaults to <c>'allow'</c>.</para> <list type="bullet"> <item><description> <c>'allow'</c>: <a href="https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API">Service Workers</a> can be registered. </description></item> <item><description><c>'block'</c>: Playwright will block all registration of Service Workers.</description></item> </list> </summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeLaunchPersistentContextOptions.SlowMo"> <summary> <para> Slows down Playwright operations by the specified amount of milliseconds. Useful so that you can see what is going on. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeLaunchPersistentContextOptions.StrictSelectors"> <summary> <para> If set to true, enables strict selectors mode for this context. In the strict selectors mode all operations on selectors that imply single target DOM element will throw when more than one element matches the selector. This option does not affect any Locator APIs (Locators are always strict). Defaults to <c>false</c>. See <see cref="T:Microsoft.Playwright.ILocator"/> to learn more about the strict mode. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeLaunchPersistentContextOptions.Timeout"> <summary> <para> Maximum time in milliseconds to wait for the browser instance to start. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeLaunchPersistentContextOptions.TimezoneId"> <summary> <para> Changes the timezone of the context. See <a href="https://cs.chromium.org/chromium/src/third_party/icu/source/data/misc/metaZones.txt?rcl=faee8bc70570192d82d2978a71e2a615788597d1">ICU's metaZones.txt</a> for a list of supported timezone IDs. Defaults to the system timezone. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeLaunchPersistentContextOptions.TracesDir"> <summary><para>If specified, traces are saved into this directory.</para></summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeLaunchPersistentContextOptions.UserAgent"> <summary><para>Specific user agent to use in this context.</para></summary> </member> <member name="P:Microsoft.Playwright.BrowserTypeLaunchPersistentContextOptions.ViewportSize"> <summary> <para> Emulates consistent viewport for each page. Defaults to an 1280x720 viewport. Use <c>ViewportSize.NoViewport</c> to disable the consistent viewport emulation. Learn more about <a href="https://playwright.dev/dotnet/docs/emulation#viewport">viewport emulation</a>. </para> <para> The <c>ViewportSize.NoViewport</c> value opts out from the default presets, makes viewport depend on the host window size defined by the operating system. It makes the execution of the tests non-deterministic. </para> </summary> <remarks> <para> The <c>ViewportSize.NoViewport</c> value opts out from the default presets, makes viewport depend on the host window size defined by the operating system. It makes the execution of the tests non-deterministic. </para> </remarks> </member> <member name="P:Microsoft.Playwright.ClockInstallOptions.Time"> <summary><para>Time to initialize with, current system time by default.</para></summary> </member> <member name="P:Microsoft.Playwright.ClockInstallOptions.TimeDate"> <summary><para>Time to initialize with, current system time by default.</para></summary> </member> <member name="P:Microsoft.Playwright.ClockInstallOptions.TimeString"> <summary><para>Time to initialize with, current system time by default.</para></summary> </member> <member name="P:Microsoft.Playwright.ElementHandleCheckOptions.Force"> <summary> <para> Whether to bypass the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks. Defaults to <c>false</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleCheckOptions.NoWaitAfter"> <summary> <para>**DEPRECATED** This option has no effect.</para> <para>This option has no effect.</para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleCheckOptions.Position"> <summary> <para> A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of the element. </para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleCheckOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleCheckOptions.Trial"> <summary> <para> When set, this method only performs the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks and skips the action. Defaults to <c>false</c>. Useful to wait until the element is ready for the action without performing it. </para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleClickOptions.Button"> <summary><para>Defaults to <c>left</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.ElementHandleClickOptions.ClickCount"> <summary><para>defaults to 1. See <see cref="!:UIEvent.detail"/>.</para></summary> </member> <member name="P:Microsoft.Playwright.ElementHandleClickOptions.Delay"> <summary> <para> Time to wait between <c>mousedown</c> and <c>mouseup</c> in milliseconds. Defaults to 0. </para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleClickOptions.Force"> <summary> <para> Whether to bypass the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks. Defaults to <c>false</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleClickOptions.Modifiers"> <summary> <para> Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to "Control" on Windows and Linux and to "Meta" on macOS. </para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleClickOptions.NoWaitAfter"> <summary> <para>**DEPRECATED** This option will default to <c>true</c> in the future.</para> <para> Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to inaccessible pages. Defaults to <c>false</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleClickOptions.Position"> <summary> <para> A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of the element. </para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleClickOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleClickOptions.Trial"> <summary> <para> When set, this method only performs the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks and skips the action. Defaults to <c>false</c>. Useful to wait until the element is ready for the action without performing it. </para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleDblClickOptions.Button"> <summary><para>Defaults to <c>left</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.ElementHandleDblClickOptions.Delay"> <summary> <para> Time to wait between <c>mousedown</c> and <c>mouseup</c> in milliseconds. Defaults to 0. </para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleDblClickOptions.Force"> <summary> <para> Whether to bypass the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks. Defaults to <c>false</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleDblClickOptions.Modifiers"> <summary> <para> Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to "Control" on Windows and Linux and to "Meta" on macOS. </para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleDblClickOptions.NoWaitAfter"> <summary> <para>**DEPRECATED** This option has no effect.</para> <para>This option has no effect.</para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleDblClickOptions.Position"> <summary> <para> A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of the element. </para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleDblClickOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleDblClickOptions.Trial"> <summary> <para> When set, this method only performs the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks and skips the action. Defaults to <c>false</c>. Useful to wait until the element is ready for the action without performing it. </para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleFillOptions.Force"> <summary> <para> Whether to bypass the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks. Defaults to <c>false</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleFillOptions.NoWaitAfter"> <summary> <para>**DEPRECATED** This option has no effect.</para> <para>This option has no effect.</para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleFillOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleHoverOptions.Force"> <summary> <para> Whether to bypass the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks. Defaults to <c>false</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleHoverOptions.Modifiers"> <summary> <para> Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to "Control" on Windows and Linux and to "Meta" on macOS. </para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleHoverOptions.NoWaitAfter"> <summary> <para>**DEPRECATED** This option has no effect.</para> <para>This option has no effect.</para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleHoverOptions.Position"> <summary> <para> A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of the element. </para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleHoverOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleHoverOptions.Trial"> <summary> <para> When set, this method only performs the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks and skips the action. Defaults to <c>false</c>. Useful to wait until the element is ready for the action without performing it. </para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleInputValueOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandlePressOptions.Delay"> <summary> <para> Time to wait between <c>keydown</c> and <c>keyup</c> in milliseconds. Defaults to 0. </para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandlePressOptions.NoWaitAfter"> <summary> <para>**DEPRECATED** This option will default to <c>true</c> in the future.</para> <para> Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to inaccessible pages. Defaults to <c>false</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandlePressOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleScreenshotOptions.Animations"> <summary> <para> When set to <c>"disabled"</c>, stops CSS animations, CSS transitions and Web Animations. Animations get different treatment depending on their duration: </para> <list type="bullet"> <item><description> finite animations are fast-forwarded to completion, so they'll fire <c>transitionend</c> event. </description></item> <item><description> infinite animations are canceled to initial state, and then played over after the screenshot. </description></item> </list> <para>Defaults to <c>"allow"</c> that leaves animations untouched.</para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleScreenshotOptions.Caret"> <summary> <para> When set to <c>"hide"</c>, screenshot will hide text caret. When set to <c>"initial"</c>, text caret behavior will not be changed. Defaults to <c>"hide"</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleScreenshotOptions.Mask"> <summary> <para> Specify locators that should be masked when the screenshot is taken. Masked elements will be overlaid with a pink box <c>#FF00FF</c> (customized by <see cref="M:Microsoft.Playwright.IElementHandle.ScreenshotAsync(Microsoft.Playwright.ElementHandleScreenshotOptions)"/>) that completely covers its bounding box. The mask is also applied to invisible elements, see <a href="https://playwright.dev/dotnet/docs/locators#matching-only-visible-elements">Matching only visible elements</a> to disable that. </para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleScreenshotOptions.MaskColor"> <summary> <para> Specify the color of the overlay box for masked elements, in <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/color_value">CSS color format</a>. Default color is pink <c>#FF00FF</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleScreenshotOptions.OmitBackground"> <summary> <para> Hides default white background and allows capturing screenshots with transparency. Not applicable to <c>jpeg</c> images. Defaults to <c>false</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleScreenshotOptions.Path"> <summary> <para> The file path to save the image to. The screenshot type will be inferred from file extension. If <see cref="M:Microsoft.Playwright.IElementHandle.ScreenshotAsync(Microsoft.Playwright.ElementHandleScreenshotOptions)"/> is a relative path, then it is resolved relative to the current working directory. If no path is provided, the image won't be saved to the disk. </para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleScreenshotOptions.Quality"> <summary><para>The quality of the image, between 0-100. Not applicable to <c>png</c> images.</para></summary> </member> <member name="P:Microsoft.Playwright.ElementHandleScreenshotOptions.Scale"> <summary> <para> When set to <c>"css"</c>, screenshot will have a single pixel per each css pixel on the page. For high-dpi devices, this will keep screenshots small. Using <c>"device"</c> option will produce a single pixel per each device pixel, so screenshots of high-dpi devices will be twice as large or even larger. </para> <para>Defaults to <c>"device"</c>.</para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleScreenshotOptions.Style"> <summary> <para> Text of the stylesheet to apply while making the screenshot. This is where you can hide dynamic elements, make elements invisible or change their properties to help you creating repeatable screenshots. This stylesheet pierces the Shadow DOM and applies to the inner frames. </para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleScreenshotOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleScreenshotOptions.Type"> <summary><para>Specify screenshot type, defaults to <c>png</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.ElementHandleScrollIntoViewIfNeededOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleSelectOptionOptions.Force"> <summary> <para> Whether to bypass the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks. Defaults to <c>false</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleSelectOptionOptions.NoWaitAfter"> <summary> <para>**DEPRECATED** This option has no effect.</para> <para>This option has no effect.</para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleSelectOptionOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleSelectTextOptions.Force"> <summary> <para> Whether to bypass the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks. Defaults to <c>false</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleSelectTextOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleSetCheckedOptions.Force"> <summary> <para> Whether to bypass the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks. Defaults to <c>false</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleSetCheckedOptions.NoWaitAfter"> <summary> <para>**DEPRECATED** This option has no effect.</para> <para>This option has no effect.</para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleSetCheckedOptions.Position"> <summary> <para> A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of the element. </para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleSetCheckedOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleSetCheckedOptions.Trial"> <summary> <para> When set, this method only performs the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks and skips the action. Defaults to <c>false</c>. Useful to wait until the element is ready for the action without performing it. </para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleSetInputFilesOptions.NoWaitAfter"> <summary> <para>**DEPRECATED** This option has no effect.</para> <para>This option has no effect.</para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleSetInputFilesOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleTapOptions.Force"> <summary> <para> Whether to bypass the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks. Defaults to <c>false</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleTapOptions.Modifiers"> <summary> <para> Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to "Control" on Windows and Linux and to "Meta" on macOS. </para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleTapOptions.NoWaitAfter"> <summary> <para>**DEPRECATED** This option has no effect.</para> <para>This option has no effect.</para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleTapOptions.Position"> <summary> <para> A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of the element. </para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleTapOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleTapOptions.Trial"> <summary> <para> When set, this method only performs the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks and skips the action. Defaults to <c>false</c>. Useful to wait until the element is ready for the action without performing it. </para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleTypeOptions.Delay"> <summary><para>Time to wait between key presses in milliseconds. Defaults to 0.</para></summary> </member> <member name="P:Microsoft.Playwright.ElementHandleTypeOptions.NoWaitAfter"> <summary> <para>**DEPRECATED** This option has no effect.</para> <para>This option has no effect.</para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleTypeOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleUncheckOptions.Force"> <summary> <para> Whether to bypass the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks. Defaults to <c>false</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleUncheckOptions.NoWaitAfter"> <summary> <para>**DEPRECATED** This option has no effect.</para> <para>This option has no effect.</para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleUncheckOptions.Position"> <summary> <para> A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of the element. </para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleUncheckOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleUncheckOptions.Trial"> <summary> <para> When set, this method only performs the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks and skips the action. Defaults to <c>false</c>. Useful to wait until the element is ready for the action without performing it. </para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleWaitForElementStateOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleWaitForSelectorOptions.State"> <summary> <para>Defaults to <c>'visible'</c>. Can be either:</para> <list type="bullet"> <item><description><c>'attached'</c> - wait for element to be present in DOM.</description></item> <item><description><c>'detached'</c> - wait for element to not be present in DOM.</description></item> <item><description> <c>'visible'</c> - wait for element to have non-empty bounding box and no <c>visibility:hidden</c>. Note that element without any content or with <c>display:none</c> has an empty bounding box and is not considered visible. </description></item> <item><description> <c>'hidden'</c> - wait for element to be either detached from DOM, or have an empty bounding box or <c>visibility:hidden</c>. This is opposite to the <c>'visible'</c> option. </description></item> </list> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleWaitForSelectorOptions.Strict"> <summary> <para> When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception. </para> </summary> </member> <member name="P:Microsoft.Playwright.ElementHandleWaitForSelectorOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.FileChooserSetFilesOptions.NoWaitAfter"> <summary> <para>**DEPRECATED** This option has no effect.</para> <para>This option has no effect.</para> </summary> </member> <member name="P:Microsoft.Playwright.FileChooserSetFilesOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameAddScriptTagOptions.Content"> <summary><para>Raw JavaScript content to be injected into frame.</para></summary> </member> <member name="P:Microsoft.Playwright.FrameAddScriptTagOptions.Path"> <summary> <para> Path to the JavaScript file to be injected into frame. If <c>path</c> is a relative path, then it is resolved relative to the current working directory. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameAddScriptTagOptions.Type"> <summary> <para> Script type. Use 'module' in order to load a JavaScript ES6 module. See <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script">script</a> for more details. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameAddScriptTagOptions.Url"> <summary><para>URL of a script to be added.</para></summary> </member> <member name="P:Microsoft.Playwright.FrameAddStyleTagOptions.Content"> <summary><para>Raw CSS content to be injected into frame.</para></summary> </member> <member name="P:Microsoft.Playwright.FrameAddStyleTagOptions.Path"> <summary> <para> Path to the CSS file to be injected into frame. If <c>path</c> is a relative path, then it is resolved relative to the current working directory. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameAddStyleTagOptions.Url"> <summary><para>URL of the <c><link></c> tag.</para></summary> </member> <member name="P:Microsoft.Playwright.FrameCheckOptions.Force"> <summary> <para> Whether to bypass the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks. Defaults to <c>false</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameCheckOptions.NoWaitAfter"> <summary> <para>**DEPRECATED** This option has no effect.</para> <para>This option has no effect.</para> </summary> </member> <member name="P:Microsoft.Playwright.FrameCheckOptions.Position"> <summary> <para> A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of the element. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameCheckOptions.Strict"> <summary> <para> When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameCheckOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameCheckOptions.Trial"> <summary> <para> When set, this method only performs the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks and skips the action. Defaults to <c>false</c>. Useful to wait until the element is ready for the action without performing it. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameClickOptions.Button"> <summary><para>Defaults to <c>left</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.FrameClickOptions.ClickCount"> <summary><para>defaults to 1. See <see cref="!:UIEvent.detail"/>.</para></summary> </member> <member name="P:Microsoft.Playwright.FrameClickOptions.Delay"> <summary> <para> Time to wait between <c>mousedown</c> and <c>mouseup</c> in milliseconds. Defaults to 0. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameClickOptions.Force"> <summary> <para> Whether to bypass the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks. Defaults to <c>false</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameClickOptions.Modifiers"> <summary> <para> Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to "Control" on Windows and Linux and to "Meta" on macOS. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameClickOptions.NoWaitAfter"> <summary> <para>**DEPRECATED** This option will default to <c>true</c> in the future.</para> <para> Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to inaccessible pages. Defaults to <c>false</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameClickOptions.Position"> <summary> <para> A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of the element. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameClickOptions.Strict"> <summary> <para> When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameClickOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameClickOptions.Trial"> <summary> <para> When set, this method only performs the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks and skips the action. Defaults to <c>false</c>. Useful to wait until the element is ready for the action without performing it. Note that keyboard <c>modifiers</c> will be pressed regardless of <c>trial</c> to allow testing elements which are only visible when those keys are pressed. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameDblClickOptions.Button"> <summary><para>Defaults to <c>left</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.FrameDblClickOptions.Delay"> <summary> <para> Time to wait between <c>mousedown</c> and <c>mouseup</c> in milliseconds. Defaults to 0. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameDblClickOptions.Force"> <summary> <para> Whether to bypass the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks. Defaults to <c>false</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameDblClickOptions.Modifiers"> <summary> <para> Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to "Control" on Windows and Linux and to "Meta" on macOS. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameDblClickOptions.NoWaitAfter"> <summary> <para>**DEPRECATED** This option has no effect.</para> <para>This option has no effect.</para> </summary> </member> <member name="P:Microsoft.Playwright.FrameDblClickOptions.Position"> <summary> <para> A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of the element. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameDblClickOptions.Strict"> <summary> <para> When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameDblClickOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameDblClickOptions.Trial"> <summary> <para> When set, this method only performs the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks and skips the action. Defaults to <c>false</c>. Useful to wait until the element is ready for the action without performing it. Note that keyboard <c>modifiers</c> will be pressed regardless of <c>trial</c> to allow testing elements which are only visible when those keys are pressed. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameDispatchEventOptions.Strict"> <summary> <para> When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameDispatchEventOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameDragAndDropOptions.Force"> <summary> <para> Whether to bypass the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks. Defaults to <c>false</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameDragAndDropOptions.NoWaitAfter"> <summary> <para>**DEPRECATED** This option has no effect.</para> <para>This option has no effect.</para> </summary> </member> <member name="P:Microsoft.Playwright.FrameDragAndDropOptions.SourcePosition"> <summary> <para> Clicks on the source element at this point relative to the top-left corner of the element's padding box. If not specified, some visible point of the element is used. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameDragAndDropOptions.Strict"> <summary> <para> When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameDragAndDropOptions.TargetPosition"> <summary> <para> Drops on the target element at this point relative to the top-left corner of the element's padding box. If not specified, some visible point of the element is used. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameDragAndDropOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameDragAndDropOptions.Trial"> <summary> <para> When set, this method only performs the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks and skips the action. Defaults to <c>false</c>. Useful to wait until the element is ready for the action without performing it. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameEvalOnSelectorOptions.Strict"> <summary> <para> When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameFillOptions.Force"> <summary> <para> Whether to bypass the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks. Defaults to <c>false</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameFillOptions.NoWaitAfter"> <summary> <para>**DEPRECATED** This option has no effect.</para> <para>This option has no effect.</para> </summary> </member> <member name="P:Microsoft.Playwright.FrameFillOptions.Strict"> <summary> <para> When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameFillOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameFocusOptions.Strict"> <summary> <para> When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameFocusOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameGetAttributeOptions.Strict"> <summary> <para> When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameGetAttributeOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameGetByAltTextOptions.Exact"> <summary> <para> Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a regular expression. Note that exact match still trims whitespace. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameGetByLabelOptions.Exact"> <summary> <para> Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a regular expression. Note that exact match still trims whitespace. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameGetByPlaceholderOptions.Exact"> <summary> <para> Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a regular expression. Note that exact match still trims whitespace. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameGetByRoleOptions.Checked"> <summary> <para> An attribute that is usually set by <c>aria-checked</c> or native <c><input type=checkbox></c> controls. </para> <para>Learn more about <a href="https://www.w3.org/TR/wai-aria-1.2/#aria-checked"><c>aria-checked</c></a>.</para> </summary> </member> <member name="P:Microsoft.Playwright.FrameGetByRoleOptions.Disabled"> <summary> <para>An attribute that is usually set by <c>aria-disabled</c> or <c>disabled</c>.</para> <para> Unlike most other attributes, <c>disabled</c> is inherited through the DOM hierarchy. Learn more about <a href="https://www.w3.org/TR/wai-aria-1.2/#aria-disabled"><c>aria-disabled</c></a>. </para> </summary> <remarks> <para> Unlike most other attributes, <c>disabled</c> is inherited through the DOM hierarchy. Learn more about <a href="https://www.w3.org/TR/wai-aria-1.2/#aria-disabled"><c>aria-disabled</c></a>. </para> </remarks> </member> <member name="P:Microsoft.Playwright.FrameGetByRoleOptions.Exact"> <summary> <para> Whether <see cref="M:Microsoft.Playwright.IFrame.GetByRole(Microsoft.Playwright.AriaRole,Microsoft.Playwright.FrameGetByRoleOptions)"/> is matched exactly: case-sensitive and whole-string. Defaults to false. Ignored when <see cref="M:Microsoft.Playwright.IFrame.GetByRole(Microsoft.Playwright.AriaRole,Microsoft.Playwright.FrameGetByRoleOptions)"/> is a regular expression. Note that exact match still trims whitespace. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameGetByRoleOptions.Expanded"> <summary> <para>An attribute that is usually set by <c>aria-expanded</c>.</para> <para>Learn more about <a href="https://www.w3.org/TR/wai-aria-1.2/#aria-expanded"><c>aria-expanded</c></a>.</para> </summary> </member> <member name="P:Microsoft.Playwright.FrameGetByRoleOptions.IncludeHidden"> <summary> <para> Option that controls whether hidden elements are matched. By default, only non-hidden elements, as <a href="https://www.w3.org/TR/wai-aria-1.2/#tree_exclusion">defined by ARIA</a>, are matched by role selector. </para> <para>Learn more about <a href="https://www.w3.org/TR/wai-aria-1.2/#aria-hidden"><c>aria-hidden</c></a>.</para> </summary> </member> <member name="P:Microsoft.Playwright.FrameGetByRoleOptions.Level"> <summary> <para> A number attribute that is usually present for roles <c>heading</c>, <c>listitem</c>, <c>row</c>, <c>treeitem</c>, with default values for <c><h1>-<h6></c> elements. </para> <para>Learn more about <a href="https://www.w3.org/TR/wai-aria-1.2/#aria-level"><c>aria-level</c></a>.</para> </summary> </member> <member name="P:Microsoft.Playwright.FrameGetByRoleOptions.Name"> <summary> <para> Option to match the <a href="https://w3c.github.io/accname/#dfn-accessible-name">accessible name</a>. By default, matching is case-insensitive and searches for a substring, use <see cref="M:Microsoft.Playwright.IFrame.GetByRole(Microsoft.Playwright.AriaRole,Microsoft.Playwright.FrameGetByRoleOptions)"/> to control this behavior. </para> <para> Learn more about <a href="https://w3c.github.io/accname/#dfn-accessible-name">accessible name</a>. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameGetByRoleOptions.NameRegex"> <summary> <para> Option to match the <a href="https://w3c.github.io/accname/#dfn-accessible-name">accessible name</a>. By default, matching is case-insensitive and searches for a substring, use <see cref="M:Microsoft.Playwright.IFrame.GetByRole(Microsoft.Playwright.AriaRole,Microsoft.Playwright.FrameGetByRoleOptions)"/> to control this behavior. </para> <para> Learn more about <a href="https://w3c.github.io/accname/#dfn-accessible-name">accessible name</a>. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameGetByRoleOptions.NameString"> <summary> <para> Option to match the <a href="https://w3c.github.io/accname/#dfn-accessible-name">accessible name</a>. By default, matching is case-insensitive and searches for a substring, use <see cref="M:Microsoft.Playwright.IFrame.GetByRole(Microsoft.Playwright.AriaRole,Microsoft.Playwright.FrameGetByRoleOptions)"/> to control this behavior. </para> <para> Learn more about <a href="https://w3c.github.io/accname/#dfn-accessible-name">accessible name</a>. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameGetByRoleOptions.Pressed"> <summary> <para>An attribute that is usually set by <c>aria-pressed</c>.</para> <para>Learn more about <a href="https://www.w3.org/TR/wai-aria-1.2/#aria-pressed"><c>aria-pressed</c></a>.</para> </summary> </member> <member name="P:Microsoft.Playwright.FrameGetByRoleOptions.Selected"> <summary> <para>An attribute that is usually set by <c>aria-selected</c>.</para> <para>Learn more about <a href="https://www.w3.org/TR/wai-aria-1.2/#aria-selected"><c>aria-selected</c></a>.</para> </summary> </member> <member name="P:Microsoft.Playwright.FrameGetByTextOptions.Exact"> <summary> <para> Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a regular expression. Note that exact match still trims whitespace. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameGetByTitleOptions.Exact"> <summary> <para> Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a regular expression. Note that exact match still trims whitespace. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameGotoOptions.Referer"> <summary> <para> Referer header value. If provided it will take preference over the referer header value set by <see cref="M:Microsoft.Playwright.IPage.SetExtraHTTPHeadersAsync(System.Collections.Generic.IEnumerable{System.Collections.Generic.KeyValuePair{System.String,System.String}})"/>. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameGotoOptions.Timeout"> <summary> <para> Maximum operation time in milliseconds, defaults to 30 seconds, pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultNavigationTimeout(System.Single)"/>, <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/>, <see cref="M:Microsoft.Playwright.IPage.SetDefaultNavigationTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameGotoOptions.WaitUntil"> <summary> <para>When to consider operation succeeded, defaults to <c>load</c>. Events can be either:</para> <list type="bullet"> <item><description> <c>'domcontentloaded'</c> - consider operation to be finished when the <c>DOMContentLoaded</c> event is fired. </description></item> <item><description> <c>'load'</c> - consider operation to be finished when the <c>load</c> event is fired. </description></item> <item><description> <c>'networkidle'</c> - **DISCOURAGED** consider operation to be finished when there are no network connections for at least <c>500</c> ms. Don't use this method for testing, rely on web assertions to assess readiness instead. </description></item> <item><description> <c>'commit'</c> - consider operation to be finished when network response is received and the document started loading. </description></item> </list> </summary> </member> <member name="P:Microsoft.Playwright.FrameHoverOptions.Force"> <summary> <para> Whether to bypass the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks. Defaults to <c>false</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameHoverOptions.Modifiers"> <summary> <para> Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to "Control" on Windows and Linux and to "Meta" on macOS. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameHoverOptions.NoWaitAfter"> <summary> <para>**DEPRECATED** This option has no effect.</para> <para>This option has no effect.</para> </summary> </member> <member name="P:Microsoft.Playwright.FrameHoverOptions.Position"> <summary> <para> A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of the element. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameHoverOptions.Strict"> <summary> <para> When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameHoverOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameHoverOptions.Trial"> <summary> <para> When set, this method only performs the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks and skips the action. Defaults to <c>false</c>. Useful to wait until the element is ready for the action without performing it. Note that keyboard <c>modifiers</c> will be pressed regardless of <c>trial</c> to allow testing elements which are only visible when those keys are pressed. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameInnerHTMLOptions.Strict"> <summary> <para> When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameInnerHTMLOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameInnerTextOptions.Strict"> <summary> <para> When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameInnerTextOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameInputValueOptions.Strict"> <summary> <para> When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameInputValueOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameIsCheckedOptions.Strict"> <summary> <para> When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameIsCheckedOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameIsDisabledOptions.Strict"> <summary> <para> When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameIsDisabledOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameIsEditableOptions.Strict"> <summary> <para> When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameIsEditableOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameIsEnabledOptions.Strict"> <summary> <para> When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameIsEnabledOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameIsHiddenOptions.Strict"> <summary> <para> When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameIsHiddenOptions.Timeout"> <summary> <para> **DEPRECATED** This option is ignored. <see cref="M:Microsoft.Playwright.IFrame.IsHiddenAsync(System.String,Microsoft.Playwright.FrameIsHiddenOptions)"/> does not wait for the element to become hidden and returns immediately. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameIsVisibleOptions.Strict"> <summary> <para> When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameIsVisibleOptions.Timeout"> <summary> <para> **DEPRECATED** This option is ignored. <see cref="M:Microsoft.Playwright.IFrame.IsVisibleAsync(System.String,Microsoft.Playwright.FrameIsVisibleOptions)"/> does not wait for the element to become visible and returns immediately. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameLocatorGetByAltTextOptions.Exact"> <summary> <para> Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a regular expression. Note that exact match still trims whitespace. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameLocatorGetByLabelOptions.Exact"> <summary> <para> Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a regular expression. Note that exact match still trims whitespace. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameLocatorGetByPlaceholderOptions.Exact"> <summary> <para> Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a regular expression. Note that exact match still trims whitespace. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameLocatorGetByRoleOptions.Checked"> <summary> <para> An attribute that is usually set by <c>aria-checked</c> or native <c><input type=checkbox></c> controls. </para> <para>Learn more about <a href="https://www.w3.org/TR/wai-aria-1.2/#aria-checked"><c>aria-checked</c></a>.</para> </summary> </member> <member name="P:Microsoft.Playwright.FrameLocatorGetByRoleOptions.Disabled"> <summary> <para>An attribute that is usually set by <c>aria-disabled</c> or <c>disabled</c>.</para> <para> Unlike most other attributes, <c>disabled</c> is inherited through the DOM hierarchy. Learn more about <a href="https://www.w3.org/TR/wai-aria-1.2/#aria-disabled"><c>aria-disabled</c></a>. </para> </summary> <remarks> <para> Unlike most other attributes, <c>disabled</c> is inherited through the DOM hierarchy. Learn more about <a href="https://www.w3.org/TR/wai-aria-1.2/#aria-disabled"><c>aria-disabled</c></a>. </para> </remarks> </member> <member name="P:Microsoft.Playwright.FrameLocatorGetByRoleOptions.Exact"> <summary> <para> Whether <see cref="M:Microsoft.Playwright.IFrameLocator.GetByRole(Microsoft.Playwright.AriaRole,Microsoft.Playwright.FrameLocatorGetByRoleOptions)"/> is matched exactly: case-sensitive and whole-string. Defaults to false. Ignored when <see cref="M:Microsoft.Playwright.IFrameLocator.GetByRole(Microsoft.Playwright.AriaRole,Microsoft.Playwright.FrameLocatorGetByRoleOptions)"/> is a regular expression. Note that exact match still trims whitespace. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameLocatorGetByRoleOptions.Expanded"> <summary> <para>An attribute that is usually set by <c>aria-expanded</c>.</para> <para>Learn more about <a href="https://www.w3.org/TR/wai-aria-1.2/#aria-expanded"><c>aria-expanded</c></a>.</para> </summary> </member> <member name="P:Microsoft.Playwright.FrameLocatorGetByRoleOptions.IncludeHidden"> <summary> <para> Option that controls whether hidden elements are matched. By default, only non-hidden elements, as <a href="https://www.w3.org/TR/wai-aria-1.2/#tree_exclusion">defined by ARIA</a>, are matched by role selector. </para> <para>Learn more about <a href="https://www.w3.org/TR/wai-aria-1.2/#aria-hidden"><c>aria-hidden</c></a>.</para> </summary> </member> <member name="P:Microsoft.Playwright.FrameLocatorGetByRoleOptions.Level"> <summary> <para> A number attribute that is usually present for roles <c>heading</c>, <c>listitem</c>, <c>row</c>, <c>treeitem</c>, with default values for <c><h1>-<h6></c> elements. </para> <para>Learn more about <a href="https://www.w3.org/TR/wai-aria-1.2/#aria-level"><c>aria-level</c></a>.</para> </summary> </member> <member name="P:Microsoft.Playwright.FrameLocatorGetByRoleOptions.Name"> <summary> <para> Option to match the <a href="https://w3c.github.io/accname/#dfn-accessible-name">accessible name</a>. By default, matching is case-insensitive and searches for a substring, use <see cref="M:Microsoft.Playwright.IFrameLocator.GetByRole(Microsoft.Playwright.AriaRole,Microsoft.Playwright.FrameLocatorGetByRoleOptions)"/> to control this behavior. </para> <para> Learn more about <a href="https://w3c.github.io/accname/#dfn-accessible-name">accessible name</a>. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameLocatorGetByRoleOptions.NameRegex"> <summary> <para> Option to match the <a href="https://w3c.github.io/accname/#dfn-accessible-name">accessible name</a>. By default, matching is case-insensitive and searches for a substring, use <see cref="M:Microsoft.Playwright.IFrameLocator.GetByRole(Microsoft.Playwright.AriaRole,Microsoft.Playwright.FrameLocatorGetByRoleOptions)"/> to control this behavior. </para> <para> Learn more about <a href="https://w3c.github.io/accname/#dfn-accessible-name">accessible name</a>. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameLocatorGetByRoleOptions.NameString"> <summary> <para> Option to match the <a href="https://w3c.github.io/accname/#dfn-accessible-name">accessible name</a>. By default, matching is case-insensitive and searches for a substring, use <see cref="M:Microsoft.Playwright.IFrameLocator.GetByRole(Microsoft.Playwright.AriaRole,Microsoft.Playwright.FrameLocatorGetByRoleOptions)"/> to control this behavior. </para> <para> Learn more about <a href="https://w3c.github.io/accname/#dfn-accessible-name">accessible name</a>. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameLocatorGetByRoleOptions.Pressed"> <summary> <para>An attribute that is usually set by <c>aria-pressed</c>.</para> <para>Learn more about <a href="https://www.w3.org/TR/wai-aria-1.2/#aria-pressed"><c>aria-pressed</c></a>.</para> </summary> </member> <member name="P:Microsoft.Playwright.FrameLocatorGetByRoleOptions.Selected"> <summary> <para>An attribute that is usually set by <c>aria-selected</c>.</para> <para>Learn more about <a href="https://www.w3.org/TR/wai-aria-1.2/#aria-selected"><c>aria-selected</c></a>.</para> </summary> </member> <member name="P:Microsoft.Playwright.FrameLocatorGetByTextOptions.Exact"> <summary> <para> Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a regular expression. Note that exact match still trims whitespace. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameLocatorGetByTitleOptions.Exact"> <summary> <para> Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a regular expression. Note that exact match still trims whitespace. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameLocatorLocatorOptions.Has"> <summary> <para> Narrows down the results of the method to those which contain elements matching this relative locator. For example, <c>article</c> that has <c>text=Playwright</c> matches <c><article><div>Playwright</div></article></c>. </para> <para> Inner locator **must be relative** to the outer locator and is queried starting with the outer locator match, not the document root. For example, you can find <c>content</c> that has <c>div</c> in <c><article><content><div>Playwright</div></content></article></c>. However, looking for <c>content</c> that has <c>article div</c> will fail, because the inner locator must be relative and should not use any elements outside the <c>content</c>. </para> <para> Note that outer and inner locators must belong to the same frame. Inner locator must not contain <see cref="T:Microsoft.Playwright.IFrameLocator"/>s. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameLocatorLocatorOptions.HasNot"> <summary> <para> Matches elements that do not contain an element that matches an inner locator. Inner locator is queried against the outer one. For example, <c>article</c> that does not have <c>div</c> matches <c><article><span>Playwright</span></article></c>. </para> <para> Note that outer and inner locators must belong to the same frame. Inner locator must not contain <see cref="T:Microsoft.Playwright.IFrameLocator"/>s. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameLocatorLocatorOptions.HasNotText"> <summary> <para> Matches elements that do not contain specified text somewhere inside, possibly in a child or a descendant element. When passed a <see cref="T:System.String"/>, matching is case-insensitive and searches for a substring. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameLocatorLocatorOptions.HasNotTextRegex"> <summary> <para> Matches elements that do not contain specified text somewhere inside, possibly in a child or a descendant element. When passed a <see cref="T:System.String"/>, matching is case-insensitive and searches for a substring. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameLocatorLocatorOptions.HasNotTextString"> <summary> <para> Matches elements that do not contain specified text somewhere inside, possibly in a child or a descendant element. When passed a <see cref="T:System.String"/>, matching is case-insensitive and searches for a substring. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameLocatorLocatorOptions.HasText"> <summary> <para> Matches elements containing specified text somewhere inside, possibly in a child or a descendant element. When passed a <see cref="T:System.String"/>, matching is case-insensitive and searches for a substring. For example, <c>"Playwright"</c> matches <c><article><div>Playwright</div></article></c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameLocatorLocatorOptions.HasTextRegex"> <summary> <para> Matches elements containing specified text somewhere inside, possibly in a child or a descendant element. When passed a <see cref="T:System.String"/>, matching is case-insensitive and searches for a substring. For example, <c>"Playwright"</c> matches <c><article><div>Playwright</div></article></c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameLocatorLocatorOptions.HasTextString"> <summary> <para> Matches elements containing specified text somewhere inside, possibly in a child or a descendant element. When passed a <see cref="T:System.String"/>, matching is case-insensitive and searches for a substring. For example, <c>"Playwright"</c> matches <c><article><div>Playwright</div></article></c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameLocatorOptions.Has"> <summary> <para> Narrows down the results of the method to those which contain elements matching this relative locator. For example, <c>article</c> that has <c>text=Playwright</c> matches <c><article><div>Playwright</div></article></c>. </para> <para> Inner locator **must be relative** to the outer locator and is queried starting with the outer locator match, not the document root. For example, you can find <c>content</c> that has <c>div</c> in <c><article><content><div>Playwright</div></content></article></c>. However, looking for <c>content</c> that has <c>article div</c> will fail, because the inner locator must be relative and should not use any elements outside the <c>content</c>. </para> <para> Note that outer and inner locators must belong to the same frame. Inner locator must not contain <see cref="T:Microsoft.Playwright.IFrameLocator"/>s. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameLocatorOptions.HasNot"> <summary> <para> Matches elements that do not contain an element that matches an inner locator. Inner locator is queried against the outer one. For example, <c>article</c> that does not have <c>div</c> matches <c><article><span>Playwright</span></article></c>. </para> <para> Note that outer and inner locators must belong to the same frame. Inner locator must not contain <see cref="T:Microsoft.Playwright.IFrameLocator"/>s. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameLocatorOptions.HasNotText"> <summary> <para> Matches elements that do not contain specified text somewhere inside, possibly in a child or a descendant element. When passed a <see cref="T:System.String"/>, matching is case-insensitive and searches for a substring. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameLocatorOptions.HasNotTextRegex"> <summary> <para> Matches elements that do not contain specified text somewhere inside, possibly in a child or a descendant element. When passed a <see cref="T:System.String"/>, matching is case-insensitive and searches for a substring. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameLocatorOptions.HasNotTextString"> <summary> <para> Matches elements that do not contain specified text somewhere inside, possibly in a child or a descendant element. When passed a <see cref="T:System.String"/>, matching is case-insensitive and searches for a substring. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameLocatorOptions.HasText"> <summary> <para> Matches elements containing specified text somewhere inside, possibly in a child or a descendant element. When passed a <see cref="T:System.String"/>, matching is case-insensitive and searches for a substring. For example, <c>"Playwright"</c> matches <c><article><div>Playwright</div></article></c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameLocatorOptions.HasTextRegex"> <summary> <para> Matches elements containing specified text somewhere inside, possibly in a child or a descendant element. When passed a <see cref="T:System.String"/>, matching is case-insensitive and searches for a substring. For example, <c>"Playwright"</c> matches <c><article><div>Playwright</div></article></c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameLocatorOptions.HasTextString"> <summary> <para> Matches elements containing specified text somewhere inside, possibly in a child or a descendant element. When passed a <see cref="T:System.String"/>, matching is case-insensitive and searches for a substring. For example, <c>"Playwright"</c> matches <c><article><div>Playwright</div></article></c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.FramePressOptions.Delay"> <summary> <para> Time to wait between <c>keydown</c> and <c>keyup</c> in milliseconds. Defaults to 0. </para> </summary> </member> <member name="P:Microsoft.Playwright.FramePressOptions.NoWaitAfter"> <summary> <para>**DEPRECATED** This option will default to <c>true</c> in the future.</para> <para> Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to inaccessible pages. Defaults to <c>false</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.FramePressOptions.Strict"> <summary> <para> When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception. </para> </summary> </member> <member name="P:Microsoft.Playwright.FramePressOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameQuerySelectorOptions.Strict"> <summary> <para> When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameRunAndWaitForNavigationOptions.Timeout"> <summary> <para> Maximum operation time in milliseconds, defaults to 30 seconds, pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultNavigationTimeout(System.Single)"/>, <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/>, <see cref="M:Microsoft.Playwright.IPage.SetDefaultNavigationTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameRunAndWaitForNavigationOptions.Url"> <summary> <para> A glob pattern, regex pattern or predicate receiving <see cref="!:URL"/> to match while waiting for the navigation. Note that if the parameter is a string without wildcard characters, the method will wait for navigation to URL that is exactly equal to the string. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameRunAndWaitForNavigationOptions.UrlFunc"> <summary> <para> A glob pattern, regex pattern or predicate receiving <see cref="!:URL"/> to match while waiting for the navigation. Note that if the parameter is a string without wildcard characters, the method will wait for navigation to URL that is exactly equal to the string. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameRunAndWaitForNavigationOptions.UrlRegex"> <summary> <para> A glob pattern, regex pattern or predicate receiving <see cref="!:URL"/> to match while waiting for the navigation. Note that if the parameter is a string without wildcard characters, the method will wait for navigation to URL that is exactly equal to the string. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameRunAndWaitForNavigationOptions.UrlString"> <summary> <para> A glob pattern, regex pattern or predicate receiving <see cref="!:URL"/> to match while waiting for the navigation. Note that if the parameter is a string without wildcard characters, the method will wait for navigation to URL that is exactly equal to the string. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameRunAndWaitForNavigationOptions.WaitUntil"> <summary> <para>When to consider operation succeeded, defaults to <c>load</c>. Events can be either:</para> <list type="bullet"> <item><description> <c>'domcontentloaded'</c> - consider operation to be finished when the <c>DOMContentLoaded</c> event is fired. </description></item> <item><description> <c>'load'</c> - consider operation to be finished when the <c>load</c> event is fired. </description></item> <item><description> <c>'networkidle'</c> - **DISCOURAGED** consider operation to be finished when there are no network connections for at least <c>500</c> ms. Don't use this method for testing, rely on web assertions to assess readiness instead. </description></item> <item><description> <c>'commit'</c> - consider operation to be finished when network response is received and the document started loading. </description></item> </list> </summary> </member> <member name="P:Microsoft.Playwright.FrameSelectOptionOptions.Force"> <summary> <para> Whether to bypass the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks. Defaults to <c>false</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameSelectOptionOptions.NoWaitAfter"> <summary> <para>**DEPRECATED** This option has no effect.</para> <para>This option has no effect.</para> </summary> </member> <member name="P:Microsoft.Playwright.FrameSelectOptionOptions.Strict"> <summary> <para> When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameSelectOptionOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameSetCheckedOptions.Force"> <summary> <para> Whether to bypass the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks. Defaults to <c>false</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameSetCheckedOptions.NoWaitAfter"> <summary> <para>**DEPRECATED** This option has no effect.</para> <para>This option has no effect.</para> </summary> </member> <member name="P:Microsoft.Playwright.FrameSetCheckedOptions.Position"> <summary> <para> A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of the element. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameSetCheckedOptions.Strict"> <summary> <para> When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameSetCheckedOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameSetCheckedOptions.Trial"> <summary> <para> When set, this method only performs the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks and skips the action. Defaults to <c>false</c>. Useful to wait until the element is ready for the action without performing it. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameSetContentOptions.Timeout"> <summary> <para> Maximum operation time in milliseconds, defaults to 30 seconds, pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultNavigationTimeout(System.Single)"/>, <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/>, <see cref="M:Microsoft.Playwright.IPage.SetDefaultNavigationTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameSetContentOptions.WaitUntil"> <summary> <para>When to consider operation succeeded, defaults to <c>load</c>. Events can be either:</para> <list type="bullet"> <item><description> <c>'domcontentloaded'</c> - consider operation to be finished when the <c>DOMContentLoaded</c> event is fired. </description></item> <item><description> <c>'load'</c> - consider operation to be finished when the <c>load</c> event is fired. </description></item> <item><description> <c>'networkidle'</c> - **DISCOURAGED** consider operation to be finished when there are no network connections for at least <c>500</c> ms. Don't use this method for testing, rely on web assertions to assess readiness instead. </description></item> <item><description> <c>'commit'</c> - consider operation to be finished when network response is received and the document started loading. </description></item> </list> </summary> </member> <member name="P:Microsoft.Playwright.FrameSetInputFilesOptions.NoWaitAfter"> <summary> <para>**DEPRECATED** This option has no effect.</para> <para>This option has no effect.</para> </summary> </member> <member name="P:Microsoft.Playwright.FrameSetInputFilesOptions.Strict"> <summary> <para> When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameSetInputFilesOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameTapOptions.Force"> <summary> <para> Whether to bypass the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks. Defaults to <c>false</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameTapOptions.Modifiers"> <summary> <para> Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to "Control" on Windows and Linux and to "Meta" on macOS. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameTapOptions.NoWaitAfter"> <summary> <para>**DEPRECATED** This option has no effect.</para> <para>This option has no effect.</para> </summary> </member> <member name="P:Microsoft.Playwright.FrameTapOptions.Position"> <summary> <para> A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of the element. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameTapOptions.Strict"> <summary> <para> When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameTapOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameTapOptions.Trial"> <summary> <para> When set, this method only performs the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks and skips the action. Defaults to <c>false</c>. Useful to wait until the element is ready for the action without performing it. Note that keyboard <c>modifiers</c> will be pressed regardless of <c>trial</c> to allow testing elements which are only visible when those keys are pressed. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameTextContentOptions.Strict"> <summary> <para> When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameTextContentOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameTypeOptions.Delay"> <summary><para>Time to wait between key presses in milliseconds. Defaults to 0.</para></summary> </member> <member name="P:Microsoft.Playwright.FrameTypeOptions.NoWaitAfter"> <summary> <para>**DEPRECATED** This option has no effect.</para> <para>This option has no effect.</para> </summary> </member> <member name="P:Microsoft.Playwright.FrameTypeOptions.Strict"> <summary> <para> When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameTypeOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameUncheckOptions.Force"> <summary> <para> Whether to bypass the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks. Defaults to <c>false</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameUncheckOptions.NoWaitAfter"> <summary> <para>**DEPRECATED** This option has no effect.</para> <para>This option has no effect.</para> </summary> </member> <member name="P:Microsoft.Playwright.FrameUncheckOptions.Position"> <summary> <para> A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of the element. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameUncheckOptions.Strict"> <summary> <para> When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameUncheckOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameUncheckOptions.Trial"> <summary> <para> When set, this method only performs the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks and skips the action. Defaults to <c>false</c>. Useful to wait until the element is ready for the action without performing it. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameWaitForFunctionOptions.PollingInterval"> <summary> <para> If specified, then it is treated as an interval in milliseconds at which the function would be executed. By default if the option is not specified <see cref="M:Microsoft.Playwright.IFrame.WaitForFunctionAsync(System.String,System.Object,Microsoft.Playwright.FrameWaitForFunctionOptions)"/> is executed in <c>requestAnimationFrame</c> callback. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameWaitForFunctionOptions.Timeout"> <summary> <para> Maximum time to wait for in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameWaitForLoadStateOptions.Timeout"> <summary> <para> Maximum operation time in milliseconds, defaults to 30 seconds, pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultNavigationTimeout(System.Single)"/>, <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/>, <see cref="M:Microsoft.Playwright.IPage.SetDefaultNavigationTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameWaitForNavigationOptions.Timeout"> <summary> <para> Maximum operation time in milliseconds, defaults to 30 seconds, pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultNavigationTimeout(System.Single)"/>, <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/>, <see cref="M:Microsoft.Playwright.IPage.SetDefaultNavigationTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameWaitForNavigationOptions.Url"> <summary> <para> A glob pattern, regex pattern or predicate receiving <see cref="!:URL"/> to match while waiting for the navigation. Note that if the parameter is a string without wildcard characters, the method will wait for navigation to URL that is exactly equal to the string. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameWaitForNavigationOptions.UrlFunc"> <summary> <para> A glob pattern, regex pattern or predicate receiving <see cref="!:URL"/> to match while waiting for the navigation. Note that if the parameter is a string without wildcard characters, the method will wait for navigation to URL that is exactly equal to the string. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameWaitForNavigationOptions.UrlRegex"> <summary> <para> A glob pattern, regex pattern or predicate receiving <see cref="!:URL"/> to match while waiting for the navigation. Note that if the parameter is a string without wildcard characters, the method will wait for navigation to URL that is exactly equal to the string. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameWaitForNavigationOptions.UrlString"> <summary> <para> A glob pattern, regex pattern or predicate receiving <see cref="!:URL"/> to match while waiting for the navigation. Note that if the parameter is a string without wildcard characters, the method will wait for navigation to URL that is exactly equal to the string. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameWaitForNavigationOptions.WaitUntil"> <summary> <para>When to consider operation succeeded, defaults to <c>load</c>. Events can be either:</para> <list type="bullet"> <item><description> <c>'domcontentloaded'</c> - consider operation to be finished when the <c>DOMContentLoaded</c> event is fired. </description></item> <item><description> <c>'load'</c> - consider operation to be finished when the <c>load</c> event is fired. </description></item> <item><description> <c>'networkidle'</c> - **DISCOURAGED** consider operation to be finished when there are no network connections for at least <c>500</c> ms. Don't use this method for testing, rely on web assertions to assess readiness instead. </description></item> <item><description> <c>'commit'</c> - consider operation to be finished when network response is received and the document started loading. </description></item> </list> </summary> </member> <member name="P:Microsoft.Playwright.FrameWaitForSelectorOptions.State"> <summary> <para>Defaults to <c>'visible'</c>. Can be either:</para> <list type="bullet"> <item><description><c>'attached'</c> - wait for element to be present in DOM.</description></item> <item><description><c>'detached'</c> - wait for element to not be present in DOM.</description></item> <item><description> <c>'visible'</c> - wait for element to have non-empty bounding box and no <c>visibility:hidden</c>. Note that element without any content or with <c>display:none</c> has an empty bounding box and is not considered visible. </description></item> <item><description> <c>'hidden'</c> - wait for element to be either detached from DOM, or have an empty bounding box or <c>visibility:hidden</c>. This is opposite to the <c>'visible'</c> option. </description></item> </list> </summary> </member> <member name="P:Microsoft.Playwright.FrameWaitForSelectorOptions.Strict"> <summary> <para> When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameWaitForSelectorOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameWaitForURLOptions.Timeout"> <summary> <para> Maximum operation time in milliseconds, defaults to 30 seconds, pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultNavigationTimeout(System.Single)"/>, <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/>, <see cref="M:Microsoft.Playwright.IPage.SetDefaultNavigationTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.FrameWaitForURLOptions.WaitUntil"> <summary> <para>When to consider operation succeeded, defaults to <c>load</c>. Events can be either:</para> <list type="bullet"> <item><description> <c>'domcontentloaded'</c> - consider operation to be finished when the <c>DOMContentLoaded</c> event is fired. </description></item> <item><description> <c>'load'</c> - consider operation to be finished when the <c>load</c> event is fired. </description></item> <item><description> <c>'networkidle'</c> - **DISCOURAGED** consider operation to be finished when there are no network connections for at least <c>500</c> ms. Don't use this method for testing, rely on web assertions to assess readiness instead. </description></item> <item><description> <c>'commit'</c> - consider operation to be finished when network response is received and the document started loading. </description></item> </list> </summary> </member> <member name="P:Microsoft.Playwright.KeyboardPressOptions.Delay"> <summary> <para> Time to wait between <c>keydown</c> and <c>keyup</c> in milliseconds. Defaults to 0. </para> </summary> </member> <member name="P:Microsoft.Playwright.KeyboardTypeOptions.Delay"> <summary><para>Time to wait between key presses in milliseconds. Defaults to 0.</para></summary> </member> <member name="P:Microsoft.Playwright.LocatorAriaSnapshotOptions.Ref"> <summary> <para> Generate symbolic reference for each element. One can use <c>aria-ref=<ref></c> locator immediately after capturing the snapshot to perform actions on the element. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorAriaSnapshotOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorAssertionsToBeAttachedOptions.Timeout"> <summary><para>Time to retry the assertion for in milliseconds. Defaults to <c>5000</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.LocatorAssertionsToBeCheckedOptions.Checked"> <summary> <para> Provides state to assert for. Asserts for input to be checked by default. This option can't be used when <see cref="M:Microsoft.Playwright.ILocatorAssertions.ToBeCheckedAsync(Microsoft.Playwright.LocatorAssertionsToBeCheckedOptions)"/> is set to true. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorAssertionsToBeCheckedOptions.Indeterminate"> <summary> <para> Asserts that the element is in the indeterminate (mixed) state. Only supported for checkboxes and radio buttons. This option can't be true when <see cref="M:Microsoft.Playwright.ILocatorAssertions.ToBeCheckedAsync(Microsoft.Playwright.LocatorAssertionsToBeCheckedOptions)"/> is provided. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorAssertionsToBeCheckedOptions.Timeout"> <summary><para>Time to retry the assertion for in milliseconds. Defaults to <c>5000</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.LocatorAssertionsToBeDisabledOptions.Timeout"> <summary><para>Time to retry the assertion for in milliseconds. Defaults to <c>5000</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.LocatorAssertionsToBeEditableOptions.Timeout"> <summary><para>Time to retry the assertion for in milliseconds. Defaults to <c>5000</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.LocatorAssertionsToBeEmptyOptions.Timeout"> <summary><para>Time to retry the assertion for in milliseconds. Defaults to <c>5000</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.LocatorAssertionsToBeEnabledOptions.Timeout"> <summary><para>Time to retry the assertion for in milliseconds. Defaults to <c>5000</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.LocatorAssertionsToBeFocusedOptions.Timeout"> <summary><para>Time to retry the assertion for in milliseconds. Defaults to <c>5000</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.LocatorAssertionsToBeHiddenOptions.Timeout"> <summary><para>Time to retry the assertion for in milliseconds. Defaults to <c>5000</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.LocatorAssertionsToBeInViewportOptions.Ratio"> <summary> <para> The minimal ratio of the element to intersect viewport. If equals to <c>0</c>, then element should intersect viewport at any positive ratio. Defaults to <c>0</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorAssertionsToBeInViewportOptions.Timeout"> <summary><para>Time to retry the assertion for in milliseconds. Defaults to <c>5000</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.LocatorAssertionsToBeVisibleOptions.Timeout"> <summary><para>Time to retry the assertion for in milliseconds. Defaults to <c>5000</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.LocatorAssertionsToContainClassOptions.Timeout"> <summary><para>Time to retry the assertion for in milliseconds. Defaults to <c>5000</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.LocatorAssertionsToContainTextOptions.IgnoreCase"> <summary> <para> Whether to perform case-insensitive match. <see cref="M:Microsoft.Playwright.ILocatorAssertions.ToContainTextAsync(System.String,Microsoft.Playwright.LocatorAssertionsToContainTextOptions)"/> option takes precedence over the corresponding regular expression flag if specified. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorAssertionsToContainTextOptions.Timeout"> <summary><para>Time to retry the assertion for in milliseconds. Defaults to <c>5000</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.LocatorAssertionsToContainTextOptions.UseInnerText"> <summary> <para> Whether to use <c>element.innerText</c> instead of <c>element.textContent</c> when retrieving DOM node text. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorAssertionsToHaveAccessibleDescriptionOptions.IgnoreCase"> <summary> <para> Whether to perform case-insensitive match. <see cref="M:Microsoft.Playwright.ILocatorAssertions.ToHaveAccessibleDescriptionAsync(System.String,Microsoft.Playwright.LocatorAssertionsToHaveAccessibleDescriptionOptions)"/> option takes precedence over the corresponding regular expression flag if specified. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorAssertionsToHaveAccessibleDescriptionOptions.Timeout"> <summary><para>Time to retry the assertion for in milliseconds. Defaults to <c>5000</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.LocatorAssertionsToHaveAccessibleErrorMessageOptions.IgnoreCase"> <summary> <para> Whether to perform case-insensitive match. <see cref="M:Microsoft.Playwright.ILocatorAssertions.ToHaveAccessibleErrorMessageAsync(System.String,Microsoft.Playwright.LocatorAssertionsToHaveAccessibleErrorMessageOptions)"/> option takes precedence over the corresponding regular expression flag if specified. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorAssertionsToHaveAccessibleErrorMessageOptions.Timeout"> <summary><para>Time to retry the assertion for in milliseconds. Defaults to <c>5000</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.LocatorAssertionsToHaveAccessibleNameOptions.IgnoreCase"> <summary> <para> Whether to perform case-insensitive match. <see cref="M:Microsoft.Playwright.ILocatorAssertions.ToHaveAccessibleNameAsync(System.String,Microsoft.Playwright.LocatorAssertionsToHaveAccessibleNameOptions)"/> option takes precedence over the corresponding regular expression flag if specified. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorAssertionsToHaveAccessibleNameOptions.Timeout"> <summary><para>Time to retry the assertion for in milliseconds. Defaults to <c>5000</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.LocatorAssertionsToHaveAttributeOptions.IgnoreCase"> <summary> <para> Whether to perform case-insensitive match. <see cref="M:Microsoft.Playwright.ILocatorAssertions.ToHaveAttributeAsync(System.String,System.String,Microsoft.Playwright.LocatorAssertionsToHaveAttributeOptions)"/> option takes precedence over the corresponding regular expression flag if specified. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorAssertionsToHaveAttributeOptions.Timeout"> <summary><para>Time to retry the assertion for in milliseconds. Defaults to <c>5000</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.LocatorAssertionsToHaveClassOptions.Timeout"> <summary><para>Time to retry the assertion for in milliseconds. Defaults to <c>5000</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.LocatorAssertionsToHaveCountOptions.Timeout"> <summary><para>Time to retry the assertion for in milliseconds. Defaults to <c>5000</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.LocatorAssertionsToHaveCSSOptions.Timeout"> <summary><para>Time to retry the assertion for in milliseconds. Defaults to <c>5000</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.LocatorAssertionsToHaveIdOptions.Timeout"> <summary><para>Time to retry the assertion for in milliseconds. Defaults to <c>5000</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.LocatorAssertionsToHaveJSPropertyOptions.Timeout"> <summary><para>Time to retry the assertion for in milliseconds. Defaults to <c>5000</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.LocatorAssertionsToHaveRoleOptions.Timeout"> <summary><para>Time to retry the assertion for in milliseconds. Defaults to <c>5000</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.LocatorAssertionsToHaveTextOptions.IgnoreCase"> <summary> <para> Whether to perform case-insensitive match. <see cref="M:Microsoft.Playwright.ILocatorAssertions.ToHaveTextAsync(System.String,Microsoft.Playwright.LocatorAssertionsToHaveTextOptions)"/> option takes precedence over the corresponding regular expression flag if specified. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorAssertionsToHaveTextOptions.Timeout"> <summary><para>Time to retry the assertion for in milliseconds. Defaults to <c>5000</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.LocatorAssertionsToHaveTextOptions.UseInnerText"> <summary> <para> Whether to use <c>element.innerText</c> instead of <c>element.textContent</c> when retrieving DOM node text. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorAssertionsToHaveValueOptions.Timeout"> <summary><para>Time to retry the assertion for in milliseconds. Defaults to <c>5000</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.LocatorAssertionsToHaveValuesOptions.Timeout"> <summary><para>Time to retry the assertion for in milliseconds. Defaults to <c>5000</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.LocatorAssertionsToMatchAriaSnapshotOptions.Timeout"> <summary><para>Time to retry the assertion for in milliseconds. Defaults to <c>5000</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.LocatorBlurOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorBoundingBoxOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorCheckOptions.Force"> <summary> <para> Whether to bypass the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks. Defaults to <c>false</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorCheckOptions.NoWaitAfter"> <summary> <para>**DEPRECATED** This option has no effect.</para> <para>This option has no effect.</para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorCheckOptions.Position"> <summary> <para> A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of the element. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorCheckOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorCheckOptions.Trial"> <summary> <para> When set, this method only performs the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks and skips the action. Defaults to <c>false</c>. Useful to wait until the element is ready for the action without performing it. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorClearOptions.Force"> <summary> <para> Whether to bypass the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks. Defaults to <c>false</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorClearOptions.NoWaitAfter"> <summary> <para>**DEPRECATED** This option has no effect.</para> <para>This option has no effect.</para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorClearOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorClickOptions.Button"> <summary><para>Defaults to <c>left</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.LocatorClickOptions.ClickCount"> <summary><para>defaults to 1. See <see cref="!:UIEvent.detail"/>.</para></summary> </member> <member name="P:Microsoft.Playwright.LocatorClickOptions.Delay"> <summary> <para> Time to wait between <c>mousedown</c> and <c>mouseup</c> in milliseconds. Defaults to 0. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorClickOptions.Force"> <summary> <para> Whether to bypass the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks. Defaults to <c>false</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorClickOptions.Modifiers"> <summary> <para> Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to "Control" on Windows and Linux and to "Meta" on macOS. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorClickOptions.NoWaitAfter"> <summary> <para>**DEPRECATED** This option will default to <c>true</c> in the future.</para> <para> Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to inaccessible pages. Defaults to <c>false</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorClickOptions.Position"> <summary> <para> A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of the element. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorClickOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorClickOptions.Trial"> <summary> <para> When set, this method only performs the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks and skips the action. Defaults to <c>false</c>. Useful to wait until the element is ready for the action without performing it. Note that keyboard <c>modifiers</c> will be pressed regardless of <c>trial</c> to allow testing elements which are only visible when those keys are pressed. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorDblClickOptions.Button"> <summary><para>Defaults to <c>left</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.LocatorDblClickOptions.Delay"> <summary> <para> Time to wait between <c>mousedown</c> and <c>mouseup</c> in milliseconds. Defaults to 0. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorDblClickOptions.Force"> <summary> <para> Whether to bypass the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks. Defaults to <c>false</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorDblClickOptions.Modifiers"> <summary> <para> Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to "Control" on Windows and Linux and to "Meta" on macOS. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorDblClickOptions.NoWaitAfter"> <summary> <para>**DEPRECATED** This option has no effect.</para> <para>This option has no effect.</para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorDblClickOptions.Position"> <summary> <para> A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of the element. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorDblClickOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorDblClickOptions.Trial"> <summary> <para> When set, this method only performs the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks and skips the action. Defaults to <c>false</c>. Useful to wait until the element is ready for the action without performing it. Note that keyboard <c>modifiers</c> will be pressed regardless of <c>trial</c> to allow testing elements which are only visible when those keys are pressed. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorDispatchEventOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorDragToOptions.Force"> <summary> <para> Whether to bypass the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks. Defaults to <c>false</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorDragToOptions.NoWaitAfter"> <summary> <para>**DEPRECATED** This option has no effect.</para> <para>This option has no effect.</para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorDragToOptions.SourcePosition"> <summary> <para> Clicks on the source element at this point relative to the top-left corner of the element's padding box. If not specified, some visible point of the element is used. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorDragToOptions.TargetPosition"> <summary> <para> Drops on the target element at this point relative to the top-left corner of the element's padding box. If not specified, some visible point of the element is used. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorDragToOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorDragToOptions.Trial"> <summary> <para> When set, this method only performs the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks and skips the action. Defaults to <c>false</c>. Useful to wait until the element is ready for the action without performing it. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorElementHandleOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorEvaluateHandleOptions.Timeout"> <summary> <para> Maximum time in milliseconds to wait for the locator before evaluating. Note that after locator is resolved, evaluation itself is not limited by the timeout. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorEvaluateOptions.Timeout"> <summary> <para> Maximum time in milliseconds to wait for the locator before evaluating. Note that after locator is resolved, evaluation itself is not limited by the timeout. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorFillOptions.Force"> <summary> <para> Whether to bypass the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks. Defaults to <c>false</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorFillOptions.NoWaitAfter"> <summary> <para>**DEPRECATED** This option has no effect.</para> <para>This option has no effect.</para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorFillOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorFilterOptions.Has"> <summary> <para> Narrows down the results of the method to those which contain elements matching this relative locator. For example, <c>article</c> that has <c>text=Playwright</c> matches <c><article><div>Playwright</div></article></c>. </para> <para> Inner locator **must be relative** to the outer locator and is queried starting with the outer locator match, not the document root. For example, you can find <c>content</c> that has <c>div</c> in <c><article><content><div>Playwright</div></content></article></c>. However, looking for <c>content</c> that has <c>article div</c> will fail, because the inner locator must be relative and should not use any elements outside the <c>content</c>. </para> <para> Note that outer and inner locators must belong to the same frame. Inner locator must not contain <see cref="T:Microsoft.Playwright.IFrameLocator"/>s. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorFilterOptions.HasNot"> <summary> <para> Matches elements that do not contain an element that matches an inner locator. Inner locator is queried against the outer one. For example, <c>article</c> that does not have <c>div</c> matches <c><article><span>Playwright</span></article></c>. </para> <para> Note that outer and inner locators must belong to the same frame. Inner locator must not contain <see cref="T:Microsoft.Playwright.IFrameLocator"/>s. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorFilterOptions.HasNotText"> <summary> <para> Matches elements that do not contain specified text somewhere inside, possibly in a child or a descendant element. When passed a <see cref="T:System.String"/>, matching is case-insensitive and searches for a substring. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorFilterOptions.HasNotTextRegex"> <summary> <para> Matches elements that do not contain specified text somewhere inside, possibly in a child or a descendant element. When passed a <see cref="T:System.String"/>, matching is case-insensitive and searches for a substring. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorFilterOptions.HasNotTextString"> <summary> <para> Matches elements that do not contain specified text somewhere inside, possibly in a child or a descendant element. When passed a <see cref="T:System.String"/>, matching is case-insensitive and searches for a substring. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorFilterOptions.HasText"> <summary> <para> Matches elements containing specified text somewhere inside, possibly in a child or a descendant element. When passed a <see cref="T:System.String"/>, matching is case-insensitive and searches for a substring. For example, <c>"Playwright"</c> matches <c><article><div>Playwright</div></article></c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorFilterOptions.HasTextRegex"> <summary> <para> Matches elements containing specified text somewhere inside, possibly in a child or a descendant element. When passed a <see cref="T:System.String"/>, matching is case-insensitive and searches for a substring. For example, <c>"Playwright"</c> matches <c><article><div>Playwright</div></article></c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorFilterOptions.HasTextString"> <summary> <para> Matches elements containing specified text somewhere inside, possibly in a child or a descendant element. When passed a <see cref="T:System.String"/>, matching is case-insensitive and searches for a substring. For example, <c>"Playwright"</c> matches <c><article><div>Playwright</div></article></c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorFilterOptions.Visible"> <summary><para>Only matches visible or invisible elements.</para></summary> </member> <member name="P:Microsoft.Playwright.LocatorFocusOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorGetAttributeOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorGetByAltTextOptions.Exact"> <summary> <para> Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a regular expression. Note that exact match still trims whitespace. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorGetByLabelOptions.Exact"> <summary> <para> Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a regular expression. Note that exact match still trims whitespace. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorGetByPlaceholderOptions.Exact"> <summary> <para> Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a regular expression. Note that exact match still trims whitespace. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorGetByRoleOptions.Checked"> <summary> <para> An attribute that is usually set by <c>aria-checked</c> or native <c><input type=checkbox></c> controls. </para> <para>Learn more about <a href="https://www.w3.org/TR/wai-aria-1.2/#aria-checked"><c>aria-checked</c></a>.</para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorGetByRoleOptions.Disabled"> <summary> <para>An attribute that is usually set by <c>aria-disabled</c> or <c>disabled</c>.</para> <para> Unlike most other attributes, <c>disabled</c> is inherited through the DOM hierarchy. Learn more about <a href="https://www.w3.org/TR/wai-aria-1.2/#aria-disabled"><c>aria-disabled</c></a>. </para> </summary> <remarks> <para> Unlike most other attributes, <c>disabled</c> is inherited through the DOM hierarchy. Learn more about <a href="https://www.w3.org/TR/wai-aria-1.2/#aria-disabled"><c>aria-disabled</c></a>. </para> </remarks> </member> <member name="P:Microsoft.Playwright.LocatorGetByRoleOptions.Exact"> <summary> <para> Whether <see cref="M:Microsoft.Playwright.ILocator.GetByRole(Microsoft.Playwright.AriaRole,Microsoft.Playwright.LocatorGetByRoleOptions)"/> is matched exactly: case-sensitive and whole-string. Defaults to false. Ignored when <see cref="M:Microsoft.Playwright.ILocator.GetByRole(Microsoft.Playwright.AriaRole,Microsoft.Playwright.LocatorGetByRoleOptions)"/> is a regular expression. Note that exact match still trims whitespace. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorGetByRoleOptions.Expanded"> <summary> <para>An attribute that is usually set by <c>aria-expanded</c>.</para> <para>Learn more about <a href="https://www.w3.org/TR/wai-aria-1.2/#aria-expanded"><c>aria-expanded</c></a>.</para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorGetByRoleOptions.IncludeHidden"> <summary> <para> Option that controls whether hidden elements are matched. By default, only non-hidden elements, as <a href="https://www.w3.org/TR/wai-aria-1.2/#tree_exclusion">defined by ARIA</a>, are matched by role selector. </para> <para>Learn more about <a href="https://www.w3.org/TR/wai-aria-1.2/#aria-hidden"><c>aria-hidden</c></a>.</para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorGetByRoleOptions.Level"> <summary> <para> A number attribute that is usually present for roles <c>heading</c>, <c>listitem</c>, <c>row</c>, <c>treeitem</c>, with default values for <c><h1>-<h6></c> elements. </para> <para>Learn more about <a href="https://www.w3.org/TR/wai-aria-1.2/#aria-level"><c>aria-level</c></a>.</para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorGetByRoleOptions.Name"> <summary> <para> Option to match the <a href="https://w3c.github.io/accname/#dfn-accessible-name">accessible name</a>. By default, matching is case-insensitive and searches for a substring, use <see cref="M:Microsoft.Playwright.ILocator.GetByRole(Microsoft.Playwright.AriaRole,Microsoft.Playwright.LocatorGetByRoleOptions)"/> to control this behavior. </para> <para> Learn more about <a href="https://w3c.github.io/accname/#dfn-accessible-name">accessible name</a>. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorGetByRoleOptions.NameRegex"> <summary> <para> Option to match the <a href="https://w3c.github.io/accname/#dfn-accessible-name">accessible name</a>. By default, matching is case-insensitive and searches for a substring, use <see cref="M:Microsoft.Playwright.ILocator.GetByRole(Microsoft.Playwright.AriaRole,Microsoft.Playwright.LocatorGetByRoleOptions)"/> to control this behavior. </para> <para> Learn more about <a href="https://w3c.github.io/accname/#dfn-accessible-name">accessible name</a>. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorGetByRoleOptions.NameString"> <summary> <para> Option to match the <a href="https://w3c.github.io/accname/#dfn-accessible-name">accessible name</a>. By default, matching is case-insensitive and searches for a substring, use <see cref="M:Microsoft.Playwright.ILocator.GetByRole(Microsoft.Playwright.AriaRole,Microsoft.Playwright.LocatorGetByRoleOptions)"/> to control this behavior. </para> <para> Learn more about <a href="https://w3c.github.io/accname/#dfn-accessible-name">accessible name</a>. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorGetByRoleOptions.Pressed"> <summary> <para>An attribute that is usually set by <c>aria-pressed</c>.</para> <para>Learn more about <a href="https://www.w3.org/TR/wai-aria-1.2/#aria-pressed"><c>aria-pressed</c></a>.</para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorGetByRoleOptions.Selected"> <summary> <para>An attribute that is usually set by <c>aria-selected</c>.</para> <para>Learn more about <a href="https://www.w3.org/TR/wai-aria-1.2/#aria-selected"><c>aria-selected</c></a>.</para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorGetByTextOptions.Exact"> <summary> <para> Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a regular expression. Note that exact match still trims whitespace. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorGetByTitleOptions.Exact"> <summary> <para> Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a regular expression. Note that exact match still trims whitespace. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorHoverOptions.Force"> <summary> <para> Whether to bypass the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks. Defaults to <c>false</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorHoverOptions.Modifiers"> <summary> <para> Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to "Control" on Windows and Linux and to "Meta" on macOS. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorHoverOptions.NoWaitAfter"> <summary> <para>**DEPRECATED** This option has no effect.</para> <para>This option has no effect.</para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorHoverOptions.Position"> <summary> <para> A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of the element. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorHoverOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorHoverOptions.Trial"> <summary> <para> When set, this method only performs the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks and skips the action. Defaults to <c>false</c>. Useful to wait until the element is ready for the action without performing it. Note that keyboard <c>modifiers</c> will be pressed regardless of <c>trial</c> to allow testing elements which are only visible when those keys are pressed. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorInnerHTMLOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorInnerTextOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorInputValueOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorIsCheckedOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorIsDisabledOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorIsEditableOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorIsEnabledOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorIsHiddenOptions.Timeout"> <summary> <para> **DEPRECATED** This option is ignored. <see cref="M:Microsoft.Playwright.ILocator.IsHiddenAsync(Microsoft.Playwright.LocatorIsHiddenOptions)"/> does not wait for the element to become hidden and returns immediately. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorIsVisibleOptions.Timeout"> <summary> <para> **DEPRECATED** This option is ignored. <see cref="M:Microsoft.Playwright.ILocator.IsVisibleAsync(Microsoft.Playwright.LocatorIsVisibleOptions)"/> does not wait for the element to become visible and returns immediately. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorLocatorOptions.Has"> <summary> <para> Narrows down the results of the method to those which contain elements matching this relative locator. For example, <c>article</c> that has <c>text=Playwright</c> matches <c><article><div>Playwright</div></article></c>. </para> <para> Inner locator **must be relative** to the outer locator and is queried starting with the outer locator match, not the document root. For example, you can find <c>content</c> that has <c>div</c> in <c><article><content><div>Playwright</div></content></article></c>. However, looking for <c>content</c> that has <c>article div</c> will fail, because the inner locator must be relative and should not use any elements outside the <c>content</c>. </para> <para> Note that outer and inner locators must belong to the same frame. Inner locator must not contain <see cref="T:Microsoft.Playwright.IFrameLocator"/>s. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorLocatorOptions.HasNot"> <summary> <para> Matches elements that do not contain an element that matches an inner locator. Inner locator is queried against the outer one. For example, <c>article</c> that does not have <c>div</c> matches <c><article><span>Playwright</span></article></c>. </para> <para> Note that outer and inner locators must belong to the same frame. Inner locator must not contain <see cref="T:Microsoft.Playwright.IFrameLocator"/>s. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorLocatorOptions.HasNotText"> <summary> <para> Matches elements that do not contain specified text somewhere inside, possibly in a child or a descendant element. When passed a <see cref="T:System.String"/>, matching is case-insensitive and searches for a substring. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorLocatorOptions.HasNotTextRegex"> <summary> <para> Matches elements that do not contain specified text somewhere inside, possibly in a child or a descendant element. When passed a <see cref="T:System.String"/>, matching is case-insensitive and searches for a substring. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorLocatorOptions.HasNotTextString"> <summary> <para> Matches elements that do not contain specified text somewhere inside, possibly in a child or a descendant element. When passed a <see cref="T:System.String"/>, matching is case-insensitive and searches for a substring. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorLocatorOptions.HasText"> <summary> <para> Matches elements containing specified text somewhere inside, possibly in a child or a descendant element. When passed a <see cref="T:System.String"/>, matching is case-insensitive and searches for a substring. For example, <c>"Playwright"</c> matches <c><article><div>Playwright</div></article></c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorLocatorOptions.HasTextRegex"> <summary> <para> Matches elements containing specified text somewhere inside, possibly in a child or a descendant element. When passed a <see cref="T:System.String"/>, matching is case-insensitive and searches for a substring. For example, <c>"Playwright"</c> matches <c><article><div>Playwright</div></article></c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorLocatorOptions.HasTextString"> <summary> <para> Matches elements containing specified text somewhere inside, possibly in a child or a descendant element. When passed a <see cref="T:System.String"/>, matching is case-insensitive and searches for a substring. For example, <c>"Playwright"</c> matches <c><article><div>Playwright</div></article></c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorPressOptions.Delay"> <summary> <para> Time to wait between <c>keydown</c> and <c>keyup</c> in milliseconds. Defaults to 0. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorPressOptions.NoWaitAfter"> <summary> <para>**DEPRECATED** This option will default to <c>true</c> in the future.</para> <para> Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to inaccessible pages. Defaults to <c>false</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorPressOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorPressSequentiallyOptions.Delay"> <summary><para>Time to wait between key presses in milliseconds. Defaults to 0.</para></summary> </member> <member name="P:Microsoft.Playwright.LocatorPressSequentiallyOptions.NoWaitAfter"> <summary> <para>**DEPRECATED** This option has no effect.</para> <para>This option has no effect.</para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorPressSequentiallyOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorScreenshotOptions.Animations"> <summary> <para> When set to <c>"disabled"</c>, stops CSS animations, CSS transitions and Web Animations. Animations get different treatment depending on their duration: </para> <list type="bullet"> <item><description> finite animations are fast-forwarded to completion, so they'll fire <c>transitionend</c> event. </description></item> <item><description> infinite animations are canceled to initial state, and then played over after the screenshot. </description></item> </list> <para>Defaults to <c>"allow"</c> that leaves animations untouched.</para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorScreenshotOptions.Caret"> <summary> <para> When set to <c>"hide"</c>, screenshot will hide text caret. When set to <c>"initial"</c>, text caret behavior will not be changed. Defaults to <c>"hide"</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorScreenshotOptions.Mask"> <summary> <para> Specify locators that should be masked when the screenshot is taken. Masked elements will be overlaid with a pink box <c>#FF00FF</c> (customized by <see cref="M:Microsoft.Playwright.ILocator.ScreenshotAsync(Microsoft.Playwright.LocatorScreenshotOptions)"/>) that completely covers its bounding box. The mask is also applied to invisible elements, see <a href="https://playwright.dev/dotnet/docs/locators#matching-only-visible-elements">Matching only visible elements</a> to disable that. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorScreenshotOptions.MaskColor"> <summary> <para> Specify the color of the overlay box for masked elements, in <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/color_value">CSS color format</a>. Default color is pink <c>#FF00FF</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorScreenshotOptions.OmitBackground"> <summary> <para> Hides default white background and allows capturing screenshots with transparency. Not applicable to <c>jpeg</c> images. Defaults to <c>false</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorScreenshotOptions.Path"> <summary> <para> The file path to save the image to. The screenshot type will be inferred from file extension. If <see cref="M:Microsoft.Playwright.ILocator.ScreenshotAsync(Microsoft.Playwright.LocatorScreenshotOptions)"/> is a relative path, then it is resolved relative to the current working directory. If no path is provided, the image won't be saved to the disk. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorScreenshotOptions.Quality"> <summary><para>The quality of the image, between 0-100. Not applicable to <c>png</c> images.</para></summary> </member> <member name="P:Microsoft.Playwright.LocatorScreenshotOptions.Scale"> <summary> <para> When set to <c>"css"</c>, screenshot will have a single pixel per each css pixel on the page. For high-dpi devices, this will keep screenshots small. Using <c>"device"</c> option will produce a single pixel per each device pixel, so screenshots of high-dpi devices will be twice as large or even larger. </para> <para>Defaults to <c>"device"</c>.</para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorScreenshotOptions.Style"> <summary> <para> Text of the stylesheet to apply while making the screenshot. This is where you can hide dynamic elements, make elements invisible or change their properties to help you creating repeatable screenshots. This stylesheet pierces the Shadow DOM and applies to the inner frames. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorScreenshotOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorScreenshotOptions.Type"> <summary><para>Specify screenshot type, defaults to <c>png</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.LocatorScrollIntoViewIfNeededOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorSelectOptionOptions.Force"> <summary> <para> Whether to bypass the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks. Defaults to <c>false</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorSelectOptionOptions.NoWaitAfter"> <summary> <para>**DEPRECATED** This option has no effect.</para> <para>This option has no effect.</para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorSelectOptionOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorSelectTextOptions.Force"> <summary> <para> Whether to bypass the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks. Defaults to <c>false</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorSelectTextOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorSetCheckedOptions.Force"> <summary> <para> Whether to bypass the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks. Defaults to <c>false</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorSetCheckedOptions.NoWaitAfter"> <summary> <para>**DEPRECATED** This option has no effect.</para> <para>This option has no effect.</para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorSetCheckedOptions.Position"> <summary> <para> A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of the element. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorSetCheckedOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorSetCheckedOptions.Trial"> <summary> <para> When set, this method only performs the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks and skips the action. Defaults to <c>false</c>. Useful to wait until the element is ready for the action without performing it. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorSetInputFilesOptions.NoWaitAfter"> <summary> <para>**DEPRECATED** This option has no effect.</para> <para>This option has no effect.</para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorSetInputFilesOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorTapOptions.Force"> <summary> <para> Whether to bypass the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks. Defaults to <c>false</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorTapOptions.Modifiers"> <summary> <para> Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to "Control" on Windows and Linux and to "Meta" on macOS. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorTapOptions.NoWaitAfter"> <summary> <para>**DEPRECATED** This option has no effect.</para> <para>This option has no effect.</para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorTapOptions.Position"> <summary> <para> A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of the element. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorTapOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorTapOptions.Trial"> <summary> <para> When set, this method only performs the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks and skips the action. Defaults to <c>false</c>. Useful to wait until the element is ready for the action without performing it. Note that keyboard <c>modifiers</c> will be pressed regardless of <c>trial</c> to allow testing elements which are only visible when those keys are pressed. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorTextContentOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorTypeOptions.Delay"> <summary><para>Time to wait between key presses in milliseconds. Defaults to 0.</para></summary> </member> <member name="P:Microsoft.Playwright.LocatorTypeOptions.NoWaitAfter"> <summary> <para>**DEPRECATED** This option has no effect.</para> <para>This option has no effect.</para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorTypeOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorUncheckOptions.Force"> <summary> <para> Whether to bypass the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks. Defaults to <c>false</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorUncheckOptions.NoWaitAfter"> <summary> <para>**DEPRECATED** This option has no effect.</para> <para>This option has no effect.</para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorUncheckOptions.Position"> <summary> <para> A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of the element. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorUncheckOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorUncheckOptions.Trial"> <summary> <para> When set, this method only performs the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks and skips the action. Defaults to <c>false</c>. Useful to wait until the element is ready for the action without performing it. </para> </summary> </member> <member name="P:Microsoft.Playwright.LocatorWaitForOptions.State"> <summary> <para>Defaults to <c>'visible'</c>. Can be either:</para> <list type="bullet"> <item><description><c>'attached'</c> - wait for element to be present in DOM.</description></item> <item><description><c>'detached'</c> - wait for element to not be present in DOM.</description></item> <item><description> <c>'visible'</c> - wait for element to have non-empty bounding box and no <c>visibility:hidden</c>. Note that element without any content or with <c>display:none</c> has an empty bounding box and is not considered visible. </description></item> <item><description> <c>'hidden'</c> - wait for element to be either detached from DOM, or have an empty bounding box or <c>visibility:hidden</c>. This is opposite to the <c>'visible'</c> option. </description></item> </list> </summary> </member> <member name="P:Microsoft.Playwright.LocatorWaitForOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.MouseClickOptions.Button"> <summary><para>Defaults to <c>left</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.MouseClickOptions.ClickCount"> <summary><para>defaults to 1. See <see cref="!:UIEvent.detail"/>.</para></summary> </member> <member name="P:Microsoft.Playwright.MouseClickOptions.Delay"> <summary> <para> Time to wait between <c>mousedown</c> and <c>mouseup</c> in milliseconds. Defaults to 0. </para> </summary> </member> <member name="P:Microsoft.Playwright.MouseDblClickOptions.Button"> <summary><para>Defaults to <c>left</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.MouseDblClickOptions.Delay"> <summary> <para> Time to wait between <c>mousedown</c> and <c>mouseup</c> in milliseconds. Defaults to 0. </para> </summary> </member> <member name="P:Microsoft.Playwright.MouseDownOptions.Button"> <summary><para>Defaults to <c>left</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.MouseDownOptions.ClickCount"> <summary><para>defaults to 1. See <see cref="!:UIEvent.detail"/>.</para></summary> </member> <member name="P:Microsoft.Playwright.MouseMoveOptions.Steps"> <summary><para>Defaults to 1. Sends intermediate <c>mousemove</c> events.</para></summary> </member> <member name="P:Microsoft.Playwright.MouseUpOptions.Button"> <summary><para>Defaults to <c>left</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.MouseUpOptions.ClickCount"> <summary><para>defaults to 1. See <see cref="!:UIEvent.detail"/>.</para></summary> </member> <member name="P:Microsoft.Playwright.PageAddLocatorHandlerOptions.NoWaitAfter"> <summary> <para> By default, after calling the handler Playwright will wait until the overlay becomes hidden, and only then Playwright will continue with the action/assertion that triggered the handler. This option allows to opt-out of this behavior, so that overlay can stay visible after the handler has run. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageAddLocatorHandlerOptions.Times"> <summary> <para> Specifies the maximum number of times this handler should be called. Unlimited by default. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageAddScriptTagOptions.Content"> <summary><para>Raw JavaScript content to be injected into frame.</para></summary> </member> <member name="P:Microsoft.Playwright.PageAddScriptTagOptions.Path"> <summary> <para> Path to the JavaScript file to be injected into frame. If <c>path</c> is a relative path, then it is resolved relative to the current working directory. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageAddScriptTagOptions.Type"> <summary> <para> Script type. Use 'module' in order to load a JavaScript ES6 module. See <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script">script</a> for more details. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageAddScriptTagOptions.Url"> <summary><para>URL of a script to be added.</para></summary> </member> <member name="P:Microsoft.Playwright.PageAddStyleTagOptions.Content"> <summary><para>Raw CSS content to be injected into frame.</para></summary> </member> <member name="P:Microsoft.Playwright.PageAddStyleTagOptions.Path"> <summary> <para> Path to the CSS file to be injected into frame. If <c>path</c> is a relative path, then it is resolved relative to the current working directory. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageAddStyleTagOptions.Url"> <summary><para>URL of the <c><link></c> tag.</para></summary> </member> <member name="P:Microsoft.Playwright.PageAssertionsToHaveTitleOptions.Timeout"> <summary><para>Time to retry the assertion for in milliseconds. Defaults to <c>5000</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.PageAssertionsToHaveURLOptions.IgnoreCase"> <summary> <para> Whether to perform case-insensitive match. <see cref="M:Microsoft.Playwright.IPageAssertions.ToHaveURLAsync(System.String,Microsoft.Playwright.PageAssertionsToHaveURLOptions)"/> option takes precedence over the corresponding regular expression parameter if specified. A provided predicate ignores this flag. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageAssertionsToHaveURLOptions.Timeout"> <summary><para>Time to retry the assertion for in milliseconds. Defaults to <c>5000</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.PageCheckOptions.Force"> <summary> <para> Whether to bypass the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks. Defaults to <c>false</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageCheckOptions.NoWaitAfter"> <summary> <para>**DEPRECATED** This option has no effect.</para> <para>This option has no effect.</para> </summary> </member> <member name="P:Microsoft.Playwright.PageCheckOptions.Position"> <summary> <para> A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of the element. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageCheckOptions.Strict"> <summary> <para> When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageCheckOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageCheckOptions.Trial"> <summary> <para> When set, this method only performs the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks and skips the action. Defaults to <c>false</c>. Useful to wait until the element is ready for the action without performing it. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageClickOptions.Button"> <summary><para>Defaults to <c>left</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.PageClickOptions.ClickCount"> <summary><para>defaults to 1. See <see cref="!:UIEvent.detail"/>.</para></summary> </member> <member name="P:Microsoft.Playwright.PageClickOptions.Delay"> <summary> <para> Time to wait between <c>mousedown</c> and <c>mouseup</c> in milliseconds. Defaults to 0. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageClickOptions.Force"> <summary> <para> Whether to bypass the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks. Defaults to <c>false</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageClickOptions.Modifiers"> <summary> <para> Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to "Control" on Windows and Linux and to "Meta" on macOS. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageClickOptions.NoWaitAfter"> <summary> <para>**DEPRECATED** This option will default to <c>true</c> in the future.</para> <para> Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to inaccessible pages. Defaults to <c>false</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageClickOptions.Position"> <summary> <para> A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of the element. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageClickOptions.Strict"> <summary> <para> When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageClickOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageClickOptions.Trial"> <summary> <para> When set, this method only performs the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks and skips the action. Defaults to <c>false</c>. Useful to wait until the element is ready for the action without performing it. Note that keyboard <c>modifiers</c> will be pressed regardless of <c>trial</c> to allow testing elements which are only visible when those keys are pressed. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageCloseOptions.Reason"> <summary><para>The reason to be reported to the operations interrupted by the page closure.</para></summary> </member> <member name="P:Microsoft.Playwright.PageCloseOptions.RunBeforeUnload"> <summary> <para> Defaults to <c>false</c>. Whether to run the <a href="https://developer.mozilla.org/en-US/docs/Web/Events/beforeunload">before unload</a> page handlers. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageDblClickOptions.Button"> <summary><para>Defaults to <c>left</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.PageDblClickOptions.Delay"> <summary> <para> Time to wait between <c>mousedown</c> and <c>mouseup</c> in milliseconds. Defaults to 0. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageDblClickOptions.Force"> <summary> <para> Whether to bypass the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks. Defaults to <c>false</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageDblClickOptions.Modifiers"> <summary> <para> Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to "Control" on Windows and Linux and to "Meta" on macOS. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageDblClickOptions.NoWaitAfter"> <summary> <para>**DEPRECATED** This option has no effect.</para> <para>This option has no effect.</para> </summary> </member> <member name="P:Microsoft.Playwright.PageDblClickOptions.Position"> <summary> <para> A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of the element. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageDblClickOptions.Strict"> <summary> <para> When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageDblClickOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageDblClickOptions.Trial"> <summary> <para> When set, this method only performs the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks and skips the action. Defaults to <c>false</c>. Useful to wait until the element is ready for the action without performing it. Note that keyboard <c>modifiers</c> will be pressed regardless of <c>trial</c> to allow testing elements which are only visible when those keys are pressed. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageDispatchEventOptions.Strict"> <summary> <para> When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageDispatchEventOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageDragAndDropOptions.Force"> <summary> <para> Whether to bypass the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks. Defaults to <c>false</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageDragAndDropOptions.NoWaitAfter"> <summary> <para>**DEPRECATED** This option has no effect.</para> <para>This option has no effect.</para> </summary> </member> <member name="P:Microsoft.Playwright.PageDragAndDropOptions.SourcePosition"> <summary> <para> Clicks on the source element at this point relative to the top-left corner of the element's padding box. If not specified, some visible point of the element is used. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageDragAndDropOptions.Strict"> <summary> <para> When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageDragAndDropOptions.TargetPosition"> <summary> <para> Drops on the target element at this point relative to the top-left corner of the element's padding box. If not specified, some visible point of the element is used. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageDragAndDropOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageDragAndDropOptions.Trial"> <summary> <para> When set, this method only performs the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks and skips the action. Defaults to <c>false</c>. Useful to wait until the element is ready for the action without performing it. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageEmulateMediaOptions.ColorScheme"> <summary> <para> Emulates <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme">prefers-colors-scheme</a> media feature, supported values are <c>'light'</c> and <c>'dark'</c>. Passing <c>'Null'</c> disables color scheme emulation. <c>'no-preference'</c> is deprecated. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageEmulateMediaOptions.Media"> <summary> <para> Changes the CSS media type of the page. The only allowed values are <c>'Screen'</c>, <c>'Print'</c> and <c>'Null'</c>. Passing <c>'Null'</c> disables CSS media emulation. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageEmulateMediaOptions.ReducedMotion"> <summary> <para> Emulates <c>'prefers-reduced-motion'</c> media feature, supported values are <c>'reduce'</c>, <c>'no-preference'</c>. Passing <c>null</c> disables reduced motion emulation. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageEvalOnSelectorOptions.Strict"> <summary> <para> When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageExposeBindingOptions.Handle"> <summary> <para>**DEPRECATED** This option will be removed in the future.</para> <para> Whether to pass the argument as a handle, instead of passing by value. When passing a handle, only one argument is supported. When passing by value, multiple arguments are supported. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageFillOptions.Force"> <summary> <para> Whether to bypass the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks. Defaults to <c>false</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageFillOptions.NoWaitAfter"> <summary> <para>**DEPRECATED** This option has no effect.</para> <para>This option has no effect.</para> </summary> </member> <member name="P:Microsoft.Playwright.PageFillOptions.Strict"> <summary> <para> When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageFillOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageFocusOptions.Strict"> <summary> <para> When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageFocusOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageGetAttributeOptions.Strict"> <summary> <para> When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageGetAttributeOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageGetByAltTextOptions.Exact"> <summary> <para> Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a regular expression. Note that exact match still trims whitespace. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageGetByLabelOptions.Exact"> <summary> <para> Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a regular expression. Note that exact match still trims whitespace. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageGetByPlaceholderOptions.Exact"> <summary> <para> Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a regular expression. Note that exact match still trims whitespace. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageGetByRoleOptions.Checked"> <summary> <para> An attribute that is usually set by <c>aria-checked</c> or native <c><input type=checkbox></c> controls. </para> <para>Learn more about <a href="https://www.w3.org/TR/wai-aria-1.2/#aria-checked"><c>aria-checked</c></a>.</para> </summary> </member> <member name="P:Microsoft.Playwright.PageGetByRoleOptions.Disabled"> <summary> <para>An attribute that is usually set by <c>aria-disabled</c> or <c>disabled</c>.</para> <para> Unlike most other attributes, <c>disabled</c> is inherited through the DOM hierarchy. Learn more about <a href="https://www.w3.org/TR/wai-aria-1.2/#aria-disabled"><c>aria-disabled</c></a>. </para> </summary> <remarks> <para> Unlike most other attributes, <c>disabled</c> is inherited through the DOM hierarchy. Learn more about <a href="https://www.w3.org/TR/wai-aria-1.2/#aria-disabled"><c>aria-disabled</c></a>. </para> </remarks> </member> <member name="P:Microsoft.Playwright.PageGetByRoleOptions.Exact"> <summary> <para> Whether <see cref="M:Microsoft.Playwright.IPage.GetByRole(Microsoft.Playwright.AriaRole,Microsoft.Playwright.PageGetByRoleOptions)"/> is matched exactly: case-sensitive and whole-string. Defaults to false. Ignored when <see cref="M:Microsoft.Playwright.IPage.GetByRole(Microsoft.Playwright.AriaRole,Microsoft.Playwright.PageGetByRoleOptions)"/> is a regular expression. Note that exact match still trims whitespace. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageGetByRoleOptions.Expanded"> <summary> <para>An attribute that is usually set by <c>aria-expanded</c>.</para> <para>Learn more about <a href="https://www.w3.org/TR/wai-aria-1.2/#aria-expanded"><c>aria-expanded</c></a>.</para> </summary> </member> <member name="P:Microsoft.Playwright.PageGetByRoleOptions.IncludeHidden"> <summary> <para> Option that controls whether hidden elements are matched. By default, only non-hidden elements, as <a href="https://www.w3.org/TR/wai-aria-1.2/#tree_exclusion">defined by ARIA</a>, are matched by role selector. </para> <para>Learn more about <a href="https://www.w3.org/TR/wai-aria-1.2/#aria-hidden"><c>aria-hidden</c></a>.</para> </summary> </member> <member name="P:Microsoft.Playwright.PageGetByRoleOptions.Level"> <summary> <para> A number attribute that is usually present for roles <c>heading</c>, <c>listitem</c>, <c>row</c>, <c>treeitem</c>, with default values for <c><h1>-<h6></c> elements. </para> <para>Learn more about <a href="https://www.w3.org/TR/wai-aria-1.2/#aria-level"><c>aria-level</c></a>.</para> </summary> </member> <member name="P:Microsoft.Playwright.PageGetByRoleOptions.Name"> <summary> <para> Option to match the <a href="https://w3c.github.io/accname/#dfn-accessible-name">accessible name</a>. By default, matching is case-insensitive and searches for a substring, use <see cref="M:Microsoft.Playwright.IPage.GetByRole(Microsoft.Playwright.AriaRole,Microsoft.Playwright.PageGetByRoleOptions)"/> to control this behavior. </para> <para> Learn more about <a href="https://w3c.github.io/accname/#dfn-accessible-name">accessible name</a>. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageGetByRoleOptions.NameRegex"> <summary> <para> Option to match the <a href="https://w3c.github.io/accname/#dfn-accessible-name">accessible name</a>. By default, matching is case-insensitive and searches for a substring, use <see cref="M:Microsoft.Playwright.IPage.GetByRole(Microsoft.Playwright.AriaRole,Microsoft.Playwright.PageGetByRoleOptions)"/> to control this behavior. </para> <para> Learn more about <a href="https://w3c.github.io/accname/#dfn-accessible-name">accessible name</a>. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageGetByRoleOptions.NameString"> <summary> <para> Option to match the <a href="https://w3c.github.io/accname/#dfn-accessible-name">accessible name</a>. By default, matching is case-insensitive and searches for a substring, use <see cref="M:Microsoft.Playwright.IPage.GetByRole(Microsoft.Playwright.AriaRole,Microsoft.Playwright.PageGetByRoleOptions)"/> to control this behavior. </para> <para> Learn more about <a href="https://w3c.github.io/accname/#dfn-accessible-name">accessible name</a>. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageGetByRoleOptions.Pressed"> <summary> <para>An attribute that is usually set by <c>aria-pressed</c>.</para> <para>Learn more about <a href="https://www.w3.org/TR/wai-aria-1.2/#aria-pressed"><c>aria-pressed</c></a>.</para> </summary> </member> <member name="P:Microsoft.Playwright.PageGetByRoleOptions.Selected"> <summary> <para>An attribute that is usually set by <c>aria-selected</c>.</para> <para>Learn more about <a href="https://www.w3.org/TR/wai-aria-1.2/#aria-selected"><c>aria-selected</c></a>.</para> </summary> </member> <member name="P:Microsoft.Playwright.PageGetByTextOptions.Exact"> <summary> <para> Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a regular expression. Note that exact match still trims whitespace. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageGetByTitleOptions.Exact"> <summary> <para> Whether to find an exact match: case-sensitive and whole-string. Default to false. Ignored when locating by a regular expression. Note that exact match still trims whitespace. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageGoBackOptions.Timeout"> <summary> <para> Maximum operation time in milliseconds, defaults to 30 seconds, pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultNavigationTimeout(System.Single)"/>, <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/>, <see cref="M:Microsoft.Playwright.IPage.SetDefaultNavigationTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageGoBackOptions.WaitUntil"> <summary> <para>When to consider operation succeeded, defaults to <c>load</c>. Events can be either:</para> <list type="bullet"> <item><description> <c>'domcontentloaded'</c> - consider operation to be finished when the <c>DOMContentLoaded</c> event is fired. </description></item> <item><description> <c>'load'</c> - consider operation to be finished when the <c>load</c> event is fired. </description></item> <item><description> <c>'networkidle'</c> - **DISCOURAGED** consider operation to be finished when there are no network connections for at least <c>500</c> ms. Don't use this method for testing, rely on web assertions to assess readiness instead. </description></item> <item><description> <c>'commit'</c> - consider operation to be finished when network response is received and the document started loading. </description></item> </list> </summary> </member> <member name="P:Microsoft.Playwright.PageGoForwardOptions.Timeout"> <summary> <para> Maximum operation time in milliseconds, defaults to 30 seconds, pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultNavigationTimeout(System.Single)"/>, <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/>, <see cref="M:Microsoft.Playwright.IPage.SetDefaultNavigationTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageGoForwardOptions.WaitUntil"> <summary> <para>When to consider operation succeeded, defaults to <c>load</c>. Events can be either:</para> <list type="bullet"> <item><description> <c>'domcontentloaded'</c> - consider operation to be finished when the <c>DOMContentLoaded</c> event is fired. </description></item> <item><description> <c>'load'</c> - consider operation to be finished when the <c>load</c> event is fired. </description></item> <item><description> <c>'networkidle'</c> - **DISCOURAGED** consider operation to be finished when there are no network connections for at least <c>500</c> ms. Don't use this method for testing, rely on web assertions to assess readiness instead. </description></item> <item><description> <c>'commit'</c> - consider operation to be finished when network response is received and the document started loading. </description></item> </list> </summary> </member> <member name="P:Microsoft.Playwright.PageGotoOptions.Referer"> <summary> <para> Referer header value. If provided it will take preference over the referer header value set by <see cref="M:Microsoft.Playwright.IPage.SetExtraHTTPHeadersAsync(System.Collections.Generic.IEnumerable{System.Collections.Generic.KeyValuePair{System.String,System.String}})"/>. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageGotoOptions.Timeout"> <summary> <para> Maximum operation time in milliseconds, defaults to 30 seconds, pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultNavigationTimeout(System.Single)"/>, <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/>, <see cref="M:Microsoft.Playwright.IPage.SetDefaultNavigationTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageGotoOptions.WaitUntil"> <summary> <para>When to consider operation succeeded, defaults to <c>load</c>. Events can be either:</para> <list type="bullet"> <item><description> <c>'domcontentloaded'</c> - consider operation to be finished when the <c>DOMContentLoaded</c> event is fired. </description></item> <item><description> <c>'load'</c> - consider operation to be finished when the <c>load</c> event is fired. </description></item> <item><description> <c>'networkidle'</c> - **DISCOURAGED** consider operation to be finished when there are no network connections for at least <c>500</c> ms. Don't use this method for testing, rely on web assertions to assess readiness instead. </description></item> <item><description> <c>'commit'</c> - consider operation to be finished when network response is received and the document started loading. </description></item> </list> </summary> </member> <member name="P:Microsoft.Playwright.PageHoverOptions.Force"> <summary> <para> Whether to bypass the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks. Defaults to <c>false</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageHoverOptions.Modifiers"> <summary> <para> Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to "Control" on Windows and Linux and to "Meta" on macOS. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageHoverOptions.NoWaitAfter"> <summary> <para>**DEPRECATED** This option has no effect.</para> <para>This option has no effect.</para> </summary> </member> <member name="P:Microsoft.Playwright.PageHoverOptions.Position"> <summary> <para> A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of the element. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageHoverOptions.Strict"> <summary> <para> When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageHoverOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageHoverOptions.Trial"> <summary> <para> When set, this method only performs the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks and skips the action. Defaults to <c>false</c>. Useful to wait until the element is ready for the action without performing it. Note that keyboard <c>modifiers</c> will be pressed regardless of <c>trial</c> to allow testing elements which are only visible when those keys are pressed. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageInnerHTMLOptions.Strict"> <summary> <para> When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageInnerHTMLOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageInnerTextOptions.Strict"> <summary> <para> When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageInnerTextOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageInputValueOptions.Strict"> <summary> <para> When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageInputValueOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageIsCheckedOptions.Strict"> <summary> <para> When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageIsCheckedOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageIsDisabledOptions.Strict"> <summary> <para> When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageIsDisabledOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageIsEditableOptions.Strict"> <summary> <para> When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageIsEditableOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageIsEnabledOptions.Strict"> <summary> <para> When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageIsEnabledOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageIsHiddenOptions.Strict"> <summary> <para> When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageIsHiddenOptions.Timeout"> <summary> <para> **DEPRECATED** This option is ignored. <see cref="M:Microsoft.Playwright.IPage.IsHiddenAsync(System.String,Microsoft.Playwright.PageIsHiddenOptions)"/> does not wait for the element to become hidden and returns immediately. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageIsVisibleOptions.Strict"> <summary> <para> When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageIsVisibleOptions.Timeout"> <summary> <para> **DEPRECATED** This option is ignored. <see cref="M:Microsoft.Playwright.IPage.IsVisibleAsync(System.String,Microsoft.Playwright.PageIsVisibleOptions)"/> does not wait for the element to become visible and returns immediately. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageLocatorOptions.Has"> <summary> <para> Narrows down the results of the method to those which contain elements matching this relative locator. For example, <c>article</c> that has <c>text=Playwright</c> matches <c><article><div>Playwright</div></article></c>. </para> <para> Inner locator **must be relative** to the outer locator and is queried starting with the outer locator match, not the document root. For example, you can find <c>content</c> that has <c>div</c> in <c><article><content><div>Playwright</div></content></article></c>. However, looking for <c>content</c> that has <c>article div</c> will fail, because the inner locator must be relative and should not use any elements outside the <c>content</c>. </para> <para> Note that outer and inner locators must belong to the same frame. Inner locator must not contain <see cref="T:Microsoft.Playwright.IFrameLocator"/>s. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageLocatorOptions.HasNot"> <summary> <para> Matches elements that do not contain an element that matches an inner locator. Inner locator is queried against the outer one. For example, <c>article</c> that does not have <c>div</c> matches <c><article><span>Playwright</span></article></c>. </para> <para> Note that outer and inner locators must belong to the same frame. Inner locator must not contain <see cref="T:Microsoft.Playwright.IFrameLocator"/>s. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageLocatorOptions.HasNotText"> <summary> <para> Matches elements that do not contain specified text somewhere inside, possibly in a child or a descendant element. When passed a <see cref="T:System.String"/>, matching is case-insensitive and searches for a substring. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageLocatorOptions.HasNotTextRegex"> <summary> <para> Matches elements that do not contain specified text somewhere inside, possibly in a child or a descendant element. When passed a <see cref="T:System.String"/>, matching is case-insensitive and searches for a substring. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageLocatorOptions.HasNotTextString"> <summary> <para> Matches elements that do not contain specified text somewhere inside, possibly in a child or a descendant element. When passed a <see cref="T:System.String"/>, matching is case-insensitive and searches for a substring. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageLocatorOptions.HasText"> <summary> <para> Matches elements containing specified text somewhere inside, possibly in a child or a descendant element. When passed a <see cref="T:System.String"/>, matching is case-insensitive and searches for a substring. For example, <c>"Playwright"</c> matches <c><article><div>Playwright</div></article></c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageLocatorOptions.HasTextRegex"> <summary> <para> Matches elements containing specified text somewhere inside, possibly in a child or a descendant element. When passed a <see cref="T:System.String"/>, matching is case-insensitive and searches for a substring. For example, <c>"Playwright"</c> matches <c><article><div>Playwright</div></article></c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageLocatorOptions.HasTextString"> <summary> <para> Matches elements containing specified text somewhere inside, possibly in a child or a descendant element. When passed a <see cref="T:System.String"/>, matching is case-insensitive and searches for a substring. For example, <c>"Playwright"</c> matches <c><article><div>Playwright</div></article></c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.PagePdfOptions.DisplayHeaderFooter"> <summary><para>Display header and footer. Defaults to <c>false</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.PagePdfOptions.FooterTemplate"> <summary><para>HTML template for the print footer. Should use the same format as the <see cref="M:Microsoft.Playwright.IPage.PdfAsync(Microsoft.Playwright.PagePdfOptions)"/>.</para></summary> </member> <member name="P:Microsoft.Playwright.PagePdfOptions.Format"> <summary> <para> Paper format. If set, takes priority over <see cref="M:Microsoft.Playwright.IPage.PdfAsync(Microsoft.Playwright.PagePdfOptions)"/> or <see cref="M:Microsoft.Playwright.IPage.PdfAsync(Microsoft.Playwright.PagePdfOptions)"/> options. Defaults to 'Letter'. </para> </summary> </member> <member name="P:Microsoft.Playwright.PagePdfOptions.HeaderTemplate"> <summary> <para> HTML template for the print header. Should be valid HTML markup with following classes used to inject printing values into them: </para> <list type="bullet"> <item><description><c>'date'</c> formatted print date</description></item> <item><description><c>'title'</c> document title</description></item> <item><description><c>'url'</c> document location</description></item> <item><description><c>'pageNumber'</c> current page number</description></item> <item><description><c>'totalPages'</c> total pages in the document</description></item> </list> </summary> </member> <member name="P:Microsoft.Playwright.PagePdfOptions.Height"> <summary><para>Paper height, accepts values labeled with units.</para></summary> </member> <member name="P:Microsoft.Playwright.PagePdfOptions.Landscape"> <summary><para>Paper orientation. Defaults to <c>false</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.PagePdfOptions.Margin"> <summary><para>Paper margins, defaults to none.</para></summary> </member> <member name="P:Microsoft.Playwright.PagePdfOptions.Outline"> <summary><para>Whether or not to embed the document outline into the PDF. Defaults to <c>false</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.PagePdfOptions.PageRanges"> <summary> <para> Paper ranges to print, e.g., '1-5, 8, 11-13'. Defaults to the empty string, which means print all pages. </para> </summary> </member> <member name="P:Microsoft.Playwright.PagePdfOptions.Path"> <summary> <para> The file path to save the PDF to. If <see cref="M:Microsoft.Playwright.IPage.PdfAsync(Microsoft.Playwright.PagePdfOptions)"/> is a relative path, then it is resolved relative to the current working directory. If no path is provided, the PDF won't be saved to the disk. </para> </summary> </member> <member name="P:Microsoft.Playwright.PagePdfOptions.PreferCSSPageSize"> <summary> <para> Give any CSS <c>@page</c> size declared in the page priority over what is declared in <see cref="M:Microsoft.Playwright.IPage.PdfAsync(Microsoft.Playwright.PagePdfOptions)"/> and <see cref="M:Microsoft.Playwright.IPage.PdfAsync(Microsoft.Playwright.PagePdfOptions)"/> or <see cref="M:Microsoft.Playwright.IPage.PdfAsync(Microsoft.Playwright.PagePdfOptions)"/> options. Defaults to <c>false</c>, which will scale the content to fit the paper size. </para> </summary> </member> <member name="P:Microsoft.Playwright.PagePdfOptions.PrintBackground"> <summary><para>Print background graphics. Defaults to <c>false</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.PagePdfOptions.Scale"> <summary> <para> Scale of the webpage rendering. Defaults to <c>1</c>. Scale amount must be between 0.1 and 2. </para> </summary> </member> <member name="P:Microsoft.Playwright.PagePdfOptions.Tagged"> <summary><para>Whether or not to generate tagged (accessible) PDF. Defaults to <c>false</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.PagePdfOptions.Width"> <summary><para>Paper width, accepts values labeled with units.</para></summary> </member> <member name="P:Microsoft.Playwright.PagePressOptions.Delay"> <summary> <para> Time to wait between <c>keydown</c> and <c>keyup</c> in milliseconds. Defaults to 0. </para> </summary> </member> <member name="P:Microsoft.Playwright.PagePressOptions.NoWaitAfter"> <summary> <para>**DEPRECATED** This option will default to <c>true</c> in the future.</para> <para> Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to inaccessible pages. Defaults to <c>false</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.PagePressOptions.Strict"> <summary> <para> When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception. </para> </summary> </member> <member name="P:Microsoft.Playwright.PagePressOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageQuerySelectorOptions.Strict"> <summary> <para> When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageReloadOptions.Timeout"> <summary> <para> Maximum operation time in milliseconds, defaults to 30 seconds, pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultNavigationTimeout(System.Single)"/>, <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/>, <see cref="M:Microsoft.Playwright.IPage.SetDefaultNavigationTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageReloadOptions.WaitUntil"> <summary> <para>When to consider operation succeeded, defaults to <c>load</c>. Events can be either:</para> <list type="bullet"> <item><description> <c>'domcontentloaded'</c> - consider operation to be finished when the <c>DOMContentLoaded</c> event is fired. </description></item> <item><description> <c>'load'</c> - consider operation to be finished when the <c>load</c> event is fired. </description></item> <item><description> <c>'networkidle'</c> - **DISCOURAGED** consider operation to be finished when there are no network connections for at least <c>500</c> ms. Don't use this method for testing, rely on web assertions to assess readiness instead. </description></item> <item><description> <c>'commit'</c> - consider operation to be finished when network response is received and the document started loading. </description></item> </list> </summary> </member> <member name="P:Microsoft.Playwright.PageRouteFromHAROptions.NotFound"> <summary> <list type="bullet"> <item><description>If set to 'abort' any request not found in the HAR file will be aborted.</description></item> <item><description>If set to 'fallback' missing requests will be sent to the network.</description></item> </list> <para>Defaults to abort.</para> </summary> </member> <member name="P:Microsoft.Playwright.PageRouteFromHAROptions.Update"> <summary> <para> If specified, updates the given HAR with the actual network information instead of serving from file. The file is written to disk when <see cref="M:Microsoft.Playwright.IBrowserContext.CloseAsync(Microsoft.Playwright.BrowserContextCloseOptions)"/> is called. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageRouteFromHAROptions.UpdateContent"> <summary> <para> Optional setting to control resource content management. If <c>attach</c> is specified, resources are persisted as separate files or entries in the ZIP archive. If <c>embed</c> is specified, content is stored inline the HAR file. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageRouteFromHAROptions.UpdateMode"> <summary> <para> When set to <c>minimal</c>, only record information necessary for routing from HAR. This omits sizes, timing, page, cookies, security and other types of HAR information that are not used when replaying from HAR. Defaults to <c>minimal</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageRouteFromHAROptions.Url"> <summary> <para> A glob pattern, regular expression or predicate to match the request URL. Only requests with URL matching the pattern will be served from the HAR file. If not specified, all requests are served from the HAR file. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageRouteFromHAROptions.UrlRegex"> <summary> <para> A glob pattern, regular expression or predicate to match the request URL. Only requests with URL matching the pattern will be served from the HAR file. If not specified, all requests are served from the HAR file. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageRouteFromHAROptions.UrlString"> <summary> <para> A glob pattern, regular expression or predicate to match the request URL. Only requests with URL matching the pattern will be served from the HAR file. If not specified, all requests are served from the HAR file. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageRouteOptions.Times"> <summary><para>How often a route should be used. By default it will be used every time.</para></summary> </member> <member name="P:Microsoft.Playwright.PageRunAndWaitForConsoleMessageOptions.Predicate"> <summary> <para> Receives the <see cref="T:Microsoft.Playwright.IConsoleMessage"/> object and resolves to truthy value when the waiting should resolve. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageRunAndWaitForConsoleMessageOptions.Timeout"> <summary> <para> Maximum time to wait for in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/>. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageRunAndWaitForDownloadOptions.Predicate"> <summary> <para> Receives the <see cref="T:Microsoft.Playwright.IDownload"/> object and resolves to truthy value when the waiting should resolve. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageRunAndWaitForDownloadOptions.Timeout"> <summary> <para> Maximum time to wait for in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/>. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageRunAndWaitForFileChooserOptions.Predicate"> <summary> <para> Receives the <see cref="T:Microsoft.Playwright.IFileChooser"/> object and resolves to truthy value when the waiting should resolve. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageRunAndWaitForFileChooserOptions.Timeout"> <summary> <para> Maximum time to wait for in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/>. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageRunAndWaitForNavigationOptions.Timeout"> <summary> <para> Maximum operation time in milliseconds, defaults to 30 seconds, pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultNavigationTimeout(System.Single)"/>, <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/>, <see cref="M:Microsoft.Playwright.IPage.SetDefaultNavigationTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageRunAndWaitForNavigationOptions.Url"> <summary> <para> A glob pattern, regex pattern or predicate receiving <see cref="!:URL"/> to match while waiting for the navigation. Note that if the parameter is a string without wildcard characters, the method will wait for navigation to URL that is exactly equal to the string. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageRunAndWaitForNavigationOptions.UrlFunc"> <summary> <para> A glob pattern, regex pattern or predicate receiving <see cref="!:URL"/> to match while waiting for the navigation. Note that if the parameter is a string without wildcard characters, the method will wait for navigation to URL that is exactly equal to the string. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageRunAndWaitForNavigationOptions.UrlRegex"> <summary> <para> A glob pattern, regex pattern or predicate receiving <see cref="!:URL"/> to match while waiting for the navigation. Note that if the parameter is a string without wildcard characters, the method will wait for navigation to URL that is exactly equal to the string. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageRunAndWaitForNavigationOptions.UrlString"> <summary> <para> A glob pattern, regex pattern or predicate receiving <see cref="!:URL"/> to match while waiting for the navigation. Note that if the parameter is a string without wildcard characters, the method will wait for navigation to URL that is exactly equal to the string. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageRunAndWaitForNavigationOptions.WaitUntil"> <summary> <para>When to consider operation succeeded, defaults to <c>load</c>. Events can be either:</para> <list type="bullet"> <item><description> <c>'domcontentloaded'</c> - consider operation to be finished when the <c>DOMContentLoaded</c> event is fired. </description></item> <item><description> <c>'load'</c> - consider operation to be finished when the <c>load</c> event is fired. </description></item> <item><description> <c>'networkidle'</c> - **DISCOURAGED** consider operation to be finished when there are no network connections for at least <c>500</c> ms. Don't use this method for testing, rely on web assertions to assess readiness instead. </description></item> <item><description> <c>'commit'</c> - consider operation to be finished when network response is received and the document started loading. </description></item> </list> </summary> </member> <member name="P:Microsoft.Playwright.PageRunAndWaitForPopupOptions.Predicate"> <summary> <para> Receives the <see cref="T:Microsoft.Playwright.IPage"/> object and resolves to truthy value when the waiting should resolve. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageRunAndWaitForPopupOptions.Timeout"> <summary> <para> Maximum time to wait for in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/>. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageRunAndWaitForRequestFinishedOptions.Predicate"> <summary> <para> Receives the <see cref="T:Microsoft.Playwright.IRequest"/> object and resolves to truthy value when the waiting should resolve. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageRunAndWaitForRequestFinishedOptions.Timeout"> <summary> <para> Maximum time to wait for in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/>. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageRunAndWaitForRequestOptions.Timeout"> <summary> <para> Maximum wait time in milliseconds, defaults to 30 seconds, pass <c>0</c> to disable the timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> method. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageRunAndWaitForResponseOptions.Timeout"> <summary> <para> Maximum wait time in milliseconds, defaults to 30 seconds, pass <c>0</c> to disable the timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageRunAndWaitForWebSocketOptions.Predicate"> <summary> <para> Receives the <see cref="T:Microsoft.Playwright.IWebSocket"/> object and resolves to truthy value when the waiting should resolve. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageRunAndWaitForWebSocketOptions.Timeout"> <summary> <para> Maximum time to wait for in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/>. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageRunAndWaitForWorkerOptions.Predicate"> <summary> <para> Receives the <see cref="T:Microsoft.Playwright.IWorker"/> object and resolves to truthy value when the waiting should resolve. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageRunAndWaitForWorkerOptions.Timeout"> <summary> <para> Maximum time to wait for in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/>. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageScreenshotOptions.Animations"> <summary> <para> When set to <c>"disabled"</c>, stops CSS animations, CSS transitions and Web Animations. Animations get different treatment depending on their duration: </para> <list type="bullet"> <item><description> finite animations are fast-forwarded to completion, so they'll fire <c>transitionend</c> event. </description></item> <item><description> infinite animations are canceled to initial state, and then played over after the screenshot. </description></item> </list> <para>Defaults to <c>"allow"</c> that leaves animations untouched.</para> </summary> </member> <member name="P:Microsoft.Playwright.PageScreenshotOptions.Caret"> <summary> <para> When set to <c>"hide"</c>, screenshot will hide text caret. When set to <c>"initial"</c>, text caret behavior will not be changed. Defaults to <c>"hide"</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageScreenshotOptions.Clip"> <summary><para>An object which specifies clipping of the resulting image.</para></summary> </member> <member name="P:Microsoft.Playwright.PageScreenshotOptions.FullPage"> <summary> <para> When true, takes a screenshot of the full scrollable page, instead of the currently visible viewport. Defaults to <c>false</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageScreenshotOptions.Mask"> <summary> <para> Specify locators that should be masked when the screenshot is taken. Masked elements will be overlaid with a pink box <c>#FF00FF</c> (customized by <see cref="M:Microsoft.Playwright.IPage.ScreenshotAsync(Microsoft.Playwright.PageScreenshotOptions)"/>) that completely covers its bounding box. The mask is also applied to invisible elements, see <a href="https://playwright.dev/dotnet/docs/locators#matching-only-visible-elements">Matching only visible elements</a> to disable that. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageScreenshotOptions.MaskColor"> <summary> <para> Specify the color of the overlay box for masked elements, in <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/color_value">CSS color format</a>. Default color is pink <c>#FF00FF</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageScreenshotOptions.OmitBackground"> <summary> <para> Hides default white background and allows capturing screenshots with transparency. Not applicable to <c>jpeg</c> images. Defaults to <c>false</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageScreenshotOptions.Path"> <summary> <para> The file path to save the image to. The screenshot type will be inferred from file extension. If <see cref="M:Microsoft.Playwright.IPage.ScreenshotAsync(Microsoft.Playwright.PageScreenshotOptions)"/> is a relative path, then it is resolved relative to the current working directory. If no path is provided, the image won't be saved to the disk. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageScreenshotOptions.Quality"> <summary><para>The quality of the image, between 0-100. Not applicable to <c>png</c> images.</para></summary> </member> <member name="P:Microsoft.Playwright.PageScreenshotOptions.Scale"> <summary> <para> When set to <c>"css"</c>, screenshot will have a single pixel per each css pixel on the page. For high-dpi devices, this will keep screenshots small. Using <c>"device"</c> option will produce a single pixel per each device pixel, so screenshots of high-dpi devices will be twice as large or even larger. </para> <para>Defaults to <c>"device"</c>.</para> </summary> </member> <member name="P:Microsoft.Playwright.PageScreenshotOptions.Style"> <summary> <para> Text of the stylesheet to apply while making the screenshot. This is where you can hide dynamic elements, make elements invisible or change their properties to help you creating repeatable screenshots. This stylesheet pierces the Shadow DOM and applies to the inner frames. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageScreenshotOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageScreenshotOptions.Type"> <summary><para>Specify screenshot type, defaults to <c>png</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.PageSelectOptionOptions.Force"> <summary> <para> Whether to bypass the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks. Defaults to <c>false</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageSelectOptionOptions.NoWaitAfter"> <summary> <para>**DEPRECATED** This option has no effect.</para> <para>This option has no effect.</para> </summary> </member> <member name="P:Microsoft.Playwright.PageSelectOptionOptions.Strict"> <summary> <para> When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageSelectOptionOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageSetCheckedOptions.Force"> <summary> <para> Whether to bypass the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks. Defaults to <c>false</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageSetCheckedOptions.NoWaitAfter"> <summary> <para>**DEPRECATED** This option has no effect.</para> <para>This option has no effect.</para> </summary> </member> <member name="P:Microsoft.Playwright.PageSetCheckedOptions.Position"> <summary> <para> A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of the element. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageSetCheckedOptions.Strict"> <summary> <para> When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageSetCheckedOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageSetCheckedOptions.Trial"> <summary> <para> When set, this method only performs the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks and skips the action. Defaults to <c>false</c>. Useful to wait until the element is ready for the action without performing it. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageSetContentOptions.Timeout"> <summary> <para> Maximum operation time in milliseconds, defaults to 30 seconds, pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultNavigationTimeout(System.Single)"/>, <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/>, <see cref="M:Microsoft.Playwright.IPage.SetDefaultNavigationTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageSetContentOptions.WaitUntil"> <summary> <para>When to consider operation succeeded, defaults to <c>load</c>. Events can be either:</para> <list type="bullet"> <item><description> <c>'domcontentloaded'</c> - consider operation to be finished when the <c>DOMContentLoaded</c> event is fired. </description></item> <item><description> <c>'load'</c> - consider operation to be finished when the <c>load</c> event is fired. </description></item> <item><description> <c>'networkidle'</c> - **DISCOURAGED** consider operation to be finished when there are no network connections for at least <c>500</c> ms. Don't use this method for testing, rely on web assertions to assess readiness instead. </description></item> <item><description> <c>'commit'</c> - consider operation to be finished when network response is received and the document started loading. </description></item> </list> </summary> </member> <member name="P:Microsoft.Playwright.PageSetInputFilesOptions.NoWaitAfter"> <summary> <para>**DEPRECATED** This option has no effect.</para> <para>This option has no effect.</para> </summary> </member> <member name="P:Microsoft.Playwright.PageSetInputFilesOptions.Strict"> <summary> <para> When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageSetInputFilesOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageTapOptions.Force"> <summary> <para> Whether to bypass the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks. Defaults to <c>false</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageTapOptions.Modifiers"> <summary> <para> Modifier keys to press. Ensures that only these modifiers are pressed during the operation, and then restores current modifiers back. If not specified, currently pressed modifiers are used. "ControlOrMeta" resolves to "Control" on Windows and Linux and to "Meta" on macOS. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageTapOptions.NoWaitAfter"> <summary> <para>**DEPRECATED** This option has no effect.</para> <para>This option has no effect.</para> </summary> </member> <member name="P:Microsoft.Playwright.PageTapOptions.Position"> <summary> <para> A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of the element. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageTapOptions.Strict"> <summary> <para> When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageTapOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageTapOptions.Trial"> <summary> <para> When set, this method only performs the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks and skips the action. Defaults to <c>false</c>. Useful to wait until the element is ready for the action without performing it. Note that keyboard <c>modifiers</c> will be pressed regardless of <c>trial</c> to allow testing elements which are only visible when those keys are pressed. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageTextContentOptions.Strict"> <summary> <para> When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageTextContentOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageTypeOptions.Delay"> <summary><para>Time to wait between key presses in milliseconds. Defaults to 0.</para></summary> </member> <member name="P:Microsoft.Playwright.PageTypeOptions.NoWaitAfter"> <summary> <para>**DEPRECATED** This option has no effect.</para> <para>This option has no effect.</para> </summary> </member> <member name="P:Microsoft.Playwright.PageTypeOptions.Strict"> <summary> <para> When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageTypeOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageUncheckOptions.Force"> <summary> <para> Whether to bypass the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks. Defaults to <c>false</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageUncheckOptions.NoWaitAfter"> <summary> <para>**DEPRECATED** This option has no effect.</para> <para>This option has no effect.</para> </summary> </member> <member name="P:Microsoft.Playwright.PageUncheckOptions.Position"> <summary> <para> A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of the element. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageUncheckOptions.Strict"> <summary> <para> When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageUncheckOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageUncheckOptions.Trial"> <summary> <para> When set, this method only performs the <a href="https://playwright.dev/dotnet/docs/actionability">actionability</a> checks and skips the action. Defaults to <c>false</c>. Useful to wait until the element is ready for the action without performing it. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageUnrouteAllOptions.Behavior"> <summary> <para> Specifies whether to wait for already running handlers and what to do if they throw errors: </para> <list type="bullet"> <item><description> <c>'default'</c> - do not wait for current handler calls (if any) to finish, if unrouted handler throws, it may result in unhandled error </description></item> <item><description><c>'wait'</c> - wait for current handler calls (if any) to finish</description></item> <item><description> <c>'ignoreErrors'</c> - do not wait for current handler calls (if any) to finish, all errors thrown by the handlers after unrouting are silently caught </description></item> </list> </summary> </member> <member name="P:Microsoft.Playwright.PageWaitForConsoleMessageOptions.Predicate"> <summary> <para> Receives the <see cref="T:Microsoft.Playwright.IConsoleMessage"/> object and resolves to truthy value when the waiting should resolve. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageWaitForConsoleMessageOptions.Timeout"> <summary> <para> Maximum time to wait for in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/>. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageWaitForDownloadOptions.Predicate"> <summary> <para> Receives the <see cref="T:Microsoft.Playwright.IDownload"/> object and resolves to truthy value when the waiting should resolve. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageWaitForDownloadOptions.Timeout"> <summary> <para> Maximum time to wait for in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/>. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageWaitForFileChooserOptions.Predicate"> <summary> <para> Receives the <see cref="T:Microsoft.Playwright.IFileChooser"/> object and resolves to truthy value when the waiting should resolve. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageWaitForFileChooserOptions.Timeout"> <summary> <para> Maximum time to wait for in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/>. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageWaitForFunctionOptions.PollingInterval"> <summary> <para> If specified, then it is treated as an interval in milliseconds at which the function would be executed. By default if the option is not specified <see cref="M:Microsoft.Playwright.IPage.WaitForFunctionAsync(System.String,System.Object,Microsoft.Playwright.PageWaitForFunctionOptions)"/> is executed in <c>requestAnimationFrame</c> callback. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageWaitForFunctionOptions.Timeout"> <summary> <para> Maximum time to wait for in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageWaitForLoadStateOptions.Timeout"> <summary> <para> Maximum operation time in milliseconds, defaults to 30 seconds, pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultNavigationTimeout(System.Single)"/>, <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/>, <see cref="M:Microsoft.Playwright.IPage.SetDefaultNavigationTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageWaitForNavigationOptions.Timeout"> <summary> <para> Maximum operation time in milliseconds, defaults to 30 seconds, pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultNavigationTimeout(System.Single)"/>, <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/>, <see cref="M:Microsoft.Playwright.IPage.SetDefaultNavigationTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageWaitForNavigationOptions.Url"> <summary> <para> A glob pattern, regex pattern or predicate receiving <see cref="!:URL"/> to match while waiting for the navigation. Note that if the parameter is a string without wildcard characters, the method will wait for navigation to URL that is exactly equal to the string. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageWaitForNavigationOptions.UrlFunc"> <summary> <para> A glob pattern, regex pattern or predicate receiving <see cref="!:URL"/> to match while waiting for the navigation. Note that if the parameter is a string without wildcard characters, the method will wait for navigation to URL that is exactly equal to the string. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageWaitForNavigationOptions.UrlRegex"> <summary> <para> A glob pattern, regex pattern or predicate receiving <see cref="!:URL"/> to match while waiting for the navigation. Note that if the parameter is a string without wildcard characters, the method will wait for navigation to URL that is exactly equal to the string. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageWaitForNavigationOptions.UrlString"> <summary> <para> A glob pattern, regex pattern or predicate receiving <see cref="!:URL"/> to match while waiting for the navigation. Note that if the parameter is a string without wildcard characters, the method will wait for navigation to URL that is exactly equal to the string. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageWaitForNavigationOptions.WaitUntil"> <summary> <para>When to consider operation succeeded, defaults to <c>load</c>. Events can be either:</para> <list type="bullet"> <item><description> <c>'domcontentloaded'</c> - consider operation to be finished when the <c>DOMContentLoaded</c> event is fired. </description></item> <item><description> <c>'load'</c> - consider operation to be finished when the <c>load</c> event is fired. </description></item> <item><description> <c>'networkidle'</c> - **DISCOURAGED** consider operation to be finished when there are no network connections for at least <c>500</c> ms. Don't use this method for testing, rely on web assertions to assess readiness instead. </description></item> <item><description> <c>'commit'</c> - consider operation to be finished when network response is received and the document started loading. </description></item> </list> </summary> </member> <member name="P:Microsoft.Playwright.PageWaitForPopupOptions.Predicate"> <summary> <para> Receives the <see cref="T:Microsoft.Playwright.IPage"/> object and resolves to truthy value when the waiting should resolve. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageWaitForPopupOptions.Timeout"> <summary> <para> Maximum time to wait for in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/>. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageWaitForRequestFinishedOptions.Predicate"> <summary> <para> Receives the <see cref="T:Microsoft.Playwright.IRequest"/> object and resolves to truthy value when the waiting should resolve. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageWaitForRequestFinishedOptions.Timeout"> <summary> <para> Maximum time to wait for in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/>. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageWaitForRequestOptions.Timeout"> <summary> <para> Maximum wait time in milliseconds, defaults to 30 seconds, pass <c>0</c> to disable the timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> method. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageWaitForResponseOptions.Timeout"> <summary> <para> Maximum wait time in milliseconds, defaults to 30 seconds, pass <c>0</c> to disable the timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageWaitForSelectorOptions.State"> <summary> <para>Defaults to <c>'visible'</c>. Can be either:</para> <list type="bullet"> <item><description><c>'attached'</c> - wait for element to be present in DOM.</description></item> <item><description><c>'detached'</c> - wait for element to not be present in DOM.</description></item> <item><description> <c>'visible'</c> - wait for element to have non-empty bounding box and no <c>visibility:hidden</c>. Note that element without any content or with <c>display:none</c> has an empty bounding box and is not considered visible. </description></item> <item><description> <c>'hidden'</c> - wait for element to be either detached from DOM, or have an empty bounding box or <c>visibility:hidden</c>. This is opposite to the <c>'visible'</c> option. </description></item> </list> </summary> </member> <member name="P:Microsoft.Playwright.PageWaitForSelectorOptions.Strict"> <summary> <para> When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageWaitForSelectorOptions.Timeout"> <summary> <para> Maximum time in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageWaitForURLOptions.Timeout"> <summary> <para> Maximum operation time in milliseconds, defaults to 30 seconds, pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultNavigationTimeout(System.Single)"/>, <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/>, <see cref="M:Microsoft.Playwright.IPage.SetDefaultNavigationTimeout(System.Single)"/> or <see cref="M:Microsoft.Playwright.IPage.SetDefaultTimeout(System.Single)"/> methods. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageWaitForURLOptions.WaitUntil"> <summary> <para>When to consider operation succeeded, defaults to <c>load</c>. Events can be either:</para> <list type="bullet"> <item><description> <c>'domcontentloaded'</c> - consider operation to be finished when the <c>DOMContentLoaded</c> event is fired. </description></item> <item><description> <c>'load'</c> - consider operation to be finished when the <c>load</c> event is fired. </description></item> <item><description> <c>'networkidle'</c> - **DISCOURAGED** consider operation to be finished when there are no network connections for at least <c>500</c> ms. Don't use this method for testing, rely on web assertions to assess readiness instead. </description></item> <item><description> <c>'commit'</c> - consider operation to be finished when network response is received and the document started loading. </description></item> </list> </summary> </member> <member name="P:Microsoft.Playwright.PageWaitForWebSocketOptions.Predicate"> <summary> <para> Receives the <see cref="T:Microsoft.Playwright.IWebSocket"/> object and resolves to truthy value when the waiting should resolve. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageWaitForWebSocketOptions.Timeout"> <summary> <para> Maximum time to wait for in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/>. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageWaitForWorkerOptions.Predicate"> <summary> <para> Receives the <see cref="T:Microsoft.Playwright.IWorker"/> object and resolves to truthy value when the waiting should resolve. </para> </summary> </member> <member name="P:Microsoft.Playwright.PageWaitForWorkerOptions.Timeout"> <summary> <para> Maximum time to wait for in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. The default value can be changed by using the <see cref="M:Microsoft.Playwright.IBrowserContext.SetDefaultTimeout(System.Single)"/>. </para> </summary> </member> <member name="P:Microsoft.Playwright.RouteContinueOptions.Headers"> <summary><para>If set changes the request HTTP headers. Header values will be converted to a string.</para></summary> </member> <member name="P:Microsoft.Playwright.RouteContinueOptions.Method"> <summary><para>If set changes the request method (e.g. GET or POST).</para></summary> </member> <member name="P:Microsoft.Playwright.RouteContinueOptions.PostData"> <summary><para>If set changes the post data of request.</para></summary> </member> <member name="P:Microsoft.Playwright.RouteContinueOptions.Url"> <summary><para>If set changes the request URL. New URL must have same protocol as original one.</para></summary> </member> <member name="P:Microsoft.Playwright.RouteFallbackOptions.Headers"> <summary><para>If set changes the request HTTP headers. Header values will be converted to a string.</para></summary> </member> <member name="P:Microsoft.Playwright.RouteFallbackOptions.Method"> <summary><para>If set changes the request method (e.g. GET or POST).</para></summary> </member> <member name="P:Microsoft.Playwright.RouteFallbackOptions.PostData"> <summary><para>If set changes the post data of request.</para></summary> </member> <member name="P:Microsoft.Playwright.RouteFallbackOptions.Url"> <summary> <para> If set changes the request URL. New URL must have same protocol as original one. Changing the URL won't affect the route matching, all the routes are matched using the original request URL. </para> </summary> </member> <member name="P:Microsoft.Playwright.RouteFetchOptions.Headers"> <summary><para>If set changes the request HTTP headers. Header values will be converted to a string.</para></summary> </member> <member name="P:Microsoft.Playwright.RouteFetchOptions.MaxRedirects"> <summary> <para> Maximum number of request redirects that will be followed automatically. An error will be thrown if the number is exceeded. Defaults to <c>20</c>. Pass <c>0</c> to not follow redirects. </para> </summary> </member> <member name="P:Microsoft.Playwright.RouteFetchOptions.MaxRetries"> <summary> <para> Maximum number of times network errors should be retried. Currently only <c>ECONNRESET</c> error is retried. Does not retry based on HTTP response codes. An error will be thrown if the limit is exceeded. Defaults to <c>0</c> - no retries. </para> </summary> </member> <member name="P:Microsoft.Playwright.RouteFetchOptions.Method"> <summary><para>If set changes the request method (e.g. GET or POST).</para></summary> </member> <member name="P:Microsoft.Playwright.RouteFetchOptions.PostData"> <summary><para>If set changes the post data of request.</para></summary> </member> <member name="P:Microsoft.Playwright.RouteFetchOptions.Timeout"> <summary> <para> Request timeout in milliseconds. Defaults to <c>30000</c> (30 seconds). Pass <c>0</c> to disable timeout. </para> </summary> </member> <member name="P:Microsoft.Playwright.RouteFetchOptions.Url"> <summary><para>If set changes the request URL. New URL must have same protocol as original one.</para></summary> </member> <member name="P:Microsoft.Playwright.RouteFulfillOptions.Body"> <summary><para>Optional response body as text.</para></summary> </member> <member name="P:Microsoft.Playwright.RouteFulfillOptions.BodyBytes"> <summary><para>Optional response body as raw bytes.</para></summary> </member> <member name="P:Microsoft.Playwright.RouteFulfillOptions.ContentType"> <summary><para>If set, equals to setting <c>Content-Type</c> response header.</para></summary> </member> <member name="P:Microsoft.Playwright.RouteFulfillOptions.Headers"> <summary><para>Response headers. Header values will be converted to a string.</para></summary> </member> <member name="P:Microsoft.Playwright.RouteFulfillOptions.Json"> <summary> <para> JSON response. This method will set the content type to <c>application/json</c> if not set. </para> </summary> </member> <member name="P:Microsoft.Playwright.RouteFulfillOptions.Path"> <summary> <para> File path to respond with. The content type will be inferred from file extension. If <c>path</c> is a relative path, then it is resolved relative to the current working directory. </para> </summary> </member> <member name="P:Microsoft.Playwright.RouteFulfillOptions.Response"> <summary> <para> <see cref="T:Microsoft.Playwright.IAPIResponse"/> to fulfill route's request with. Individual fields of the response (such as headers) can be overridden using fulfill options. </para> </summary> </member> <member name="P:Microsoft.Playwright.RouteFulfillOptions.Status"> <summary><para>Response status code, defaults to <c>200</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.SelectorsRegisterOptions.ContentScript"> <summary> <para> Whether to run this selector engine in isolated JavaScript environment. This environment has access to the same DOM, but not any JavaScript objects from the frame's scripts. Defaults to <c>false</c>. Note that running as a content script is not guaranteed when this engine is used together with other registered engines. </para> </summary> </member> <member name="P:Microsoft.Playwright.SelectorsRegisterOptions.Path"> <summary> <para> Script that evaluates to a selector engine instance. The script is evaluated in the page context. </para> </summary> </member> <member name="P:Microsoft.Playwright.SelectorsRegisterOptions.Script"> <summary> <para> Script that evaluates to a selector engine instance. The script is evaluated in the page context. </para> </summary> </member> <member name="P:Microsoft.Playwright.TracingGroupOptions.Location"> <summary> <para> Specifies a custom location for the group to be shown in the trace viewer. Defaults to the location of the <see cref="M:Microsoft.Playwright.ITracing.GroupAsync(System.String,Microsoft.Playwright.TracingGroupOptions)"/> call. </para> </summary> </member> <member name="P:Microsoft.Playwright.TracingStartChunkOptions.Name"> <summary> <para> If specified, intermediate trace files are going to be saved into the files with the given name prefix inside the <see cref="M:Microsoft.Playwright.IBrowserType.LaunchAsync(Microsoft.Playwright.BrowserTypeLaunchOptions)"/> directory specified in <see cref="M:Microsoft.Playwright.IBrowserType.LaunchAsync(Microsoft.Playwright.BrowserTypeLaunchOptions)"/>. To specify the final trace zip file name, you need to pass <c>path</c> option to <see cref="M:Microsoft.Playwright.ITracing.StopChunkAsync(Microsoft.Playwright.TracingStopChunkOptions)"/> instead. </para> </summary> </member> <member name="P:Microsoft.Playwright.TracingStartChunkOptions.Title"> <summary><para>Trace name to be shown in the Trace Viewer.</para></summary> </member> <member name="P:Microsoft.Playwright.TracingStartOptions.Name"> <summary> <para> If specified, intermediate trace files are going to be saved into the files with the given name prefix inside the <see cref="M:Microsoft.Playwright.IBrowserType.LaunchAsync(Microsoft.Playwright.BrowserTypeLaunchOptions)"/> directory specified in <see cref="M:Microsoft.Playwright.IBrowserType.LaunchAsync(Microsoft.Playwright.BrowserTypeLaunchOptions)"/>. To specify the final trace zip file name, you need to pass <c>path</c> option to <see cref="M:Microsoft.Playwright.ITracing.StopAsync(Microsoft.Playwright.TracingStopOptions)"/> instead. </para> </summary> </member> <member name="P:Microsoft.Playwright.TracingStartOptions.Screenshots"> <summary> <para> Whether to capture screenshots during tracing. Screenshots are used to build a timeline preview. </para> </summary> </member> <member name="P:Microsoft.Playwright.TracingStartOptions.Snapshots"> <summary> <para>If this option is true tracing will</para> <list type="bullet"> <item><description>capture DOM snapshot on every action</description></item> <item><description>record network activity</description></item> </list> </summary> </member> <member name="P:Microsoft.Playwright.TracingStartOptions.Sources"> <summary><para>Whether to include source files for trace actions.</para></summary> </member> <member name="P:Microsoft.Playwright.TracingStartOptions.Title"> <summary><para>Trace name to be shown in the Trace Viewer.</para></summary> </member> <member name="P:Microsoft.Playwright.TracingStopChunkOptions.Path"> <summary> <para> Export trace collected since the last <see cref="M:Microsoft.Playwright.ITracing.StartChunkAsync(Microsoft.Playwright.TracingStartChunkOptions)"/> call into the file with the given path. </para> </summary> </member> <member name="P:Microsoft.Playwright.TracingStopOptions.Path"> <summary><para>Export trace into the file with the given path.</para></summary> </member> <member name="P:Microsoft.Playwright.WebSocketRouteCloseOptions.Code"> <summary> <para> Optional <a href="https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/close#code">close code</a>. </para> </summary> </member> <member name="P:Microsoft.Playwright.WebSocketRouteCloseOptions.Reason"> <summary> <para> Optional <a href="https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/close#reason">close reason</a>. </para> </summary> </member> <member name="P:Microsoft.Playwright.BrowserContextCookiesResult.Name"> <summary><para></para></summary> </member> <member name="P:Microsoft.Playwright.BrowserContextCookiesResult.Value"> <summary><para></para></summary> </member> <member name="P:Microsoft.Playwright.BrowserContextCookiesResult.Domain"> <summary><para></para></summary> </member> <member name="P:Microsoft.Playwright.BrowserContextCookiesResult.Path"> <summary><para></para></summary> </member> <member name="P:Microsoft.Playwright.BrowserContextCookiesResult.Expires"> <summary><para>Unix time in seconds.</para></summary> </member> <member name="P:Microsoft.Playwright.BrowserContextCookiesResult.HttpOnly"> <summary><para></para></summary> </member> <member name="P:Microsoft.Playwright.BrowserContextCookiesResult.Secure"> <summary><para></para></summary> </member> <member name="P:Microsoft.Playwright.BrowserContextCookiesResult.SameSite"> <summary><para></para></summary> </member> <member name="P:Microsoft.Playwright.ClientCertificate.Origin"> <summary> <para> Exact origin that the certificate is valid for. Origin includes <c>https</c> protocol, a hostname and optionally a port. </para> </summary> </member> <member name="P:Microsoft.Playwright.ClientCertificate.CertPath"> <summary><para>Path to the file with the certificate in PEM format.</para></summary> </member> <member name="P:Microsoft.Playwright.ClientCertificate.Cert"> <summary><para>Direct value of the certificate in PEM format.</para></summary> </member> <member name="P:Microsoft.Playwright.ClientCertificate.KeyPath"> <summary><para>Path to the file with the private key in PEM format.</para></summary> </member> <member name="P:Microsoft.Playwright.ClientCertificate.Key"> <summary><para>Direct value of the private key in PEM format.</para></summary> </member> <member name="P:Microsoft.Playwright.ClientCertificate.PfxPath"> <summary><para>Path to the PFX or PKCS12 encoded private key and certificate chain.</para></summary> </member> <member name="P:Microsoft.Playwright.ClientCertificate.Pfx"> <summary><para>Direct value of the PFX or PKCS12 encoded private key and certificate chain.</para></summary> </member> <member name="P:Microsoft.Playwright.ClientCertificate.Passphrase"> <summary><para>Passphrase for the private key (PEM or PFX).</para></summary> </member> <member name="P:Microsoft.Playwright.Clip.X"> <summary><para>x-coordinate of top-left corner of clip area</para></summary> </member> <member name="P:Microsoft.Playwright.Clip.Y"> <summary><para>y-coordinate of top-left corner of clip area</para></summary> </member> <member name="P:Microsoft.Playwright.Clip.Width"> <summary><para>width of clipping area</para></summary> </member> <member name="P:Microsoft.Playwright.Clip.Height"> <summary><para>height of clipping area</para></summary> </member> <member name="P:Microsoft.Playwright.Cookie.Name"> <summary><para></para></summary> </member> <member name="P:Microsoft.Playwright.Cookie.Value"> <summary><para></para></summary> </member> <member name="P:Microsoft.Playwright.Cookie.Url"> <summary><para>Either url or domain / path are required. Optional.</para></summary> </member> <member name="P:Microsoft.Playwright.Cookie.Domain"> <summary> <para> For the cookie to apply to all subdomains as well, prefix domain with a dot, like this: ".example.com". Either url or domain / path are required. Optional. </para> </summary> </member> <member name="P:Microsoft.Playwright.Cookie.Path"> <summary><para>Either url or domain / path are required Optional.</para></summary> </member> <member name="P:Microsoft.Playwright.Cookie.Expires"> <summary><para>Unix time in seconds. Optional.</para></summary> </member> <member name="P:Microsoft.Playwright.Cookie.HttpOnly"> <summary><para>Optional.</para></summary> </member> <member name="P:Microsoft.Playwright.Cookie.Secure"> <summary><para>Optional.</para></summary> </member> <member name="P:Microsoft.Playwright.Cookie.SameSite"> <summary><para>Optional.</para></summary> </member> <member name="P:Microsoft.Playwright.ElementHandleBoundingBoxResult.X"> <summary><para>the x coordinate of the element in pixels.</para></summary> </member> <member name="P:Microsoft.Playwright.ElementHandleBoundingBoxResult.Y"> <summary><para>the y coordinate of the element in pixels.</para></summary> </member> <member name="P:Microsoft.Playwright.ElementHandleBoundingBoxResult.Width"> <summary><para>the width of the element in pixels.</para></summary> </member> <member name="P:Microsoft.Playwright.ElementHandleBoundingBoxResult.Height"> <summary><para>the height of the element in pixels.</para></summary> </member> <member name="P:Microsoft.Playwright.FilePayload.Name"> <summary><para>File name</para></summary> </member> <member name="P:Microsoft.Playwright.FilePayload.MimeType"> <summary><para>File type</para></summary> </member> <member name="P:Microsoft.Playwright.FilePayload.Buffer"> <summary><para>File content</para></summary> </member> <member name="P:Microsoft.Playwright.Geolocation.Latitude"> <summary><para>Latitude between -90 and 90.</para></summary> </member> <member name="P:Microsoft.Playwright.Geolocation.Longitude"> <summary><para>Longitude between -180 and 180.</para></summary> </member> <member name="P:Microsoft.Playwright.Geolocation.Accuracy"> <summary><para>Non-negative accuracy value. Defaults to <c>0</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.Header.Name"> <summary><para>Name of the header.</para></summary> </member> <member name="P:Microsoft.Playwright.Header.Value"> <summary><para>Value of the header.</para></summary> </member> <member name="P:Microsoft.Playwright.HttpCredentials.Username"> <summary><para></para></summary> </member> <member name="P:Microsoft.Playwright.HttpCredentials.Password"> <summary><para></para></summary> </member> <member name="P:Microsoft.Playwright.HttpCredentials.Origin"> <summary><para>Restrain sending http credentials on specific origin (scheme://host:port).</para></summary> </member> <member name="P:Microsoft.Playwright.HttpCredentials.Send"> <summary> <para> This option only applies to the requests sent from corresponding <see cref="T:Microsoft.Playwright.IAPIRequestContext"/> and does not affect requests sent from the browser. <c>'always'</c> - <c>Authorization</c> header with basic authentication credentials will be sent with the each API request. <c>'unauthorized</c> - the credentials are only sent when 401 (Unauthorized) response with <c>WWW-Authenticate</c> header is received. Defaults to <c>'unauthorized'</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.Location.File"> <summary><para></para></summary> </member> <member name="P:Microsoft.Playwright.Location.Line"> <summary><para></para></summary> </member> <member name="P:Microsoft.Playwright.Location.Column"> <summary><para></para></summary> </member> <member name="P:Microsoft.Playwright.LocatorBoundingBoxResult.X"> <summary><para>the x coordinate of the element in pixels.</para></summary> </member> <member name="P:Microsoft.Playwright.LocatorBoundingBoxResult.Y"> <summary><para>the y coordinate of the element in pixels.</para></summary> </member> <member name="P:Microsoft.Playwright.LocatorBoundingBoxResult.Width"> <summary><para>the width of the element in pixels.</para></summary> </member> <member name="P:Microsoft.Playwright.LocatorBoundingBoxResult.Height"> <summary><para>the height of the element in pixels.</para></summary> </member> <member name="P:Microsoft.Playwright.Margin.Top"> <summary><para>Top margin, accepts values labeled with units. Defaults to <c>0</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.Margin.Right"> <summary><para>Right margin, accepts values labeled with units. Defaults to <c>0</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.Margin.Bottom"> <summary><para>Bottom margin, accepts values labeled with units. Defaults to <c>0</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.Margin.Left"> <summary><para>Left margin, accepts values labeled with units. Defaults to <c>0</c>.</para></summary> </member> <member name="P:Microsoft.Playwright.PageViewportSizeResult.Width"> <summary><para>page width in pixels.</para></summary> </member> <member name="P:Microsoft.Playwright.PageViewportSizeResult.Height"> <summary><para>page height in pixels.</para></summary> </member> <member name="P:Microsoft.Playwright.Position.X"> <summary><para></para></summary> </member> <member name="P:Microsoft.Playwright.Position.Y"> <summary><para></para></summary> </member> <member name="P:Microsoft.Playwright.Proxy.Server"> <summary> <para> Proxy to be used for all requests. HTTP and SOCKS proxies are supported, for example <c>http://myproxy.com:3128</c> or <c>socks5://myproxy.com:3128</c>. Short form <c>myproxy.com:3128</c> is considered an HTTP proxy. </para> </summary> </member> <member name="P:Microsoft.Playwright.Proxy.Bypass"> <summary> <para> Optional comma-separated domains to bypass proxy, for example <c>".com, chromium.org, .domain.com"</c>. </para> </summary> </member> <member name="P:Microsoft.Playwright.Proxy.Username"> <summary><para>Optional username to use if HTTP proxy requires authentication.</para></summary> </member> <member name="P:Microsoft.Playwright.Proxy.Password"> <summary><para>Optional password to use if HTTP proxy requires authentication.</para></summary> </member> <member name="P:Microsoft.Playwright.RecordVideoSize.Width"> <summary><para>Video frame width.</para></summary> </member> <member name="P:Microsoft.Playwright.RecordVideoSize.Height"> <summary><para>Video frame height.</para></summary> </member> <member name="P:Microsoft.Playwright.RequestSizesResult.RequestBodySize"> <summary> <para> Size of the request body (POST data payload) in bytes. Set to 0 if there was no body. </para> </summary> </member> <member name="P:Microsoft.Playwright.RequestSizesResult.RequestHeadersSize"> <summary> <para> Total number of bytes from the start of the HTTP request message until (and including) the double CRLF before the body. </para> </summary> </member> <member name="P:Microsoft.Playwright.RequestSizesResult.ResponseBodySize"> <summary><para>Size of the received response body (encoded) in bytes.</para></summary> </member> <member name="P:Microsoft.Playwright.RequestSizesResult.ResponseHeadersSize"> <summary> <para> Total number of bytes from the start of the HTTP response message until (and including) the double CRLF before the body. </para> </summary> </member> <member name="P:Microsoft.Playwright.RequestTimingResult.StartTime"> <summary><para>Request start time in milliseconds elapsed since January 1, 1970 00:00:00 UTC</para></summary> </member> <member name="P:Microsoft.Playwright.RequestTimingResult.DomainLookupStart"> <summary> <para> Time immediately before the browser starts the domain name lookup for the resource. The value is given in milliseconds relative to <c>startTime</c>, -1 if not available. </para> </summary> </member> <member name="P:Microsoft.Playwright.RequestTimingResult.DomainLookupEnd"> <summary> <para> Time immediately after the browser starts the domain name lookup for the resource. The value is given in milliseconds relative to <c>startTime</c>, -1 if not available. </para> </summary> </member> <member name="P:Microsoft.Playwright.RequestTimingResult.ConnectStart"> <summary> <para> Time immediately before the user agent starts establishing the connection to the server to retrieve the resource. The value is given in milliseconds relative to <c>startTime</c>, -1 if not available. </para> </summary> </member> <member name="P:Microsoft.Playwright.RequestTimingResult.SecureConnectionStart"> <summary> <para> Time immediately before the browser starts the handshake process to secure the current connection. The value is given in milliseconds relative to <c>startTime</c>, -1 if not available. </para> </summary> </member> <member name="P:Microsoft.Playwright.RequestTimingResult.ConnectEnd"> <summary> <para> Time immediately before the user agent starts establishing the connection to the server to retrieve the resource. The value is given in milliseconds relative to <c>startTime</c>, -1 if not available. </para> </summary> </member> <member name="P:Microsoft.Playwright.RequestTimingResult.RequestStart"> <summary> <para> Time immediately before the browser starts requesting the resource from the server, cache, or local resource. The value is given in milliseconds relative to <c>startTime</c>, -1 if not available. </para> </summary> </member> <member name="P:Microsoft.Playwright.RequestTimingResult.ResponseStart"> <summary> <para> Time immediately after the browser receives the first byte of the response from the server, cache, or local resource. The value is given in milliseconds relative to <c>startTime</c>, -1 if not available. </para> </summary> </member> <member name="P:Microsoft.Playwright.RequestTimingResult.ResponseEnd"> <summary> <para> Time immediately after the browser receives the last byte of the resource or immediately before the transport connection is closed, whichever comes first. The value is given in milliseconds relative to <c>startTime</c>, -1 if not available. </para> </summary> </member> <member name="P:Microsoft.Playwright.ResponseSecurityDetailsResult.Issuer"> <summary> <para> Common Name component of the Issuer field. from the certificate. This should only be used for informational purposes. Optional. </para> </summary> </member> <member name="P:Microsoft.Playwright.ResponseSecurityDetailsResult.Protocol"> <summary><para>The specific TLS protocol used. (e.g. <c>TLS 1.3</c>). Optional.</para></summary> </member> <member name="P:Microsoft.Playwright.ResponseSecurityDetailsResult.SubjectName"> <summary> <para> Common Name component of the Subject field from the certificate. This should only be used for informational purposes. Optional. </para> </summary> </member> <member name="P:Microsoft.Playwright.ResponseSecurityDetailsResult.ValidFrom"> <summary><para>Unix timestamp (in seconds) specifying when this cert becomes valid. Optional.</para></summary> </member> <member name="P:Microsoft.Playwright.ResponseSecurityDetailsResult.ValidTo"> <summary><para>Unix timestamp (in seconds) specifying when this cert becomes invalid. Optional.</para></summary> </member> <member name="P:Microsoft.Playwright.ResponseServerAddrResult.IpAddress"> <summary><para>IPv4 or IPV6 address of the server.</para></summary> </member> <member name="P:Microsoft.Playwright.ResponseServerAddrResult.Port"> <summary><para></para></summary> </member> <member name="P:Microsoft.Playwright.ScreenSize.Width"> <summary><para>page width in pixels.</para></summary> </member> <member name="P:Microsoft.Playwright.ScreenSize.Height"> <summary><para>page height in pixels.</para></summary> </member> <member name="P:Microsoft.Playwright.SelectOptionValue.Value"> <summary><para>Matches by <c>option.value</c>. Optional.</para></summary> </member> <member name="P:Microsoft.Playwright.SelectOptionValue.Label"> <summary><para>Matches by <c>option.label</c>. Optional.</para></summary> </member> <member name="P:Microsoft.Playwright.SelectOptionValue.Index"> <summary><para>Matches by the index. Optional.</para></summary> </member> <member name="P:Microsoft.Playwright.SourcePosition.X"> <summary><para></para></summary> </member> <member name="P:Microsoft.Playwright.SourcePosition.Y"> <summary><para></para></summary> </member> <member name="P:Microsoft.Playwright.TargetPosition.X"> <summary><para></para></summary> </member> <member name="P:Microsoft.Playwright.TargetPosition.Y"> <summary><para></para></summary> </member> <member name="T:Microsoft.Playwright.ViewportSize"> <summary> View port data. </summary> </member> <member name="P:Microsoft.Playwright.ViewportSize.Width"> <summary><para>page width in pixels.</para></summary> </member> <member name="P:Microsoft.Playwright.ViewportSize.Height"> <summary><para>page height in pixels.</para></summary> </member> <member name="P:Microsoft.Playwright.ViewportSize.NoViewport"> <summary> Disables the viewport. </summary> </member> <member name="T:Microsoft.Playwright.DialogType"> <summary> Dialog type. </summary> <seealso cref="T:Microsoft.Playwright.IDialog"/> </member> <member name="F:Microsoft.Playwright.DialogType.Alert"> <summary> Alert dialog. </summary> </member> <member name="F:Microsoft.Playwright.DialogType.Prompt"> <summary> Prompt dialog. </summary> </member> <member name="F:Microsoft.Playwright.DialogType.Confirm"> <summary> Confirm dialog. </summary> </member> <member name="F:Microsoft.Playwright.DialogType.BeforeUnload"> <summary> Before unload dialog. </summary> </member> <member name="F:Microsoft.Playwright.PaperFormat.Letter"> <summary> Letter: 8.5 inches x 11 inches. </summary> </member> <member name="F:Microsoft.Playwright.PaperFormat.Legal"> <summary> Legal: 8.5 inches by 14 inches. </summary> </member> <member name="F:Microsoft.Playwright.PaperFormat.Tabloid"> <summary> Tabloid: 11 inches by 17 inches. </summary> </member> <member name="F:Microsoft.Playwright.PaperFormat.Ledger"> <summary> Ledger: 17 inches by 11 inches. </summary> </member> <member name="F:Microsoft.Playwright.PaperFormat.A0"> <summary> A0: 33.1 inches by 46.8 inches. </summary> </member> <member name="F:Microsoft.Playwright.PaperFormat.A1"> <summary> A1: 23.4 inches by 33.1 inches. </summary> </member> <member name="F:Microsoft.Playwright.PaperFormat.A2"> <summary> A2: 16.5 inches by 23.4 inches. </summary> </member> <member name="F:Microsoft.Playwright.PaperFormat.A3"> <summary> A3: 11.7 inches by 16.5 inches. </summary> </member> <member name="F:Microsoft.Playwright.PaperFormat.A4"> <summary> A4: 8.27 inches by 11.7 inches. </summary> </member> <member name="F:Microsoft.Playwright.PaperFormat.A5"> <summary> A5: 5.83 inches by 8.27 inches. </summary> </member> <member name="F:Microsoft.Playwright.PaperFormat.A6"> <summary> A6: 4.13 inches by 5.83 inches. </summary> </member> <member name="T:Microsoft.Playwright.RequestAbortErrorCode"> <summary> Abort error codes. </summary> </member> <member name="F:Microsoft.Playwright.RequestAbortErrorCode.Aborted"> <summary> An operation was aborted (due to user action). </summary> </member> <member name="F:Microsoft.Playwright.RequestAbortErrorCode.AccessDenied"> <summary> Permission to access a resource, other than the network, was denied. </summary> </member> <member name="F:Microsoft.Playwright.RequestAbortErrorCode.AddressUnreachable"> <summary> The IP address is unreachable. This usually means that there is no route to the specified host or network. </summary> </member> <member name="F:Microsoft.Playwright.RequestAbortErrorCode.BlockedByClient"> <summary> The client chose to block the request. </summary> </member> <member name="F:Microsoft.Playwright.RequestAbortErrorCode.BlockedByResponse"> <summary> The request failed because the response was delivered along with requirements which are not met ('X-Frame-Options' and 'Content-Security-Policy' ancestor checks, for instance). </summary> </member> <member name="F:Microsoft.Playwright.RequestAbortErrorCode.ConnectionAborted"> <summary> A connection timed out as a result of not receiving an ACK for data sent. </summary> </member> <member name="F:Microsoft.Playwright.RequestAbortErrorCode.ConnectionClosed"> <summary> A connection was closed (corresponding to a TCP FIN). </summary> </member> <member name="F:Microsoft.Playwright.RequestAbortErrorCode.ConnectionFailed"> <summary> A connection attempt failed. </summary> </member> <member name="F:Microsoft.Playwright.RequestAbortErrorCode.ConnectionRefused"> <summary> A connection attempt was refused. </summary> </member> <member name="F:Microsoft.Playwright.RequestAbortErrorCode.ConnectionReset"> <summary> A connection was reset (corresponding to a TCP RST). </summary> </member> <member name="F:Microsoft.Playwright.RequestAbortErrorCode.InternetDisconnected"> <summary> The Internet connection has been lost. </summary> </member> <member name="F:Microsoft.Playwright.RequestAbortErrorCode.NameNotResolved"> <summary> The host name could not be resolved. </summary> </member> <member name="F:Microsoft.Playwright.RequestAbortErrorCode.TimedOut"> <summary> An operation timed out. </summary> </member> <member name="F:Microsoft.Playwright.RequestAbortErrorCode.Failed"> <summary> A generic failure occurred. </summary> </member> <member name="M:Microsoft.Playwright.Assertions.SetDefaultExpectTimeout(System.Single)"> <summary> Sets the default timeout for all future <c>Expect</c> calls. </summary> <param name="timeout">The timeout in milliseconds.</param> <remarks> <para> The default timeout is 5 seconds. </para> </remarks> </member> <member name="T:Microsoft.Playwright.BrowserType"> <summary> Contains the browser types names. </summary> </member> <member name="F:Microsoft.Playwright.BrowserType.Chromium"> <summary> Browser type Chromium. </summary> </member> <member name="F:Microsoft.Playwright.BrowserType.Firefox"> <summary> Browser type Firefox. </summary> </member> <member name="F:Microsoft.Playwright.BrowserType.Webkit"> <summary> Browser type WebKit. </summary> </member> <member name="T:Microsoft.Playwright.Core.Download"> <summary> Download objects are dispatched by page via the <see cref="E:Microsoft.Playwright.IPage.Download"/> event. All the downloaded files belonging to the browser context are deleted when the browser context is closed.All downloaded files are deleted when the browser closes. Download event is emitted once the download starts. </summary> </member> <member name="T:Microsoft.Playwright.Core.DriverMessages"> <summary> Messages coming from the Playwright Driver. </summary> </member> <member name="T:Microsoft.Playwright.Core.FileChooser"> <summary> see <see cref="E:Microsoft.Playwright.IPage.FileChooser"/> arguments. </summary> </member> <member name="M:Microsoft.Playwright.Core.FileChooser.#ctor(Microsoft.Playwright.IPage,Microsoft.Playwright.Core.ElementHandle,System.Boolean)"> <summary> Initializes a new instance of the <see cref="T:Microsoft.Playwright.Core.FileChooser"/> class. </summary> <param name="page">The page this file chooser belongs to.</param> <param name="element">The input element.</param> <param name="multiple">The multiple option.</param> </member> <member name="E:Microsoft.Playwright.Core.Frame.Navigated"> <summary> Raised when a navigation is received. </summary> </member> <member name="E:Microsoft.Playwright.Core.Frame.LoadState"> <summary> Raised when a new LoadState was added. </summary> </member> <member name="P:Microsoft.Playwright.Core.PlaywrightImpl.Item(System.String)"> <summary> Gets a <see cref="T:Microsoft.Playwright.IBrowserType"/>. </summary> <param name="browserType"><see cref="T:Microsoft.Playwright.IBrowserType"/> name. You can get the names from <see cref="T:Microsoft.Playwright.BrowserType"/>. e.g.: <see cref="F:Microsoft.Playwright.BrowserType.Chromium"/>, <see cref="F:Microsoft.Playwright.BrowserType.Firefox"/> or <see cref="F:Microsoft.Playwright.BrowserType.Webkit"/>. </param> </member> <member name="T:Microsoft.Playwright.Core.ResponseData"> <summary> Response that will fulfill a request. </summary> </member> <member name="P:Microsoft.Playwright.Core.ResponseData.Body"> <summary> Response body (text content). </summary> </member> <member name="P:Microsoft.Playwright.Core.ResponseData.BodyData"> <summary> Response body (binary content). </summary> </member> <member name="P:Microsoft.Playwright.Core.ResponseData.Headers"> <summary> Response headers. Header values will be converted to a string. </summary> </member> <member name="P:Microsoft.Playwright.Core.ResponseData.ContentType"> <summary> If set, equals to setting <see href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Type"/> response header. </summary> <value>The Content-Type.</value> </member> <member name="P:Microsoft.Playwright.Core.ResponseData.Status"> <summary> Response status code. </summary> <value>Status Code.</value> </member> <member name="T:Microsoft.Playwright.Core.Route"> <summary> <see cref="T:Microsoft.Playwright.IRoute"/>. </summary> </member> <member name="T:Microsoft.Playwright.Core.WebSocketRoute"> <summary> <see cref="T:Microsoft.Playwright.IWebSocketRoute"/>. </summary> </member> <member name="T:Microsoft.Playwright.Helpers.DoubleExtensions"> <summary> Extensions for <see cref="T:System.Double"/>. </summary> </member> <member name="M:Microsoft.Playwright.Helpers.DoubleExtensions.IsNegativeZero(System.Double)"> <summary> Checks if the double is a negative zero. </summary> <param name="d">Number to check.</param> <returns>Whether the number is negative zero or not.</returns> </member> <member name="T:Microsoft.Playwright.Helpers.JsonExtensions"> <summary> JSON extensions. </summary> </member> <member name="P:Microsoft.Playwright.Helpers.JsonExtensions.DefaultJsonSerializerOptions"> <summary> Base serialization options used by Microsoft.Playwright. </summary> </member> <member name="M:Microsoft.Playwright.Helpers.JsonExtensions.ToObject``1(System.Text.Json.JsonElement,System.Text.Json.JsonSerializerOptions)"> <summary> Convert a <see cref="T:System.Text.Json.JsonElement"/> to an object. </summary> <typeparam name="T">Type to convert the <see cref="T:System.Text.Json.JsonElement"/> to.</typeparam> <param name="element">Element to convert.</param> <param name="options">Serialization options.</param> <returns>Converted value.</returns> </member> <member name="M:Microsoft.Playwright.Helpers.JsonExtensions.ToObject(System.Text.Json.JsonElement,System.Type,System.Text.Json.JsonSerializerOptions)"> <summary> Convert a <see cref="T:System.Text.Json.JsonElement"/> to an object. </summary> <param name="element">Element to convert.</param> <param name="type">Type to convert the <see cref="T:System.Text.Json.JsonElement"/> to.</param> <param name="options">Serialization options.</param> <returns>Converted value.</returns> </member> <member name="M:Microsoft.Playwright.Helpers.JsonExtensions.ToJson``1(``0,System.Text.Json.JsonSerializerOptions)"> <summary> Serialize an object. </summary> <typeparam name="T">Object type.</typeparam> <param name="value">Object to serialize.</param> <param name="options">Serialization options.</param> <returns>Serialized object.</returns> </member> <member name="M:Microsoft.Playwright.Helpers.JsonExtensions.ToObject``1(System.Text.Json.JsonDocument,System.Text.Json.JsonSerializerOptions)"> <summary> Convert a <see cref="T:System.Text.Json.JsonDocument"/> to an object. </summary> <typeparam name="T">Type to convert the <see cref="T:System.Text.Json.JsonElement"/> to.</typeparam> <param name="document">Document to convert.</param> <param name="options">Serialization options.</param> <returns>Converted value.</returns> </member> <member name="T:Microsoft.Playwright.Helpers.RegexOptionsExtensions"> <summary> Extensions for <see cref="T:System.Text.RegularExpressions.RegexOptions"/>. </summary> </member> <member name="T:Microsoft.Playwright.Helpers.StringExtensions"> <summary> String extensions. </summary> </member> <member name="M:Microsoft.Playwright.Helpers.StringExtensions.ParseQueryString(System.String)"> <summary> Parse the query string. </summary> <param name="query">Query string.</param> <returns>A <see cref="T:System.Collections.Generic.Dictionary`2"/> containing the parsed QueryString.</returns> </member> <member name="T:Microsoft.Playwright.Helpers.TaskHelper"> <summary> Task helper. </summary> </member> <member name="M:Microsoft.Playwright.Helpers.TaskHelper.WithTimeout(System.Threading.Tasks.Task,System.Int32,System.Func{System.TimeSpan,System.Exception},System.Threading.CancellationToken)"> <summary> Cancels the <paramref name="task"/> after <paramref name="milliseconds"/> milliseconds. </summary> <returns>The task result.</returns> <param name="task">Task to wait for.</param> <param name="milliseconds">Milliseconds timeout.</param> <param name="exceptionFactory">Optional timeout exception factory.</param> <param name="cancellationToken">Cancellation token.</param> </member> <member name="M:Microsoft.Playwright.Helpers.TaskHelper.WithTimeout(System.Threading.Tasks.Task,System.TimeSpan,System.Func{System.TimeSpan,System.Exception},System.Threading.CancellationToken)"> <summary> Cancels the <paramref name="task"/> after a given <paramref name="timeout"/> period. </summary> <returns>The task result.</returns> <param name="task">Task to wait for.</param> <param name="timeout">The timeout period.</param> <param name="exceptionFactory">Optional timeout exception factory.</param> <param name="cancellationToken">Cancellation token.</param> </member> <member name="M:Microsoft.Playwright.Helpers.TaskHelper.WithTimeout(System.Threading.Tasks.Task,System.Func{System.Threading.Tasks.Task},System.Int32,System.Threading.CancellationToken)"> <summary> Cancels the <paramref name="task"/> after <paramref name="timeout"/> milliseconds. </summary> <returns>The task result.</returns> <param name="task">Task to wait for.</param> <param name="timeoutAction">Action to be executed on Timeout.</param> <param name="timeout">Milliseconds timeout.</param> <param name="cancellationToken">Cancellation token.</param> </member> <member name="M:Microsoft.Playwright.Helpers.TaskHelper.WithTimeout(System.Threading.Tasks.Task,System.Func{System.Threading.Tasks.Task},System.TimeSpan,System.Threading.CancellationToken)"> <summary> Cancels the <paramref name="task"/> after a given <paramref name="timeout"/> period. </summary> <returns>The task result.</returns> <param name="task">Task to wait for.</param> <param name="timeoutAction">Action to be executed on Timeout.</param> <param name="timeout">The timeout period.</param> <param name="cancellationToken">Cancellation token.</param> </member> <member name="M:Microsoft.Playwright.Helpers.TaskHelper.WithTimeout``1(System.Threading.Tasks.Task{``0},System.Action,System.Int32)"> <summary> Cancels the <paramref name="task"/> after <paramref name="timeout"/> milliseconds. </summary> <returns>The task result.</returns> <param name="task">Task to wait for.</param> <param name="timeoutAction">Action to be executed on Timeout.</param> <param name="timeout">Milliseconds timeout.</param> <typeparam name="T">Return type.</typeparam> </member> <member name="M:Microsoft.Playwright.Helpers.TaskHelper.WithTimeout``1(System.Threading.Tasks.Task{``0},System.Action,System.TimeSpan)"> <summary> Cancels the <paramref name="task"/> after a given <paramref name="timeout"/> period. </summary> <returns>The task result.</returns> <param name="task">Task to wait for.</param> <param name="timeoutAction">Action to be executed on Timeout.</param> <param name="timeout">The timeout period.</param> <typeparam name="T">Return type.</typeparam> </member> <member name="M:Microsoft.Playwright.Helpers.TaskHelper.WithTimeout``1(System.Threading.Tasks.Task{``0},System.Int32,System.Func{System.TimeSpan,System.Exception})"> <summary> Cancels the <paramref name="task"/> after <paramref name="milliseconds"/> milliseconds. </summary> <returns>The task result.</returns> <param name="task">Task to wait for.</param> <param name="milliseconds">Milliseconds timeout.</param> <param name="exceptionFactory">Optional timeout exception factory.</param> <typeparam name="T">Task return type.</typeparam> </member> <member name="M:Microsoft.Playwright.Helpers.TaskHelper.WithTimeout``1(System.Threading.Tasks.Task{``0},System.TimeSpan,System.Func{System.TimeSpan,System.Exception})"> <summary> Cancels the <paramref name="task"/> after a given <paramref name="timeout"/> period. </summary> <returns>The task result.</returns> <param name="task">Task to wait for.</param> <param name="timeout">The timeout period.</param> <param name="exceptionFactory">Optional timeout exception factory.</param> <typeparam name="T">Task return type.</typeparam> </member> <member name="M:Microsoft.Playwright.Playwright.CreateAsync"> <summary> Launches Playwright. </summary> <returns>A <see cref="T:System.Threading.Tasks.Task"/> that completes when the playwright driver is ready to be used.</returns> </member> <member name="M:Microsoft.Playwright.Transport.Connection.Finalize"> <inheritdoc cref="M:System.IDisposable.Dispose"/> </member> <member name="M:Microsoft.Playwright.Transport.StdIOTransport.StartProcessWithUTF8IOEncoding(System.Diagnostics.Process)"> <summary> Starts the given process with UTF8-encoding for input and output without BOM which breaks driver transport otherwise. This function backports https://github.com/dotnet/runtime/issues/22051 to .NET Framework. See also https://github.com/microsoft/playwright-dotnet/issues/2517. See also https://stackoverflow.com/a/37258056/6512681. Can be removed after netstandard2.1+ where ProcessStartInfo.StandardInputEncoding is available. </summary> <param name="process">The process to start.</param> </member> </members> </doc> |