blob: 3de962e9d50ea06419780a7def3eda33a35c7997 [file] [log] [blame] [edit]
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Class WebDriver </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Class WebDriver ">
<meta name="description" content="A base class representing a driver for a web browser.">
<link rel="icon" href="../images/favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
<meta name="docfx:navrel" content="../toc.html">
<meta name="docfx:tocrel" content="toc.html">
<meta name="docfx:rel" content="../">
<meta name="docfx:docurl" content="https://github.com/SeleniumHQ/selenium/new/trunk/apiSpec/new?filename=OpenQA_Selenium_WebDriver.md&amp;value=---%0Auid%3A%20OpenQA.Selenium.WebDriver%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">
<meta name="loc:inThisArticle" content="In this article">
<meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
<meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
<meta name="loc:tocFilter" content="Filter by title">
<meta name="loc:nextArticle" content="Next">
<meta name="loc:prevArticle" content="Previous">
<meta name="loc:themeLight" content="Light">
<meta name="loc:themeDark" content="Dark">
<meta name="loc:themeAuto" content="Auto">
<meta name="loc:changeTheme" content="Change theme">
<meta name="loc:copy" content="Copy">
<meta name="loc:downloadPdf" content="Download PDF">
<script type="module" src="./../public/docfx.min.js"></script>
<script>
const theme = localStorage.getItem('theme') || 'auto'
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
</script>
</head>
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
<header class="bg-body border-bottom">
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
<div class="container-xxl flex-nowrap">
<a class="navbar-brand" href="../index.html">
<img id="logo" class="svg" src="../images/logo.svg" alt="Selenium .NET API">
Selenium .NET API
</a>
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
<i class="bi bi-three-dots"></i>
</button>
<div class="collapse navbar-collapse" id="navpanel">
<div id="navbar">
<form class="search" role="search" id="search">
<i class="bi bi-search"></i>
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
</form>
</div>
</div>
</div>
</nav>
</header>
<main class="container-xxl">
<div class="toc-offcanvas">
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<nav class="toc" id="toc"></nav>
</div>
</div>
</div>
<div class="content">
<div class="actionbar">
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
<i class="bi bi-list"></i>
</button>
<nav id="breadcrumb"></nav>
</div>
<article data-uid="OpenQA.Selenium.WebDriver">
<h1 id="OpenQA_Selenium_WebDriver" data-uid="OpenQA.Selenium.WebDriver" class="text-break">
Class WebDriver <a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/WebDriver.cs/#L36"><i class="bi bi-code-slash"></i></a>
</h1>
<div class="facts text-secondary">
<dl><dt>Namespace</dt><dd><a class="xref" href="OpenQA.html">OpenQA</a>.<a class="xref" href="OpenQA.Selenium.html">Selenium</a></dd></dl>
<dl><dt>Assembly</dt><dd>WebDriver.dll</dd></dl>
</div>
<div class="markdown summary"><p>A base class representing a driver for a web browser.</p>
</div>
<div class="markdown conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public class WebDriver : IWebDriver, IDisposable, ISearchContext, IJavaScriptExecutor, IFindsElement, ITakesScreenshot, ISupportsPrint, IActionExecutor, IAllowsFileDetection, IHasCapabilities, IHasCommandExecutor, IHasSessionId, ICustomDriverCommandExecutor, IHasVirtualAuthenticator</code></pre>
</div>
<dl class="typelist inheritance">
<dt>Inheritance</dt>
<dd>
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
<div><span class="xref">WebDriver</span></div>
</dd>
</dl>
<dl class="typelist implements">
<dt>Implements</dt>
<dd>
<div><a class="xref" href="OpenQA.Selenium.IWebDriver.html">IWebDriver</a></div>
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.idisposable">IDisposable</a></div>
<div><a class="xref" href="OpenQA.Selenium.ISearchContext.html">ISearchContext</a></div>
<div><a class="xref" href="OpenQA.Selenium.IJavaScriptExecutor.html">IJavaScriptExecutor</a></div>
<div><a class="xref" href="OpenQA.Selenium.Internal.IFindsElement.html">IFindsElement</a></div>
<div><a class="xref" href="OpenQA.Selenium.ITakesScreenshot.html">ITakesScreenshot</a></div>
<div><a class="xref" href="OpenQA.Selenium.ISupportsPrint.html">ISupportsPrint</a></div>
<div><a class="xref" href="OpenQA.Selenium.IActionExecutor.html">IActionExecutor</a></div>
<div><a class="xref" href="OpenQA.Selenium.IAllowsFileDetection.html">IAllowsFileDetection</a></div>
<div><a class="xref" href="OpenQA.Selenium.IHasCapabilities.html">IHasCapabilities</a></div>
<div><a class="xref" href="OpenQA.Selenium.IHasCommandExecutor.html">IHasCommandExecutor</a></div>
<div><a class="xref" href="OpenQA.Selenium.IHasSessionId.html">IHasSessionId</a></div>
<div><a class="xref" href="OpenQA.Selenium.ICustomDriverCommandExecutor.html">ICustomDriverCommandExecutor</a></div>
<div><a class="xref" href="OpenQA.Selenium.VirtualAuth.IHasVirtualAuthenticator.html">IHasVirtualAuthenticator</a></div>
</dd>
</dl>
<dl class="typelist derived">
<dt>Derived</dt>
<dd>
<div><a class="xref" href="OpenQA.Selenium.Chromium.ChromiumDriver.html">ChromiumDriver</a></div>
<div><a class="xref" href="OpenQA.Selenium.Firefox.FirefoxDriver.html">FirefoxDriver</a></div>
<div><a class="xref" href="OpenQA.Selenium.IE.InternetExplorerDriver.html">InternetExplorerDriver</a></div>
<div><a class="xref" href="OpenQA.Selenium.Remote.RemoteWebDriver.html">RemoteWebDriver</a></div>
<div><a class="xref" href="OpenQA.Selenium.Safari.SafariDriver.html">SafariDriver</a></div>
</dd>
</dl>
<dl class="typelist inheritedMembers">
<dt>Inherited Members</dt>
<dd>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
</div>
</dd></dl>
<dl class="typelist extensionMethods">
<dt>Extension Methods</dt>
<dd>
<div>
<a class="xref" href="OpenQA.Selenium.BiDi.WebDriverExtensions.html#OpenQA_Selenium_BiDi_WebDriverExtensions_AsBiDiAsync_OpenQA_Selenium_IWebDriver_OpenQA_Selenium_BiDi_BiDiOptions_">WebDriverExtensions.AsBiDiAsync(IWebDriver, BiDiOptions?)</a>
</div>
</dd></dl>
<h2 class="section" id="constructors">Constructors
</h2>
<a id="OpenQA_Selenium_WebDriver__ctor_" data-uid="OpenQA.Selenium.WebDriver.#ctor*"></a>
<h3 id="OpenQA_Selenium_WebDriver__ctor_OpenQA_Selenium_ICommandExecutor_OpenQA_Selenium_ICapabilities_" data-uid="OpenQA.Selenium.WebDriver.#ctor(OpenQA.Selenium.ICommandExecutor,OpenQA.Selenium.ICapabilities)">
WebDriver(ICommandExecutor, ICapabilities)
<a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/WebDriver.cs/#L53"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="OpenQA.Selenium.WebDriver.html">WebDriver</a> class.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">protected WebDriver(ICommandExecutor executor, ICapabilities capabilities)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>executor</code> <a class="xref" href="OpenQA.Selenium.ICommandExecutor.html">ICommandExecutor</a></dt>
<dd><p>The <a class="xref" href="OpenQA.Selenium.ICommandExecutor.html">ICommandExecutor</a> object used to execute commands.</p>
</dd>
<dt><code>capabilities</code> <a class="xref" href="OpenQA.Selenium.ICapabilities.html">ICapabilities</a></dt>
<dd><p>The <a class="xref" href="OpenQA.Selenium.ICapabilities.html">ICapabilities</a> object used to configure the driver session.</p>
</dd>
</dl>
<h2 class="section" id="fields">Fields
</h2>
<h3 id="OpenQA_Selenium_WebDriver_DefaultCommandTimeout" data-uid="OpenQA.Selenium.WebDriver.DefaultCommandTimeout">
DefaultCommandTimeout
<a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/WebDriver.cs/#L41"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>The default command timeout for HTTP requests in a RemoteWebDriver instance.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">protected static readonly TimeSpan DefaultCommandTimeout</code></pre>
</div>
<h4 class="section">Field Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.timespan">TimeSpan</a></dt>
<dd></dd>
</dl>
<h2 class="section" id="properties">Properties
</h2>
<a id="OpenQA_Selenium_WebDriver_AuthenticatorId_" data-uid="OpenQA.Selenium.WebDriver.AuthenticatorId*"></a>
<h3 id="OpenQA_Selenium_WebDriver_AuthenticatorId" data-uid="OpenQA.Selenium.WebDriver.AuthenticatorId">
AuthenticatorId
<a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/WebDriver.cs/#L1037"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Gets the cached virtual authenticator ID, or <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null">null</a> if no authenticator ID is set.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public string? AuthenticatorId { get; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
<a id="OpenQA_Selenium_WebDriver_Capabilities_" data-uid="OpenQA.Selenium.WebDriver.Capabilities*"></a>
<h3 id="OpenQA_Selenium_WebDriver_Capabilities" data-uid="OpenQA.Selenium.WebDriver.Capabilities">
Capabilities
<a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/WebDriver.cs/#L95"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Gets the <a class="xref" href="OpenQA.Selenium.ICapabilities.html">ICapabilities</a> that the driver session was created with, which may be different from those requested.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public ICapabilities Capabilities { get; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="OpenQA.Selenium.ICapabilities.html">ICapabilities</a></dt>
<dd></dd>
</dl>
<a id="OpenQA_Selenium_WebDriver_CommandExecutor_" data-uid="OpenQA.Selenium.WebDriver.CommandExecutor*"></a>
<h3 id="OpenQA_Selenium_WebDriver_CommandExecutor" data-uid="OpenQA.Selenium.WebDriver.CommandExecutor">
CommandExecutor
<a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/WebDriver.cs/#L90"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Gets the <a class="xref" href="OpenQA.Selenium.ICommandExecutor.html">ICommandExecutor</a> which executes commands for this driver.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public ICommandExecutor CommandExecutor { get; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="OpenQA.Selenium.ICommandExecutor.html">ICommandExecutor</a></dt>
<dd></dd>
</dl>
<a id="OpenQA_Selenium_WebDriver_CurrentWindowHandle_" data-uid="OpenQA.Selenium.WebDriver.CurrentWindowHandle*"></a>
<h3 id="OpenQA_Selenium_WebDriver_CurrentWindowHandle" data-uid="OpenQA.Selenium.WebDriver.CurrentWindowHandle">
CurrentWindowHandle
<a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/WebDriver.cs/#L147"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Gets the current window handle, which is an opaque handle to this
window that uniquely identifies it within this driver instance.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public string CurrentWindowHandle { get; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
<a id="OpenQA_Selenium_WebDriver_ElementFactory_" data-uid="OpenQA.Selenium.WebDriver.ElementFactory*"></a>
<h3 id="OpenQA_Selenium_WebDriver_ElementFactory" data-uid="OpenQA.Selenium.WebDriver.ElementFactory">
ElementFactory
<a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/WebDriver.cs/#L207"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Gets or sets the factory object used to create instances of <a class="xref" href="OpenQA.Selenium.WebElement.html">WebElement</a>
or its subclasses.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">protected WebElementFactory ElementFactory { get; set; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="OpenQA.Selenium.WebElementFactory.html">WebElementFactory</a></dt>
<dd></dd>
</dl>
<h4 class="section">Exceptions</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentnullexception">ArgumentNullException</a></dt>
<dd><p>If value is set to <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null">null</a>.</p>
</dd>
</dl>
<a id="OpenQA_Selenium_WebDriver_FileDetector_" data-uid="OpenQA.Selenium.WebDriver.FileDetector*"></a>
<h3 id="OpenQA_Selenium_WebDriver_FileDetector" data-uid="OpenQA.Selenium.WebDriver.FileDetector">
FileDetector
<a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/WebDriver.cs/#L194"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Gets or sets the <a class="xref" href="OpenQA.Selenium.IFileDetector.html">IFileDetector</a> responsible for detecting
sequences of keystrokes representing file paths and names.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public virtual IFileDetector FileDetector { get; set; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="OpenQA.Selenium.IFileDetector.html">IFileDetector</a></dt>
<dd></dd>
</dl>
<h4 class="section">Exceptions</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentnullexception">ArgumentNullException</a></dt>
<dd><p>If value is set to <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null">null</a>.</p>
</dd>
</dl>
<a id="OpenQA_Selenium_WebDriver_IsActionExecutor_" data-uid="OpenQA.Selenium.WebDriver.IsActionExecutor*"></a>
<h3 id="OpenQA_Selenium_WebDriver_IsActionExecutor" data-uid="OpenQA.Selenium.WebDriver.IsActionExecutor">
IsActionExecutor
<a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/WebDriver.cs/#L182"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Gets a value indicating whether this object is a valid action executor.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public bool IsActionExecutor { get; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
<dd></dd>
</dl>
<a id="OpenQA_Selenium_WebDriver_PageSource_" data-uid="OpenQA.Selenium.WebDriver.PageSource*"></a>
<h3 id="OpenQA_Selenium_WebDriver_PageSource" data-uid="OpenQA.Selenium.WebDriver.PageSource">
PageSource
<a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/WebDriver.cs/#L132"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Gets the source of the page last loaded by the browser.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public string PageSource { get; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
<a id="OpenQA_Selenium_WebDriver_SessionId_" data-uid="OpenQA.Selenium.WebDriver.SessionId*"></a>
<h3 id="OpenQA_Selenium_WebDriver_SessionId" data-uid="OpenQA.Selenium.WebDriver.SessionId">
SessionId
<a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/WebDriver.cs/#L187"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Gets the <a class="xref" href="OpenQA.Selenium.SessionId.html">SessionId</a> for the current session of this driver.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public SessionId SessionId { get; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="OpenQA.Selenium.SessionId.html">SessionId</a></dt>
<dd></dd>
</dl>
<a id="OpenQA_Selenium_WebDriver_Title_" data-uid="OpenQA.Selenium.WebDriver.Title*"></a>
<h3 id="OpenQA_Selenium_WebDriver_Title" data-uid="OpenQA.Selenium.WebDriver.Title">
Title
<a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/WebDriver.cs/#L119"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Gets the title of the current browser window.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public string Title { get; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
<a id="OpenQA_Selenium_WebDriver_Url_" data-uid="OpenQA.Selenium.WebDriver.Url*"></a>
<h3 id="OpenQA_Selenium_WebDriver_Url" data-uid="OpenQA.Selenium.WebDriver.Url">
Url
<a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/WebDriver.cs/#L103"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Gets or sets the URL the browser is currently displaying.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public string Url { get; set; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
<dl class="typelist seealso">
<dt>See Also</dt>
<dd>
<div><a class="xref" href="OpenQA.Selenium.IWebDriver.html#OpenQA_Selenium_IWebDriver_Url">Url</a></div>
<div><a class="xref" href="OpenQA.Selenium.INavigation.html#OpenQA_Selenium_INavigation_GoToUrl_System_String_">GoToUrl</a>(<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>)</div>
<div><a class="xref" href="OpenQA.Selenium.INavigation.html#OpenQA_Selenium_INavigation_GoToUrl_System_Uri_">GoToUrl</a>(<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.uri">Uri</a>)</div>
</dd>
</dl>
<a id="OpenQA_Selenium_WebDriver_WindowHandles_" data-uid="OpenQA.Selenium.WebDriver.WindowHandles*"></a>
<h3 id="OpenQA_Selenium_WebDriver_WindowHandles" data-uid="OpenQA.Selenium.WebDriver.WindowHandles">
WindowHandles
<a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/WebDriver.cs/#L161"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Gets the window handles of open browser windows.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public ReadOnlyCollection&lt;string&gt; WindowHandles { get; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.objectmodel.readonlycollection-1">ReadOnlyCollection</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>&gt;</dt>
<dd></dd>
</dl>
<h2 class="section" id="methods">Methods
</h2>
<a id="OpenQA_Selenium_WebDriver_AddCredential_" data-uid="OpenQA.Selenium.WebDriver.AddCredential*"></a>
<h3 id="OpenQA_Selenium_WebDriver_AddCredential_OpenQA_Selenium_VirtualAuth_Credential_" data-uid="OpenQA.Selenium.WebDriver.AddCredential(OpenQA.Selenium.VirtualAuth.Credential)">
AddCredential(Credential)
<a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/WebDriver.cs/#L1045"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Add a credential to the Virtual Authenticator/</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void AddCredential(Credential credential)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>credential</code> <a class="xref" href="OpenQA.Selenium.VirtualAuth.Credential.html">Credential</a></dt>
<dd><p>The credential to be stored in the Virtual Authenticator</p>
</dd>
</dl>
<h4 class="section">Exceptions</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentnullexception">ArgumentNullException</a></dt>
<dd><p>If <code class="paramref">credential</code> is <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null">null</a>.</p>
</dd>
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.invalidoperationexception">InvalidOperationException</a></dt>
<dd><p>If a Virtual Authenticator has not been added yet.</p>
</dd>
</dl>
<a id="OpenQA_Selenium_WebDriver_AddVirtualAuthenticator_" data-uid="OpenQA.Selenium.WebDriver.AddVirtualAuthenticator*"></a>
<h3 id="OpenQA_Selenium_WebDriver_AddVirtualAuthenticator_OpenQA_Selenium_VirtualAuth_VirtualAuthenticatorOptions_" data-uid="OpenQA.Selenium.WebDriver.AddVirtualAuthenticator(OpenQA.Selenium.VirtualAuth.VirtualAuthenticatorOptions)">
AddVirtualAuthenticator(VirtualAuthenticatorOptions)
<a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/WebDriver.cs/#L1000"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Creates a Virtual Authenticator.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public string AddVirtualAuthenticator(VirtualAuthenticatorOptions options)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>options</code> <a class="xref" href="OpenQA.Selenium.VirtualAuth.VirtualAuthenticatorOptions.html">VirtualAuthenticatorOptions</a></dt>
<dd><p><a href="https://w3c.github.io/webauthn/#sctn-automation-virtual-authenticators">Virtual Authenticator Options</a>.</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>Authenticator id as string</p>
</dd>
</dl>
<h4 class="section">Exceptions</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentnullexception">ArgumentNullException</a></dt>
<dd><p>If <code class="paramref">options</code> is <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null">null</a>.</p>
</dd>
</dl>
<a id="OpenQA_Selenium_WebDriver_Close_" data-uid="OpenQA.Selenium.WebDriver.Close*"></a>
<h3 id="OpenQA_Selenium_WebDriver_Close" data-uid="OpenQA.Selenium.WebDriver.Close">
Close()
<a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/WebDriver.cs/#L216"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Closes the Browser</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void Close()</code></pre>
</div>
<a id="OpenQA_Selenium_WebDriver_Dispose_" data-uid="OpenQA.Selenium.WebDriver.Dispose*"></a>
<h3 id="OpenQA_Selenium_WebDriver_Dispose" data-uid="OpenQA.Selenium.WebDriver.Dispose">
Dispose()
<a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/WebDriver.cs/#L224"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Dispose the WebDriver Instance</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void Dispose()</code></pre>
</div>
<a id="OpenQA_Selenium_WebDriver_Dispose_" data-uid="OpenQA.Selenium.WebDriver.Dispose*"></a>
<h3 id="OpenQA_Selenium_WebDriver_Dispose_System_Boolean_" data-uid="OpenQA.Selenium.WebDriver.Dispose(System.Boolean)">
Dispose(bool)
<a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/WebDriver.cs/#L685"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Stops the client from running</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">protected virtual void Dispose(bool disposing)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>disposing</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
<dd><p>if its in the process of disposing</p>
</dd>
</dl>
<a id="OpenQA_Selenium_WebDriver_Execute_" data-uid="OpenQA.Selenium.WebDriver.Execute*"></a>
<h3 id="OpenQA_Selenium_WebDriver_Execute_System_String_System_Collections_Generic_Dictionary_System_String_System_Object__" data-uid="OpenQA.Selenium.WebDriver.Execute(System.String,System.Collections.Generic.Dictionary{System.String,System.Object})">
Execute(string, Dictionary&lt;string, object&gt;?)
<a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/WebDriver.cs/#L561"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Executes a command with this driver.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">protected virtual Response Execute(string driverCommandToExecute, Dictionary&lt;string, object&gt;? parameters)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>driverCommandToExecute</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>A <a class="xref" href="OpenQA.Selenium.DriverCommand.html">DriverCommand</a> value representing the command to execute.</p>
</dd>
<dt><code>parameters</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.dictionary-2">Dictionary</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a>&gt;</dt>
<dd><p>A <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.dictionary-2">Dictionary&lt;TKey, TValue&gt;</a> containing the names and values of the parameters of the command.</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="OpenQA.Selenium.Response.html">Response</a></dt>
<dd><p>A <a class="xref" href="OpenQA.Selenium.Response.html">Response</a> containing information about the success or failure of the command and any data returned by the command.</p>
</dd>
</dl>
<h4 class="section">Exceptions</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentnullexception">ArgumentNullException</a></dt>
<dd><p>If <code class="paramref">driverCommandToExecute</code> is <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null">null</a>.</p>
</dd>
</dl>
<a id="OpenQA_Selenium_WebDriver_ExecuteAsync_" data-uid="OpenQA.Selenium.WebDriver.ExecuteAsync*"></a>
<h3 id="OpenQA_Selenium_WebDriver_ExecuteAsync_System_String_System_Collections_Generic_Dictionary_System_String_System_Object__" data-uid="OpenQA.Selenium.WebDriver.ExecuteAsync(System.String,System.Collections.Generic.Dictionary{System.String,System.Object})">
ExecuteAsync(string, Dictionary&lt;string, object&gt;?)
<a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/WebDriver.cs/#L577"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Executes a command with this driver.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">protected virtual Task&lt;Response&gt; ExecuteAsync(string driverCommandToExecute, Dictionary&lt;string, object&gt;? parameters)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>driverCommandToExecute</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>A <a class="xref" href="OpenQA.Selenium.DriverCommand.html">DriverCommand</a> value representing the command to execute.</p>
</dd>
<dt><code>parameters</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.dictionary-2">Dictionary</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a>&gt;</dt>
<dd><p>A <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.dictionary-2">Dictionary&lt;TKey, TValue&gt;</a> containing the names and values of the parameters of the command.</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1">Task</a>&lt;<a class="xref" href="OpenQA.Selenium.Response.html">Response</a>&gt;</dt>
<dd><p>A <a class="xref" href="OpenQA.Selenium.Response.html">Response</a> containing information about the success or failure of the command and any data returned by the command.</p>
</dd>
</dl>
<h4 class="section">Exceptions</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentnullexception">ArgumentNullException</a></dt>
<dd><p>If <code class="paramref">driverCommandToExecute</code> is <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null">null</a>.</p>
</dd>
</dl>
<a id="OpenQA_Selenium_WebDriver_ExecuteAsyncScript_" data-uid="OpenQA.Selenium.WebDriver.ExecuteAsyncScript*"></a>
<h3 id="OpenQA_Selenium_WebDriver_ExecuteAsyncScript_System_String_System_Object___" data-uid="OpenQA.Selenium.WebDriver.ExecuteAsyncScript(System.String,System.Object[])">
ExecuteAsyncScript(string, params object?[]?)
<a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/WebDriver.cs/#L237"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Executes JavaScript &quot;asynchronously&quot; in the context of the currently selected frame or window,
executing the callback function specified as the last argument in the list of arguments.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public object? ExecuteAsyncScript(string script, params object?[]? args)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>script</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>The JavaScript code to execute.</p>
</dd>
<dt><code>args</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a>[]</dt>
<dd><p>The arguments to the script.</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></dt>
<dd><p>The value returned by the script.</p>
</dd>
</dl>
<a id="OpenQA_Selenium_WebDriver_ExecuteCustomDriverCommand_" data-uid="OpenQA.Selenium.WebDriver.ExecuteCustomDriverCommand*"></a>
<h3 id="OpenQA_Selenium_WebDriver_ExecuteCustomDriverCommand_System_String_System_Collections_Generic_Dictionary_System_String_System_Object__" data-uid="OpenQA.Selenium.WebDriver.ExecuteCustomDriverCommand(System.String,System.Collections.Generic.Dictionary{System.String,System.Object})">
ExecuteCustomDriverCommand(string, Dictionary&lt;string, object&gt;)
<a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/WebDriver.cs/#L461"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Executes a command with this driver.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public object? ExecuteCustomDriverCommand(string driverCommandToExecute, Dictionary&lt;string, object&gt; parameters)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>driverCommandToExecute</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>The name of the command to execute. The command name must be registered with the command executor, and must not be a command name known to this driver type.</p>
</dd>
<dt><code>parameters</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.dictionary-2">Dictionary</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a>&gt;</dt>
<dd><p>A <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.dictionary-2">Dictionary&lt;TKey, TValue&gt;</a> containing the names and values of the parameters of the command.</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></dt>
<dd><p>A <a class="xref" href="OpenQA.Selenium.Response.html">Response</a> containing information about the success or failure of the command and any data returned by the command.</p>
</dd>
</dl>
<h4 class="section">Exceptions</h4>
<dl class="parameters">
<dt><a class="xref" href="OpenQA.Selenium.WebDriverException.html">WebDriverException</a></dt>
<dd><p>The command returned an exceptional value.</p>
</dd>
</dl>
<a id="OpenQA_Selenium_WebDriver_ExecuteScript_" data-uid="OpenQA.Selenium.WebDriver.ExecuteScript*"></a>
<h3 id="OpenQA_Selenium_WebDriver_ExecuteScript_OpenQA_Selenium_PinnedScript_System_Object___" data-uid="OpenQA.Selenium.WebDriver.ExecuteScript(OpenQA.Selenium.PinnedScript,System.Object[])">
ExecuteScript(PinnedScript, params object?[]?)
<a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/WebDriver.cs/#L260"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Executes JavaScript in the context of the currently selected frame or window</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public object? ExecuteScript(PinnedScript script, params object?[]? args)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>script</code> <a class="xref" href="OpenQA.Selenium.PinnedScript.html">PinnedScript</a></dt>
<dd><p>A <a class="xref" href="OpenQA.Selenium.PinnedScript.html">PinnedScript</a> object containing the JavaScript code to execute.</p>
</dd>
<dt><code>args</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a>[]</dt>
<dd><p>The arguments to the script.</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></dt>
<dd><p>The value returned by the script.</p>
</dd>
</dl>
<h4 class="section">Exceptions</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentnullexception">ArgumentNullException</a></dt>
<dd><p>If <code class="paramref">script</code> is <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null">null</a>.</p>
</dd>
</dl>
<a id="OpenQA_Selenium_WebDriver_ExecuteScript_" data-uid="OpenQA.Selenium.WebDriver.ExecuteScript*"></a>
<h3 id="OpenQA_Selenium_WebDriver_ExecuteScript_System_String_System_Object___" data-uid="OpenQA.Selenium.WebDriver.ExecuteScript(System.String,System.Object[])">
ExecuteScript(string, params object?[]?)
<a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/WebDriver.cs/#L248"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Executes JavaScript in the context of the currently selected frame or window</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public object? ExecuteScript(string script, params object?[]? args)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>script</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>The JavaScript code to execute.</p>
</dd>
<dt><code>args</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a>[]</dt>
<dd><p>The arguments to the script.</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></dt>
<dd><p>The value returned by the script.</p>
</dd>
</dl>
<a id="OpenQA_Selenium_WebDriver_ExecuteScriptCommand_" data-uid="OpenQA.Selenium.WebDriver.ExecuteScriptCommand*"></a>
<h3 id="OpenQA_Selenium_WebDriver_ExecuteScriptCommand_System_String_System_String_System_Object___" data-uid="OpenQA.Selenium.WebDriver.ExecuteScriptCommand(System.String,System.String,System.Object[])">
ExecuteScriptCommand(string, string, params object?[]?)
<a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/WebDriver.cs/#L837"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Executes JavaScript in the context of the currently selected frame or window using a specific command.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">protected object? ExecuteScriptCommand(string script, string commandName, params object?[]? args)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>script</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>The JavaScript code to execute.</p>
</dd>
<dt><code>commandName</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>The name of the command to execute.</p>
</dd>
<dt><code>args</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a>[]</dt>
<dd><p>The arguments to the script.</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></dt>
<dd><p>The value returned by the script.</p>
</dd>
</dl>
<a id="OpenQA_Selenium_WebDriver_FindElement_" data-uid="OpenQA.Selenium.WebDriver.FindElement*"></a>
<h3 id="OpenQA_Selenium_WebDriver_FindElement_OpenQA_Selenium_By_" data-uid="OpenQA.Selenium.WebDriver.FindElement(OpenQA.Selenium.By)">
FindElement(By)
<a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/WebDriver.cs/#L282"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Finds the first element in the page that matches the <a class="xref" href="OpenQA.Selenium.By.html">By</a> object</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public IWebElement FindElement(By by)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>by</code> <a class="xref" href="OpenQA.Selenium.By.html">By</a></dt>
<dd><p>By mechanism to find the object</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="OpenQA.Selenium.IWebElement.html">IWebElement</a></dt>
<dd><p>IWebElement object so that you can interact with that object</p>
</dd>
</dl>
<h4 class="section" id="OpenQA_Selenium_WebDriver_FindElement_OpenQA_Selenium_By__examples">Examples</h4>
<pre><code class="lang-csharp">IWebDriver driver = new InternetExplorerDriver();
IWebElement elem = driver.FindElement(By.Name("q"));</code></pre>
<h4 class="section">Exceptions</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentnullexception">ArgumentNullException</a></dt>
<dd><p>If <code class="paramref">by</code> is <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null">null</a>.</p>
</dd>
</dl>
<a id="OpenQA_Selenium_WebDriver_FindElement_" data-uid="OpenQA.Selenium.WebDriver.FindElement*"></a>
<h3 id="OpenQA_Selenium_WebDriver_FindElement_System_String_System_String_" data-uid="OpenQA.Selenium.WebDriver.FindElement(System.String,System.String)">
FindElement(string, string)
<a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/WebDriver.cs/#L298"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Finds an element matching the given mechanism and value.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public virtual IWebElement FindElement(string mechanism, string value)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>mechanism</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>The mechanism by which to find the element.</p>
</dd>
<dt><code>value</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>The value to use to search for the element.</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="OpenQA.Selenium.IWebElement.html">IWebElement</a></dt>
<dd><p>The first <a class="xref" href="OpenQA.Selenium.IWebElement.html">IWebElement</a> matching the given criteria.</p>
</dd>
</dl>
<a id="OpenQA_Selenium_WebDriver_FindElements_" data-uid="OpenQA.Selenium.WebDriver.FindElements*"></a>
<h3 id="OpenQA_Selenium_WebDriver_FindElements_OpenQA_Selenium_By_" data-uid="OpenQA.Selenium.WebDriver.FindElements(OpenQA.Selenium.By)">
FindElements(By)
<a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/WebDriver.cs/#L320"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Finds the elements on the page by using the <a class="xref" href="OpenQA.Selenium.By.html">By</a> object and returns a ReadOnlyCollection of the Elements on the page</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public ReadOnlyCollection&lt;IWebElement&gt; FindElements(By by)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>by</code> <a class="xref" href="OpenQA.Selenium.By.html">By</a></dt>
<dd><p>By mechanism to find the element</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.objectmodel.readonlycollection-1">ReadOnlyCollection</a>&lt;<a class="xref" href="OpenQA.Selenium.IWebElement.html">IWebElement</a>&gt;</dt>
<dd><p>ReadOnlyCollection of IWebElement</p>
</dd>
</dl>
<h4 class="section" id="OpenQA_Selenium_WebDriver_FindElements_OpenQA_Selenium_By__examples">Examples</h4>
<pre><code class="lang-csharp">IWebDriver driver = new InternetExplorerDriver();
ReadOnlyCollection&lt;IWebElement&gt; classList = driver.FindElements(By.ClassName("class"));</code></pre>
<a id="OpenQA_Selenium_WebDriver_FindElements_" data-uid="OpenQA.Selenium.WebDriver.FindElements*"></a>
<h3 id="OpenQA_Selenium_WebDriver_FindElements_System_String_System_String_" data-uid="OpenQA.Selenium.WebDriver.FindElements(System.String,System.String)">
FindElements(string, string)
<a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/WebDriver.cs/#L336"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Finds all elements matching the given mechanism and value.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public virtual ReadOnlyCollection&lt;IWebElement&gt; FindElements(string mechanism, string value)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>mechanism</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>The mechanism by which to find the elements.</p>
</dd>
<dt><code>value</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>The value to use to search for the elements.</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.objectmodel.readonlycollection-1">ReadOnlyCollection</a>&lt;<a class="xref" href="OpenQA.Selenium.IWebElement.html">IWebElement</a>&gt;</dt>
<dd><p>A collection of all of the <a class="xref" href="OpenQA.Selenium.IWebElement.html">IWebElements</a> matching the given criteria.</p>
</dd>
</dl>
<a id="OpenQA_Selenium_WebDriver_GetCapabilitiesDictionary_" data-uid="OpenQA.Selenium.WebDriver.GetCapabilitiesDictionary*"></a>
<h3 id="OpenQA_Selenium_WebDriver_GetCapabilitiesDictionary_OpenQA_Selenium_ICapabilities_" data-uid="OpenQA.Selenium.WebDriver.GetCapabilitiesDictionary(OpenQA.Selenium.ICapabilities)">
GetCapabilitiesDictionary(ICapabilities)
<a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/WebDriver.cs/#L650"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Gets the capabilities as a dictionary.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">protected virtual Dictionary&lt;string, object&gt; GetCapabilitiesDictionary(ICapabilities capabilitiesToConvert)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>capabilitiesToConvert</code> <a class="xref" href="OpenQA.Selenium.ICapabilities.html">ICapabilities</a></dt>
<dd><p>The dictionary to return.</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.dictionary-2">Dictionary</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a>&gt;</dt>
<dd><p>A Dictionary consisting of the capabilities requested.</p>
</dd>
</dl>
<h4 class="section" id="OpenQA_Selenium_WebDriver_GetCapabilitiesDictionary_OpenQA_Selenium_ICapabilities__remarks">Remarks</h4>
<div class="markdown level1 remarks"><p>This method is only transitional. Do not rely on it. It will be removed
once browser driver capability formats stabilize.</p>
</div>
<h4 class="section">Exceptions</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentnullexception">ArgumentNullException</a></dt>
<dd><p>If <code class="paramref">capabilitiesToConvert</code> is <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null">null</a>.</p>
</dd>
</dl>
<a id="OpenQA_Selenium_WebDriver_GetCredentials_" data-uid="OpenQA.Selenium.WebDriver.GetCredentials*"></a>
<h3 id="OpenQA_Selenium_WebDriver_GetCredentials" data-uid="OpenQA.Selenium.WebDriver.GetCredentials">
GetCredentials()
<a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/WebDriver.cs/#L1065"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Retrieves all the credentials stored in the Virtual Authenticator</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public List&lt;Credential&gt; GetCredentials()</code></pre>
</div>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1">List</a>&lt;<a class="xref" href="OpenQA.Selenium.VirtualAuth.Credential.html">Credential</a>&gt;</dt>
<dd><p>List of credentials</p>
</dd>
</dl>
<h4 class="section">Exceptions</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.invalidoperationexception">InvalidOperationException</a></dt>
<dd><p>If a Virtual Authenticator has not been added yet.</p>
</dd>
</dl>
<a id="OpenQA_Selenium_WebDriver_GetScreenshot_" data-uid="OpenQA.Selenium.WebDriver.GetScreenshot*"></a>
<h3 id="OpenQA_Selenium_WebDriver_GetScreenshot" data-uid="OpenQA.Selenium.WebDriver.GetScreenshot">
GetScreenshot()
<a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/WebDriver.cs/#L351"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Gets a <a class="xref" href="OpenQA.Selenium.Screenshot.html">Screenshot</a> object representing the image of the page on the screen.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public Screenshot GetScreenshot()</code></pre>
</div>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="OpenQA.Selenium.Screenshot.html">Screenshot</a></dt>
<dd><p>A <a class="xref" href="OpenQA.Selenium.Screenshot.html">Screenshot</a> object containing the image.</p>
</dd>
</dl>
<a id="OpenQA_Selenium_WebDriver_Manage_" data-uid="OpenQA.Selenium.WebDriver.Manage*"></a>
<h3 id="OpenQA_Selenium_WebDriver_Manage" data-uid="OpenQA.Selenium.WebDriver.Manage">
Manage()
<a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/WebDriver.cs/#L439"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Instructs the driver to change its settings.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public IOptions Manage()</code></pre>
</div>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="OpenQA.Selenium.IOptions.html">IOptions</a></dt>
<dd><p>An <a class="xref" href="OpenQA.Selenium.IOptions.html">IOptions</a> object allowing the user to change
the settings of the driver.</p>
</dd>
</dl>
<a id="OpenQA_Selenium_WebDriver_Navigate_" data-uid="OpenQA.Selenium.WebDriver.Navigate*"></a>
<h3 id="OpenQA_Selenium_WebDriver_Navigate" data-uid="OpenQA.Selenium.WebDriver.Navigate">
Navigate()
<a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/WebDriver.cs/#L449"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Instructs the driver to navigate the browser to another location.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public INavigation Navigate()</code></pre>
</div>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="OpenQA.Selenium.INavigation.html">INavigation</a></dt>
<dd><p>An <a class="xref" href="OpenQA.Selenium.INavigation.html">INavigation</a> object allowing the user to access
the browser's history and to navigate to a given URL.</p>
</dd>
</dl>
<a id="OpenQA_Selenium_WebDriver_PerformActions_" data-uid="OpenQA.Selenium.WebDriver.PerformActions*"></a>
<h3 id="OpenQA_Selenium_WebDriver_PerformActions_System_Collections_Generic_IList_OpenQA_Selenium_Interactions_ActionSequence__" data-uid="OpenQA.Selenium.WebDriver.PerformActions(System.Collections.Generic.IList{OpenQA.Selenium.Interactions.ActionSequence})">
PerformActions(IList&lt;ActionSequence&gt;)
<a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/WebDriver.cs/#L384"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Performs the specified list of actions with this action executor.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void PerformActions(IList&lt;ActionSequence&gt; actionSequenceList)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>actionSequenceList</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ilist-1">IList</a>&lt;<a class="xref" href="OpenQA.Selenium.Interactions.ActionSequence.html">ActionSequence</a>&gt;</dt>
<dd><p>The list of action sequences to perform.</p>
</dd>
</dl>
<a id="OpenQA_Selenium_WebDriver_Print_" data-uid="OpenQA.Selenium.WebDriver.Print*"></a>
<h3 id="OpenQA_Selenium_WebDriver_Print_OpenQA_Selenium_PrintOptions_" data-uid="OpenQA.Selenium.WebDriver.Print(OpenQA.Selenium.PrintOptions)">
Print(PrintOptions)
<a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/WebDriver.cs/#L366"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Gets a <a class="xref" href="OpenQA.Selenium.PrintDocument.html">PrintDocument</a> object representing a PDF-formatted print representation of the page.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public PrintDocument Print(PrintOptions printOptions)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>printOptions</code> <a class="xref" href="OpenQA.Selenium.PrintOptions.html">PrintOptions</a></dt>
<dd><p>A <a class="xref" href="OpenQA.Selenium.PrintOptions.html">PrintOptions</a> object describing the options of the printed document.</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="OpenQA.Selenium.PrintDocument.html">PrintDocument</a></dt>
<dd><p>The <a class="xref" href="OpenQA.Selenium.PrintDocument.html">PrintDocument</a> object containing the PDF-formatted print representation of the page.</p>
</dd>
</dl>
<h4 class="section">Exceptions</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentnullexception">ArgumentNullException</a></dt>
<dd><p>If <code class="paramref">printOptions</code> is <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null">null</a>.</p>
</dd>
</dl>
<a id="OpenQA_Selenium_WebDriver_Quit_" data-uid="OpenQA.Selenium.WebDriver.Quit*"></a>
<h3 id="OpenQA_Selenium_WebDriver_Quit" data-uid="OpenQA.Selenium.WebDriver.Quit">
Quit()
<a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/WebDriver.cs/#L414"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Close the Browser and Dispose of WebDriver</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void Quit()</code></pre>
</div>
<a id="OpenQA_Selenium_WebDriver_RegisterCustomDriverCommand_" data-uid="OpenQA.Selenium.WebDriver.RegisterCustomDriverCommand*"></a>
<h3 id="OpenQA_Selenium_WebDriver_RegisterCustomDriverCommand_System_String_OpenQA_Selenium_CommandInfo_" data-uid="OpenQA.Selenium.WebDriver.RegisterCustomDriverCommand(System.String,OpenQA.Selenium.CommandInfo)">
RegisterCustomDriverCommand(string, CommandInfo?)
<a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/WebDriver.cs/#L489"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Registers a command to be executed with this driver instance.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public bool RegisterCustomDriverCommand(string commandName, CommandInfo? commandInfo)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>commandName</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>The unique name of the command to register.</p>
</dd>
<dt><code>commandInfo</code> <a class="xref" href="OpenQA.Selenium.CommandInfo.html">CommandInfo</a></dt>
<dd><p>The <a class="xref" href="OpenQA.Selenium.CommandInfo.html">CommandInfo</a> object describing the command.</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
<dd><p><a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">true</a> if the command was registered; otherwise, <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">false</a>.</p>
</dd>
</dl>
<a id="OpenQA_Selenium_WebDriver_RegisterCustomDriverCommands_" data-uid="OpenQA.Selenium.WebDriver.RegisterCustomDriverCommands*"></a>
<h3 id="OpenQA_Selenium_WebDriver_RegisterCustomDriverCommands_System_Collections_Generic_IReadOnlyDictionary_System_String_OpenQA_Selenium_CommandInfo__" data-uid="OpenQA.Selenium.WebDriver.RegisterCustomDriverCommands(System.Collections.Generic.IReadOnlyDictionary{System.String,OpenQA.Selenium.CommandInfo})">
RegisterCustomDriverCommands(IReadOnlyDictionary&lt;string, CommandInfo&gt;)
<a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/WebDriver.cs/#L475"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Registers a set of commands to be executed with this driver instance.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void RegisterCustomDriverCommands(IReadOnlyDictionary&lt;string, CommandInfo&gt; commands)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>commands</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlydictionary-2">IReadOnlyDictionary</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>, <a class="xref" href="OpenQA.Selenium.CommandInfo.html">CommandInfo</a>&gt;</dt>
<dd><p>An <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlydictionary-2">IReadOnlyDictionary&lt;TKey, TValue&gt;</a> where the keys are the names of the commands to register, and the values are the <a class="xref" href="OpenQA.Selenium.CommandInfo.html">CommandInfo</a> objects describing the commands.</p>
</dd>
</dl>
<a id="OpenQA_Selenium_WebDriver_RegisterInternalDriverCommand_" data-uid="OpenQA.Selenium.WebDriver.RegisterInternalDriverCommand*"></a>
<h3 id="OpenQA_Selenium_WebDriver_RegisterInternalDriverCommand_System_String_OpenQA_Selenium_CommandInfo_" data-uid="OpenQA.Selenium.WebDriver.RegisterInternalDriverCommand(System.String,OpenQA.Selenium.CommandInfo)">
RegisterInternalDriverCommand(string, CommandInfo?)
<a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/WebDriver.cs/#L676"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Registers a command to be executed with this driver instance as an internally known driver command.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">protected bool RegisterInternalDriverCommand(string commandName, CommandInfo? commandInfo)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>commandName</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>The unique name of the command to register.</p>
</dd>
<dt><code>commandInfo</code> <a class="xref" href="OpenQA.Selenium.CommandInfo.html">CommandInfo</a></dt>
<dd><p>The <a class="xref" href="OpenQA.Selenium.CommandInfo.html">CommandInfo</a> object describing the command.</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
<dd><p><a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">true</a> if the command was registered; otherwise, <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">false</a>.</p>
</dd>
</dl>
<a id="OpenQA_Selenium_WebDriver_RemoveAllCredentials_" data-uid="OpenQA.Selenium.WebDriver.RemoveAllCredentials*"></a>
<h3 id="OpenQA_Selenium_WebDriver_RemoveAllCredentials" data-uid="OpenQA.Selenium.WebDriver.RemoveAllCredentials">
RemoveAllCredentials()
<a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/WebDriver.cs/#L1127"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Removes all the credentials stored in the Virtual Authenticator.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void RemoveAllCredentials()</code></pre>
</div>
<h4 class="section">Exceptions</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.invalidoperationexception">InvalidOperationException</a></dt>
<dd><p>If a Virtual Authenticator has not been added yet.</p>
</dd>
</dl>
<a id="OpenQA_Selenium_WebDriver_RemoveCredential_" data-uid="OpenQA.Selenium.WebDriver.RemoveCredential*"></a>
<h3 id="OpenQA_Selenium_WebDriver_RemoveCredential_System_Byte___" data-uid="OpenQA.Selenium.WebDriver.RemoveCredential(System.Byte[])">
RemoveCredential(byte[])
<a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/WebDriver.cs/#L1096"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Removes the credential identified by the credentialId from the Virtual Authenticator.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void RemoveCredential(byte[] credentialId)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>credentialId</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.byte">byte</a>[]</dt>
<dd><p>The id as byte array that uniquely identifies a credential</p>
</dd>
</dl>
<h4 class="section">Exceptions</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentnullexception">ArgumentNullException</a></dt>
<dd><p>If <code class="paramref">credentialId</code> is <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null">null</a>.</p>
</dd>
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.invalidoperationexception">InvalidOperationException</a></dt>
<dd><p>If a Virtual Authenticator has not been added yet.</p>
</dd>
</dl>
<a id="OpenQA_Selenium_WebDriver_RemoveCredential_" data-uid="OpenQA.Selenium.WebDriver.RemoveCredential*"></a>
<h3 id="OpenQA_Selenium_WebDriver_RemoveCredential_System_String_" data-uid="OpenQA.Selenium.WebDriver.RemoveCredential(System.String)">
RemoveCredential(string)
<a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/WebDriver.cs/#L1107"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Removes the credential identified by the credentialId from the Virtual Authenticator.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void RemoveCredential(string credentialId)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>credentialId</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>The id as string that uniquely identifies a credential</p>
</dd>
</dl>
<h4 class="section">Exceptions</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentnullexception">ArgumentNullException</a></dt>
<dd><p>If <code class="paramref">credentialId</code> is <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null">null</a>.</p>
</dd>
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.invalidoperationexception">InvalidOperationException</a></dt>
<dd><p>If a Virtual Authenticator has not been added yet.</p>
</dd>
</dl>
<a id="OpenQA_Selenium_WebDriver_RemoveVirtualAuthenticator_" data-uid="OpenQA.Selenium.WebDriver.RemoveVirtualAuthenticator*"></a>
<h3 id="OpenQA_Selenium_WebDriver_RemoveVirtualAuthenticator_System_String_" data-uid="OpenQA.Selenium.WebDriver.RemoveVirtualAuthenticator(System.String)">
RemoveVirtualAuthenticator(string)
<a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/WebDriver.cs/#L1020"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Removes the Virtual Authenticator</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void RemoveVirtualAuthenticator(string authenticatorId)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>authenticatorId</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>Id as string that uniquely identifies a Virtual Authenticator.</p>
</dd>
</dl>
<h4 class="section">Exceptions</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentnullexception">ArgumentNullException</a></dt>
<dd><p>If <code class="paramref">authenticatorId</code> is <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null">null</a>.</p>
</dd>
</dl>
<a id="OpenQA_Selenium_WebDriver_ResetInputState_" data-uid="OpenQA.Selenium.WebDriver.ResetInputState*"></a>
<h3 id="OpenQA_Selenium_WebDriver_ResetInputState" data-uid="OpenQA.Selenium.WebDriver.ResetInputState">
ResetInputState()
<a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/WebDriver.cs/#L406"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Resets the input state of the action executor.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void ResetInputState()</code></pre>
</div>
<a id="OpenQA_Selenium_WebDriver_SetUserVerified_" data-uid="OpenQA.Selenium.WebDriver.SetUserVerified*"></a>
<h3 id="OpenQA_Selenium_WebDriver_SetUserVerified_System_Boolean_" data-uid="OpenQA.Selenium.WebDriver.SetUserVerified(System.Boolean)">
SetUserVerified(bool)
<a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/WebDriver.cs/#L1141"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Sets the isUserVerified property for the Virtual Authenticator.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void SetUserVerified(bool verified)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>verified</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
<dd><p>The boolean value representing value to be set</p>
</dd>
</dl>
<a id="OpenQA_Selenium_WebDriver_StartSession_" data-uid="OpenQA.Selenium.WebDriver.StartSession*"></a>
<h3 id="OpenQA_Selenium_WebDriver_StartSession_OpenQA_Selenium_ICapabilities_" data-uid="OpenQA.Selenium.WebDriver.StartSession(OpenQA.Selenium.ICapabilities)">
StartSession(ICapabilities)
<a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/WebDriver.cs/#L599"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Starts a session with the driver</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">protected void StartSession(ICapabilities capabilities)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>capabilities</code> <a class="xref" href="OpenQA.Selenium.ICapabilities.html">ICapabilities</a></dt>
<dd><p>Capabilities of the browser</p>
</dd>
</dl>
<a id="OpenQA_Selenium_WebDriver_SwitchTo_" data-uid="OpenQA.Selenium.WebDriver.SwitchTo*"></a>
<h3 id="OpenQA_Selenium_WebDriver_SwitchTo" data-uid="OpenQA.Selenium.WebDriver.SwitchTo">
SwitchTo()
<a class="header-action link-secondary" title="View source" href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/WebDriver.cs/#L429"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Method to give you access to switch frames and windows</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public ITargetLocator SwitchTo()</code></pre>
</div>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="OpenQA.Selenium.ITargetLocator.html">ITargetLocator</a></dt>
<dd><p>Returns an Object that allows you to Switch Frames and Windows</p>
</dd>
</dl>
<h4 class="section" id="OpenQA_Selenium_WebDriver_SwitchTo_examples">Examples</h4>
<pre><code class="lang-csharp">IWebDriver driver = new InternetExplorerDriver();
driver.SwitchTo().Frame("FrameName");</code></pre>
</article>
<div class="contribution d-print-none">
<a href="https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/WebDriver.cs/#L36" class="edit-link">Edit this page</a>
</div>
</div>
<div class="affix">
<nav id="affix"></nav>
</div>
</main>
<div class="container-xxl search-results" id="search-results"></div>
<footer class="border-top text-secondary">
<div class="container-xxl">
<div class="flex-fill">
<span>Made with <a href="https://dotnet.github.io/docfx">docfx</a></span>
</div>
</div>
</footer>
</body>
</html>