diff --git a/.build.ps1 b/.build.ps1 new file mode 100644 index 0000000..f065cfa --- /dev/null +++ b/.build.ps1 @@ -0,0 +1,58 @@ +Task 'Build' Selenium, { } + +Task 'Selenium' { + if (Test-Path ./src/lib) { + Remove-Item -Path ./src/lib -Force -Recurse -ErrorAction Stop | Out-Null + } + + if (Test-Path ./temp) { + Remove-Item -Path ./temp -Force -Recurse -ErrorAction Stop | Out-Null + } + + $packages = @{ + 'Selenium.WebDriver' = '3.141.0' + 'Selenium.Support' = '3.141.0' + 'Selenium.WebDriver.ChromeDriver' = '77.0.3865.4000' + 'Selenium.WebDriver.IEDriver' = '3.150.0' + 'Selenium.WebDriver.GeckoDriver' = '0.26.0' + } + + $packages.Keys | ForEach-Object { + nuget install $_ -source nuget.org -version $packages[$_] -outputdirectory ./temp | Out-Null + } + + # web drivers + New-Item -Path ./src/lib/WebDriver -ItemType Directory -Force | Out-Null + + Copy-Item -Path "./temp/Selenium.WebDriver.$($packages['Selenium.WebDriver'])/lib/*" -Destination ./src/lib/WebDriver -Recurse -Force | Out-Null + Copy-Item -Path "./temp/Selenium.Support.$($packages['Selenium.Support'])/lib/*" -Destination ./src/lib/WebDriver -Recurse -Force | Out-Null + + Remove-Item -Path ./src/lib/WebDriver/net20 -Force -Recurse -ErrorAction Ignore | Out-Null + Remove-Item -Path ./src/lib/WebDriver/net35 -Force -Recurse -ErrorAction Ignore | Out-Null + Remove-Item -Path ./src/lib/WebDriver/net40 -Force -Recurse -ErrorAction Ignore | Out-Null + + # browsers + New-Item -Path ./src/lib/Browsers -ItemType Directory -Force | Out-Null + New-Item -Path ./src/lib/Browsers/win -ItemType Directory -Force | Out-Null + New-Item -Path ./src/lib/Browsers/linux -ItemType Directory -Force | Out-Null + New-Item -Path ./src/lib/Browsers/mac -ItemType Directory -Force | Out-Null + + # win + "./temp/Selenium.WebDriver.IEDriver.$($packages['Selenium.WebDriver.IEDriver'])/driver/*" | Out-Default + Copy-Item -Path "./temp/Selenium.WebDriver.IEDriver.$($packages['Selenium.WebDriver.IEDriver'])/driver/*" -Destination ./src/lib/Browsers/win/ -Recurse -Force | Out-Null + Copy-Item -Path "./temp/Selenium.WebDriver.GeckoDriver.$($packages['Selenium.WebDriver.GeckoDriver'])/driver/win64/*" -Destination ./src/lib/Browsers/win/ -Recurse -Force | Out-Null + Copy-Item -Path "./temp/Selenium.WebDriver.ChromeDriver.$($packages['Selenium.WebDriver.ChromeDriver'])/driver/win32/*" -Destination ./src/lib/Browsers/win/ -Recurse -Force | Out-Null + + # linux + Copy-Item -Path "./temp/Selenium.WebDriver.GeckoDriver.$($packages['Selenium.WebDriver.GeckoDriver'])/driver/linux64/*" -Destination ./src/lib/Browsers/linux/ -Recurse -Force | Out-Null + Copy-Item -Path "./temp/Selenium.WebDriver.ChromeDriver.$($packages['Selenium.WebDriver.ChromeDriver'])/driver/linux64/*" -Destination ./src/lib/Browsers/linux/ -Recurse -Force | Out-Null + + # mac + Copy-Item -Path "./temp/Selenium.WebDriver.GeckoDriver.$($packages['Selenium.WebDriver.GeckoDriver'])/driver/mac64/*" -Destination ./src/lib/Browsers/mac/ -Recurse -Force | Out-Null + Copy-Item -Path "./temp/Selenium.WebDriver.ChromeDriver.$($packages['Selenium.WebDriver.ChromeDriver'])/driver/mac64/*" -Destination ./src/lib/Browsers/mac/ -Recurse -Force | Out-Null + + # clean up temp + if (Test-Path ./temp) { + Remove-Item -Path ./temp -Force -Recurse | Out-Null + } +} \ No newline at end of file diff --git a/.gitignore b/.gitignore index f797aa8..05201dd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ Tests/ -examples/*.jpg \ No newline at end of file +examples/*.jpg +temp/ \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..93c9800 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,31 @@ +FROM mcr.microsoft.com/powershell:6.2.3-ubuntu-16.04 +LABEL maintainer="Matthew Kelly (Badgerati)" + +# update +RUN apt-get update -y +RUN apt-get install -y unzip curl wget + +# install chrome +RUN apt-get install -y libappindicator1 fonts-liberation +RUN curl https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb -o /chrome.deb +RUN dpkg -i /chrome.deb; apt-get -fy install +RUN rm /chrome.deb +RUN google-chrome-stable --no-sandbox --headless --disable-gpu --dump-dom https://www.chromestatus.com/ + +# install firefox +RUN apt-get install -y firefox + +# copy over monocle +RUN mkdir -p /usr/local/share/powershell/Modules/Monocle +COPY ./src/ /usr/local/share/powershell/Modules/Monocle + +# state that monocle should be headless +RUN export DISPLAY=:99 +ENV MONOCLE_HEADLESS '1' + +# set as executable on drivers +RUN chown root:root /usr/local/share/powershell/Modules/Monocle/lib/Browsers/linux/chromedriver +RUN chmod +x /usr/local/share/powershell/Modules/Monocle/lib/Browsers/linux/chromedriver + +RUN chown root:root /usr/local/share/powershell/Modules/Monocle/lib/Browsers/linux/geckodriver +RUN chmod +x /usr/local/share/powershell/Modules/Monocle/lib/Browsers/linux/geckodriver \ No newline at end of file diff --git a/README.md b/README.md index 84c9398..977ab02 100644 --- a/README.md +++ b/README.md @@ -3,150 +3,137 @@ [![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/Badgerati/Monocle/master/LICENSE.txt) [![PowerShell](https://img.shields.io/powershellgallery/dt/monocle.svg?label=PowerShell&colorB=085298)](https://www.powershellgallery.com/packages/Monocle) -Monocle is a PowerShell Web Automation module, made to make automating and testing websites easier. +Monocle is a Cross-Platform PowerShell Web Automation module, made to make automating and testing websites easier. It's a PowerShell wrapper around Selenium, with the aim of abstracting Selenium away from the user. + +* [Install](#install) +* [Example](#example) +* [Documentation](#documentation) + * [Functions](#functions) + * [Screenshots](#screenshots) + * [Waiting](#waiting) + * [Docker](#docker) + +Monocle currently supports the following browsers: + +* IE +* Google Chrome +* Firefox ## Install ```powershell Install-Module -Name Monocle -Import-Module -Name Monocle ``` ## Example ```powershell -# if you didn't install globally, then import like so: -$root = Split-Path -Path (Split-Path -Path $MyInvocation.MyCommand.Path) -Import-Module "$root\Monocle.psm1" -DisableNameChecking -ErrorAction Stop - -# if you did import globally: Import-Module Monocle +# create a browser +$browser = New-MonocleBrowser -Type Chrome + # Monocle runs commands in web flows, for easy disposal and test tracking -# Each browser needs a name -Start-MonocleFlow -Name 'Load YouTube' -ScriptBlock { +Start-MonocleFlow -Name 'Load YouTube' -Browser $browser -ScriptBlock { - # Tell the browser which URL to navigate to, will sleep while page is loading + # tell the browser which URL to navigate to, will wait for the page to load Set-MonocleUrl -Url 'https://www.youtube.com' - # Sets the search bar element to the passed value to query + # sets the element's value, selecting the element by ID/Name Set-MonocleElementValue -Id 'search_query' -Value 'Beerus Madness (Extended)' - # Tells the browser to click the search button + # click the search button Invoke-MonocleElementClick -Id 'search-btn' - # Though all commands sleep when the page is busy, some buttons use javascript - # to reform the page. The following will sleep the browser until the passed URL is loaded. - # If (default) 10 seconds passes and no URL, then the flow fails + # wait for the URL to change to start with the following value Wait-MonocleUrl -Url 'https://www.youtube.com/results?search_query=' -StartsWith - # Downloads an image from the page. This time it's using something called MPath (Monocle Path). - # It's very similar to XPath, and allows you to pin-point elements more easily - Save-MonocleImage -MPath 'div[@data-context-item-id=SI6Yyr-iI6M]/img[0]' -Path '.\beerus.jpg' + # downloads an image from the page, selcted by using an XPath to an element + Save-MonocleImage -XPath "//div[@data-context-item-id='SI6Yyr-iI6M']/img[1]" -Path '.\beerus.jpg' - # Tells the browser to click the video in the results. The video link is found via MPath - Invoke-MonocleElementClick -MPath 'a[@title=Dragon Ball Super Soundtrack - Beerus Madness (Extended) - Duration: 10:00.]' + # tells the browser to click the video in the results + Invoke-MonocleElementClick -XPath "//a[@title='Dragon Ball Super Soundtrack - Beerus Madness (Extended)']" - # Again, we expect the URL to be loaded + # wait for the URL to be loaded Wait-MonocleUrl -Url 'https://www.youtube.com/watch?v=SI6Yyr-iI6M' -} -Visible -ScreenshotOnFail +} + +# dispose the browser +Close-MonocleBrowser -Browser $browser ``` ## Documentation ### Functions -The following is a list of available functions in Monocle. These can be used, after calling `Import-Module -Name Monocle`. +The following is a list of available functions in Monocle: +* Assert-MonocleBodyValue +* Assert-MonocleElementValue +* Close-MonocleBrowser +* Edit-MonocleUrl +* Get-MonocleElementValue +* Get-MonocleHtml +* Get-MonocleUrl * Invoke-MonocleElementCheck * Invoke-MonocleElementClick +* Invoke-MonocleRetryScript +* Invoke-MonocleScreenshot +* New-MonocleBrowser +* Restart-MonocleBrowser * Save-MonocleImage -* Wait-MonocleElement -* Wait-MonocleUrl -* Wait-MonocleValue -* Get-MonocleElementValue -* Start-MonocleFlow -* Edit-MonocleUrl -* Set-MonocleUrl -* Invoke-MonocoleScreenshot * Set-MonocleElementValue +* Set-MonocleUrl +* Start-MonocleFlow * Start-MonocleSleep -* Restart-MonocleBrowser -* Get-MonocleUrl +* Submit-MonocleForm * Test-MonocleElement +* Wait-MonocleElement +* Wait-MonocleUrl +* Wait-MonocleUrlDifferent +* Wait-MonocleValue -The following is a list of assertions available in Monocle: +### Screenshots -* Assert-MonocleBodyValue -* Assert-MonocleElementValue +There are two main ways to take a screenshot of the browser. The first it to tell Monocle to automatically take a screenshot whenever a flow fails. You can do this by using the `-ScreenshotPath` and `-ScreenshotOnFail` parameters on the `Start-MonocleFlow` function: -### MPath - -MPath, or Monocle Path, is very similar to XPath and allows you to pin-point elements more easily. -You find elements initially by tag, and then optionally by zero-based index or attribute. - -For example, take the following HTML: - -```html - - - Example - - -
- - - - -
- - +```powershell +Start-MonocleFlow -Name '' -Browser $browser -ScriptBlock { + # failing logic +} -ScreenshotPath './path' -ScreenshotOnFail ``` -Here we have a very basic form with 3 textual inputs and a submit button. - -Let's say we want to update the value of the first textual input, the one with an ID of `SomeInput`. The MPath to select this element would be: +Or, you can take a screenshot directly: -```plain -form/input[@id=SomeInput] +```powershell +Invoke-MonocoleScreenshot -Name 'screenshot.png' -Path './path' ``` -In MPath, each query for an element is split by a slash (/). Each query starts with a tag name (form or input), followed optionally by square-brackets and a filter ([@id=SomeInput]). -Splitting down on the above MPath, Monocle will first find all `form` elements on the page. Then, it will find all input elements within those forms that have an `id` of `SomeInput`. - -We can also simplify the above MPath to merely just: +> Not supplying `-ScreenshotPath` or `-Path` will default to the current path. -```plain -input[@id=SomeInput] -``` +### Waiting -Since Monocle only interacts with single elements, then once all queries have run the top first 1 element from the whole MPath is returned. +There are inbuilt function to wait for a URL or element. However, to wait for an element during a Set/Click call you can use the `-Wait` switch: -Let's now say we only want to update the value of the third textual input. Well, this one doesn't have an identifiers, so the MPath looks as follows: - -```plain -form/input[2] +```powershell +Invoke-MonocleElementClick -Id 'element-id' -Wait ``` -MPath is zero-based, so `input[2]` will select the third element in the form. Note, if you have two forms on your page, either use `form[0]` or `form[1]` else `input[2]` will literally return the third input in total. -If we just left the above as `form/input` then the input with ID of SomeInput will have been returned. +### Docker -A more complex way of selecting the third input will be as follows: +Monocle has an offical Docker image, which comes preloaded with: -```plain -form/input[@data-type=test][1] -``` - -Now, we will select the two inputs that have their `data-type` set to `test`, and then we will select the second of these inputs. +* Monocle (obviously!) +* Firefox +* Google Chrome -## FAQ +You can use this image to run your Monocle flows - and they will also automatically run headless. -* I keep receiving the error: +An example `Dockerfile` could be: - ```plain - Creating an instance of the COM component with CLSID {0002DF01-0000-0000-C000-000000000046} from the IClassFactory - failed due to the following error: 800704a6 A system shutdown has already been scheduled. (Exception from HRESULT: 0x800704A6). - ``` - - Solution: Open IE, open setting the Compatability Viewing. Uncheck the two check boxes. +```dockerfile +FROM badgerati/monocle:latest +COPY . /usr/src/scripts +CMD [ "pwsh", "-c", "cd /usr/src/scripts; ./flow.ps1" ] +``` diff --git a/examples/Dockerfile b/examples/Dockerfile new file mode 100644 index 0000000..cd55661 --- /dev/null +++ b/examples/Dockerfile @@ -0,0 +1,3 @@ +FROM badgerati/monocle:latest +COPY . /usr/src/scripts +CMD [ "pwsh", "-c", "cd /usr/src/scripts; ./youtube.ps1" ] \ No newline at end of file diff --git a/examples/youtube.ps1 b/examples/youtube.ps1 index b173fe3..40a7b67 100644 --- a/examples/youtube.ps1 +++ b/examples/youtube.ps1 @@ -1,10 +1,14 @@ -$path = Split-Path -Parent -Path (Split-Path -Parent -Path $MyInvocation.MyCommand.Path) -$path = "$($path)/src/Monocle.psm1" -Import-Module $path -Force -ErrorAction Stop +#$path = Split-Path -Parent -Path (Split-Path -Parent -Path $MyInvocation.MyCommand.Path) +#$path = "$($path)/src/Monocle.psm1" +#Import-Module $path -Force -ErrorAction Stop +Import-Module -Name Monocle -Force -ErrorAction Stop + +# Create a browser object +$browser = New-MonocleBrowser -Type Chrome # Monocle runs commands in web flows, for easy disposal and test tracking # Each flow needs a name -Start-MonocleFlow -Name 'Load YouTube' -ScriptBlock { +Start-MonocleFlow -Name 'Load YouTube' -Browser $browser -ScriptBlock { # Tell the browser which URL to navigate to, will sleep while page is loading Set-MonocleUrl -Url 'https://www.youtube.com' @@ -13,21 +17,23 @@ Start-MonocleFlow -Name 'Load YouTube' -ScriptBlock { Set-MonocleElementValue -Id 'search_query' -Value 'Beerus Madness (Extended)' # Tells the browser to click the search button - Invoke-MonocleElementClick -Id 'search-btn' + Invoke-MonocleElementClick -Id 'search-icon-legacy' # Though all commands sleep when the page is busy, some buttons use javascript # to reform the page. The following will sleep the browser until the passed URL is loaded. # If (default) 10 seconds passes and no URL, then the flow fails Wait-MonocleUrl -Url 'https://www.youtube.com/results?search_query=' -StartsWith - # Downloads an image from the page. This time it's using something called MPath (Monocle Path). - # It's very similar to XPath, and allows you to pin-point elements more easily - Save-MonocleImage -MPath 'div[@data-context-item-id=SI6Yyr-iI6M]/img[0]' -Path '.\beerus.jpg' + # Downloads an image from the page. This time it's using XPath + #Save-MonocleImage -XPath "//div[@data-context-item-id='SI6Yyr-iI6M']/img[1]" -Path '.\beerus.jpg' - # Tells the browser to click the video in the results. The video link is found via MPath - Invoke-MonocleElementClick -MPath 'a[@title=Dragon Ball Super Soundtrack - Beerus Madness (Extended) - Duration: 10:00.]' + # Tells the browser to click the video in the results. The video link is found via XPath + Invoke-MonocleElementClick -XPath "//a[@title='Dragon Ball Super Soundtrack - Beerus Madness (Extended)']" -Wait # Again, we expect the URL to be loaded Wait-MonocleUrl -Url 'https://www.youtube.com/watch?v=SI6Yyr-iI6M' -} -Visible -ScreenshotOnFail \ No newline at end of file +} -CloseBrowser -ScreenshotOnFail + +# or close the browser manually: +#Close-MonocleBrowser -Browser $browser \ No newline at end of file diff --git a/src/Monocle.psd1 b/src/Monocle.psd1 index 0f81047..ec8d034 100644 --- a/src/Monocle.psd1 +++ b/src/Monocle.psd1 @@ -11,7 +11,7 @@ RootModule = 'Monocle.psm1' # Version number of this module. - ModuleVersion = '0.13.0' + ModuleVersion = '1.0.0' # ID used to uniquely identify this module GUID = '9dc3c8a1-664d-4253-a5d2-920250d3a15f' @@ -33,7 +33,8 @@ PSData = @{ # Tags applied to this module. These help with module discovery in online galleries. - Tags = @('powershell', 'web', 'automation', 'testing', 'ie', 'internet-explorer', 'websites') + Tags = @('powershell', 'web', 'automation', 'testing', 'ie', 'internet-explorer', 'websites', 'chrome', + 'firefox', 'selenium', 'cross-platform', 'PSEdition_Core', 'PSEdition_Desktop', 'linux', 'google-chrome') # A URL to the license for this module. LicenseUri = 'https://raw.githubusercontent.com/Badgerati/Monocle/master/LICENSE.txt' diff --git a/src/Monocle.psm1 b/src/Monocle.psm1 index 19ee42c..3b3ed12 100644 --- a/src/Monocle.psm1 +++ b/src/Monocle.psm1 @@ -1,10 +1,25 @@ +$ProgressPreference = 'SilentlyContinue' + # root path to module $root = Split-Path -Parent -Path $MyInvocation.MyCommand.Path -# get the path to the libraries and load them +# get the path to the drivers and load them $libraries = Join-Path $root 'lib' -$library = Join-Path $libraries 'Microsoft.mshtml.dll' -[System.Reflection.Assembly]::LoadFrom($library) | Out-Null +$path = Join-Path $libraries 'WebDriver' + +switch ($PSEdition.ToLowerInvariant()) { + 'core' { + $path = Join-Path $path 'netstandard2.0' + } + + default { + $path = Join-Path $path 'net45' + } +} + +Get-ChildItem -Path $path -Filter '*.dll' -File -Force | ForEach-Object { + Add-Type -Path $_.FullName | Out-Null +} # load private functions Get-ChildItem "$($root)/Private/*.ps1" | Resolve-Path | ForEach-Object { . $_ } diff --git a/src/Private/Browsers.ps1 b/src/Private/Browsers.ps1 new file mode 100644 index 0000000..b31e67e --- /dev/null +++ b/src/Private/Browsers.ps1 @@ -0,0 +1,178 @@ +function Get-MonocleBrowserPath +{ + $root = (Split-Path -Parent -Path $PSScriptRoot) + $root = (Join-Path $root 'lib') + $root = (Join-Path $root 'Browsers') + + $os = 'win' + $chmod = $false + + if ($IsLinux) { + $os = 'linux' + $chmod = $true + } + elseif ($IsMacOS) { + $os = 'mac' + $chmod = $true + } + + $path = (Join-Path $root $os) + + if ($chmod) { + Get-ChildItem -Path $path -Force -File | ForEach-Object { + chmod +x $_.FullName | Out-Null + } + } + + return $path +} + +function Initialize-MonocleBrowser +{ + param( + [Parameter()] + [string] + $Type, + + [Parameter()] + [string[]] + $Arguments, + + [switch] + $Hide + ) + + if ([string]::IsNullOrWhiteSpace($Type)) { + $Type = 'IE' + if ($IsLinux -or $IsMacOS) { + $Type = 'Chrome' + } + } + + switch ($Type.ToLowerInvariant()) { + 'ie' { + return Initialize-MonocleIEBrowser -Arguments $Arguments -Hide:$Hide + } + + 'chrome' { + return Initialize-MonocleChromeBrowser -Arguments $Arguments -Hide:$Hide + } + + 'firefox' { + return Initialize-MonocleFirefoxBrowser -Arguments $Arguments -Hide:$Hide + } + + default { + throw "No browser for $($Type)" + } + } +} + +function Initialize-MonocleIEBrowser +{ + param( + [Parameter()] + [string[]] + $Arguments, + + [switch] + $Hide + ) + + $options = [OpenQA.Selenium.IE.InternetExplorerOptions]::new() + if ($null -eq $Arguments) { + $Arguments = @() + } + + $options.RequireWindowFocus = $false + $options.IgnoreZoomLevel = $true + + # add arguments + $Arguments | Sort-Object -Unique | ForEach-Object { + $options.AddArguments($_.TrimStart('-')) + } + + # create the browser + $service = [OpenQA.Selenium.IE.InternetExplorerDriverService]::CreateDefaultService((Get-MonocleBrowserPath)) + $service.HideCommandPromptWindow = $true + $service.SuppressInitialDiagnosticInformation = $true + + return [OpenQA.Selenium.IE.InternetExplorerDriver]::new($service, $options) +} + +function Initialize-MonocleChromeBrowser +{ + param( + [Parameter()] + [string[]] + $Arguments, + + [switch] + $Hide + ) + + $options = [OpenQA.Selenium.Chrome.ChromeOptions]::new() + if ($null -eq $Arguments) { + $Arguments = @() + } + + # needed to prevent general issues + $Arguments += 'no-first-run' + $Arguments += 'no-default-browser-check' + $Arguments += 'disable-default-apps' + + # these are needed to allow running in a container + $Arguments += 'no-sandbox' + $Arguments += 'disable-dev-shm-usage' + + # hide the browser? + if ($Hide -or ($env:MONOCLE_HEADLESS -ieq '1')) { + $Arguments += 'headless' + } + + # add arguments + $Arguments | Sort-Object -Unique | ForEach-Object { + $options.AddArguments($_.TrimStart('-')) + } + + # create the browser + $service = [OpenQA.Selenium.Chrome.ChromeDriverService]::CreateDefaultService((Get-MonocleBrowserPath)) + $service.HideCommandPromptWindow = $true + $service.SuppressInitialDiagnosticInformation = $true + + return [OpenQA.Selenium.Chrome.ChromeDriver]::new($service, $options) +} + +function Initialize-MonocleFirefoxBrowser +{ + param( + [Parameter()] + [string[]] + $Arguments, + + [switch] + $Hide + ) + + $options = [OpenQA.Selenium.Firefox.FirefoxOptions]::new() + if ($null -eq $Arguments) { + $Arguments = @() + } + + # hide the browser? + if ($Hide -or ($env:MONOCLE_HEADLESS -ieq '1')) { + $Arguments += 'headless' + } + + # add arguments + $Arguments | Sort-Object -Unique | ForEach-Object { + $options.AddArguments("-$($_.TrimStart('-'))") + } + + # create the browser + $service = [OpenQA.Selenium.Firefox.FirefoxDriverService]::CreateDefaultService((Get-MonocleBrowserPath)) + $service.HideCommandPromptWindow = $true + $service.SuppressInitialDiagnosticInformation = $true + + return [OpenQA.Selenium.Firefox.FirefoxDriver]::new($service, $options, [timespan]::FromSeconds(60)) +} \ No newline at end of file diff --git a/src/Private/Elements.ps1 b/src/Private/Elements.ps1 index fd858c6..929fe5e 100644 --- a/src/Private/Elements.ps1 +++ b/src/Private/Elements.ps1 @@ -1,20 +1,9 @@ -function Test-MonocleElementNull -{ - [CmdletBinding()] - param ( - [Parameter()] - $Element - ) - - return (($null -eq $Element) -or ($Element -eq [System.DBNull]::Value)) -} - function Get-MonocleElement { [CmdletBinding()] param ( [Parameter(Mandatory=$true)] - [ValidateSet('Id', 'Tag', 'MPath')] + [ValidateSet('Id', 'Tag', 'XPath')] [string] $FilterType, @@ -40,28 +29,54 @@ function Get-MonocleElement [Parameter()] [string] - $MPath, + $XPath, + + [Parameter()] + [int] + $Timeout, [switch] - $NoThrow + $NoThrow, + + [switch] + $Wait ) - switch ($FilterType.ToLowerInvariant()) { - 'id' { - return (Get-MonocleElementById -Id $Id -NoThrow:$NoThrow) - } + if ($Timeout -le 0) { + $Timeout = 10 + } - 'tag' { - if ([string]::IsNullOrWhiteSpace($AttributeName)) { - return (Get-MonocleElementByTagName -TagName $TagName -ElementValue $ElementValue -NoThrow:$NoThrow) - } - else { - return (Get-MonocleElementByTagName -TagName $TagName -AttributeName $AttributeName -AttributeValue $AttributeValue -ElementValue $ElementValue -NoThrow:$NoThrow) + $seconds = 0 + + while ($true) { + try { + switch ($FilterType.ToLowerInvariant()) { + 'id' { + return (Get-MonocleElementById -Id $Id -NoThrow:$NoThrow) + } + + 'tag' { + if ([string]::IsNullOrWhiteSpace($AttributeName)) { + return (Get-MonocleElementByTagName -TagName $TagName -ElementValue $ElementValue -NoThrow:$NoThrow) + } + else { + return (Get-MonocleElementByTagName -TagName $TagName -AttributeName $AttributeName -AttributeValue $AttributeValue -ElementValue $ElementValue -NoThrow:$NoThrow) + } + } + + 'xpath' { + return (Get-MonocleElementByXPath -XPath $XPath -NoThrow:$NoThrow) + } } } + catch { + $seconds++ - 'mpath' { - return (Get-MonocleElementByMPath -MPath $MPath -NoThrow:$NoThrow) + if (!$Wait -or ($seconds -ge $Timeout)) { + throw $_.Exception + } + + Start-Sleep -Seconds 1 } } } @@ -78,19 +93,17 @@ function Get-MonocleElementById $NoThrow ) - $document = $Browser.Document - Write-Verbose -Message "Finding element with identifier '$Id'" - $element = $document.IHTMLDocument3_getElementById($Id) + $element = $Browser.FindElementsById($Id) | Select-Object -First 1 # if no element by ID, try by first named element - if (Test-MonocleElementNull -Element $element) { + if ($null -eq $element) { Write-Verbose -Message "Finding element with name '$Id'" - $element = $document.IHTMLDocument3_getElementsByName($Id) | Select-Object -First 1 + $element = $Browser.FindElementsByName($Id) | Select-Object -First 1 } # throw error if can't find element - if ((Test-MonocleElementNull -Element $element) -and !$NoThrow) { + if (($null -eq $element) -and !$NoThrow) { throw "Element with ID/Name of '$Id' not found" } @@ -124,11 +137,11 @@ function Get-MonocleElementByTagName $NoThrow ) - $document = $Browser.Document + #$document = $Browser.Document # get all elements for the tag Write-Verbose -Message "Finding element with tag <$TagName>" - $elements = $document.IHTMLDocument3_getElementsByTagName($TagName) + $elements = $Browser.FindElementsByTagName($TagName) $id = $TagName.ToLowerInvariant() # if we have attribute info, attempt to get an element @@ -138,8 +151,9 @@ function Get-MonocleElementByTagName $found = $false $justFirst = [string]::IsNullOrWhiteSpace($ElementValue) + # find elements with the correct attribue name/value $elements = @(foreach ($element in $elements) { - if ($element.getAttribute($AttributeName) -inotmatch $AttributeValue) { + if ($element.GetAttribute($AttributeName) -inotmatch $AttributeValue) { continue } @@ -152,7 +166,7 @@ function Get-MonocleElementByTagName }) # throw error if can't find element - if ((Test-MonocleElementNull -Element ($elements | Select-Object -First 1)) -and !$NoThrow) { + if (($null -eq ($elements | Select-Object -First 1)) -and !$NoThrow) { throw "Element <$TagName> with attribute '$AttributeName' and value of '$AttributeValue' not found" } @@ -164,17 +178,11 @@ function Get-MonocleElementByTagName Write-Verbose -Message "Filtering $($elements.Length) elements with tag <$TagName>, and value '$ElementValue'" $element = $elements | - Where-Object { $_.value -imatch $ElementValue } + Where-Object { $_.Text -imatch $ElementValue } Select-Object -First 1 - if (Test-MonocleElementNull -Element $element) { - $element = $elements | - Where-Object { $_.innerHTML -imatch $ElementValue } - Select-Object -First 1 - } - # throw error if can't find element - if ((Test-MonocleElementNull -Element $element) -and !$noThrow) { + if (($null -eq $element) -and !$noThrow) { throw "Element <$TagName> with value of '$ElementValue' not found" } @@ -190,27 +198,28 @@ function Get-MonocleElementByTagName } } -function Get-MonocleElementByMPath +function Get-MonocleElementByXPath { [CmdletBinding()] param ( [Parameter(Mandatory=$true)] [string] - $MPath, + $XPath, [switch] $NoThrow ) - $element = Resolve-MonocleMPath -MPath $MPath + Write-Verbose -Message "Finding element with XPath '$XPath'" + $element = @($Browser.FindElementsByXPath($XPath)) | Select-Object -First 1 # throw error if can't find element - if ((Test-MonocleElementNull -Element $element) -and !$NoThrow) { - throw "Cannot find any element based on the MPath supplied: $MPath" + if (($null -eq $element) -and !$NoThrow) { + throw "Element with XPath of '$XPath' not found" } return @{ Element = $element - Id = "<$($MPath)>" + Id = "<$($XPath)>" } } \ No newline at end of file diff --git a/src/Private/MPath.ps1 b/src/Private/MPath.ps1 deleted file mode 100644 index 393cf59..0000000 --- a/src/Private/MPath.ps1 +++ /dev/null @@ -1,127 +0,0 @@ -function Resolve-MonocleMPathExpression -{ - [CmdletBinding()] - param ( - [Parameter(Mandatory=$true)] - $Expression, - - [Parameter(Mandatory=$true, ParameterSetName='Document')] - $Document, - - [Parameter(Mandatory=$true, ParameterSetName='Elements')] - $Elements - ) - - # Regex to match an individual mpath expression - $regex = '^(?[a-zA-Z]+)(?\[(?\@[a-zA-Z\-]+|\d+)((?(\!){0,1}(\=|\~))(?.+?)){0,1}\](\[(?\d+)\]){0,1}){0,1}$' - $foundElements = $null - - # ensure the expression is valid against the regex - if ($Expression -match $regex) - { - $tag = $Matches['tag'] - - # find initial elements based on the tag from document or previously found elements - if ($PSCmdlet.ParameterSetName -ieq 'Document') { - $foundElements = $Document.IHTMLDocument3_getElementsByTagName($tag) - } - else { - $foundElements = ($Elements | ForEach-Object { $_.getElementsByTagName($tag) }) - } - - # if there's a filter, then filter down the found elements above - if (![string]::IsNullOrWhiteSpace($Matches['filter'])) - { - $attr = $Matches['attr'] - $opr = $Matches['opr'] - $value = $Matches['value'] - $index = $Matches['index'] - - # filtering by attributes starts with an '@', else we have an index into the elements - if ($attr.StartsWith('@')) - { - $attr = $attr.Trim('@') - - # if there's no operator, then use all elements that have a non-empty attribute - if ([string]::IsNullOrWhiteSpace($opr)) { - $foundElements = $foundElements | Where-Object { ![string]::IsNullOrWhiteSpace($_.getAttribute($attr)) } - } - else - { - # find elements based on validaity of attribute to passed value - switch ($opr) - { - '=' { - $foundElements = $foundElements | Where-Object { $_.getAttribute($attr) -ieq $value } - } - - '~' { - $foundElements = $foundElements | Where-Object { $_.getAttribute($attr) -imatch $value } - } - - '!=' { - $foundElements = $foundElements | Where-Object { $_.getAttribute($attr) -ine $value } - } - - '!~' { - $foundElements = $foundElements | Where-Object { $_.getAttribute($attr) -inotmatch $value } - } - } - } - - # select a element from the filtered elements based on index (could sometimes happen) - if (![string]::IsNullOrWhiteSpace($index)) { - $foundElements = $foundElements | Select-Object -Skip ([int]$index) -First 1 - } - } - else { - # select the element based on index of found elements - $foundElements = $foundElements | Select-Object -Skip ([int]$attr) -First 1 - } - } - } - else { - throw "MPath expression is not valid: $Expression" - } - - if (($foundElements | Measure-Object).Count -eq 0) { - return $null - } - - return $foundElements -} - -function Resolve-MonocleMPath -{ - [CmdletBinding()] - param ( - [Parameter(Mandatory=$true)] - [string] - $MPath - ) - - # split into multiple expressions - $exprs = $MPath -split '/' - - # if there are no expression, return null - if (($null -eq $exprs) -or ($exprs.length -eq 0)) { - return [System.DBNull]::Value - } - - # find initial elements based on the document and first expression - $elements = Resolve-MonocleMPathExpression -Expression $exprs[0] -Document $Browser.Document - if (($elements | Measure-Object).Count -eq 0) { - return $null - } - - # find rest of elements from the previous elements found above - for ($i = 1; $i -lt $exprs.length; $i++) { - $elements = Resolve-MonocleMPathExpression -Expression $exprs[$i] -Elements $elements - if (($elements | Measure-Object).Count -eq 0) { - return $null - } - } - - # Monocle only deals with single elements, so return the first - return ($elements | Select-Object -First 1) -} \ No newline at end of file diff --git a/src/Private/Tools.ps1 b/src/Private/Tools.ps1 index 8813636..358b56c 100644 --- a/src/Private/Tools.ps1 +++ b/src/Private/Tools.ps1 @@ -4,9 +4,9 @@ function Start-MonocleSleepWhileBusy param () $count = 0 - $timeout = 30 + $timeout = $Browser.Manage().Timeouts().PageLoad - while ($Browser.Busy) + while ($Browser.ExecuteScript('return document.readyState') -ine 'complete') { if ($count -ge $timeout) { throw "Loading URL has timed-out after $timeout second(s)" @@ -151,41 +151,4 @@ function Test-MonocleUrl } return $code -} - -function Set-MonocleBrowserFocus -{ - [CmdletBinding()] - param () - - try - { - if (!([System.Management.Automation.PSTypeName]'NativeHelper').Type) - { - $nativeDef = - @" - using System; - using System.Runtime.InteropServices; - - public static class NativeHelper - { - [DllImport("user32.dll")] - [return: MarshalAs(UnmanagedType.Bool)] - private static extern bool SetForegroundWindow(IntPtr hWnd); - - public static bool SetForeground(IntPtr handle) - { - return NativeHelper.SetForegroundWindow(handle); - } - } -"@ - - Add-Type -TypeDefinition $nativeDef - } - - [NativeHelper]::SetForeground($Browser.HWND) | Out-Null - } - catch [exception] { - Write-Error -Message 'Failed to bring IE to foreground' -Exception $_.Exception - } } \ No newline at end of file diff --git a/src/Public/Asserts.ps1 b/src/Public/Asserts.ps1 index 7c31dba..d4f740e 100644 --- a/src/Public/Asserts.ps1 +++ b/src/Public/Asserts.ps1 @@ -10,7 +10,7 @@ function Assert-MonocleBodyValue $Not ) - $body = $Browser.Document.body.outerHTML + $body = $Browser.PageSource if ($Not) { if ($body -imatch $ExpectedValue) { @@ -48,9 +48,9 @@ function Assert-MonocleElementValue [string] $ElementValue, - [Parameter(ParameterSetName='MPath')] + [Parameter(ParameterSetName='XPath')] [string] - $MPath + $XPath ) $value = Get-MonocleElementValue ` @@ -60,7 +60,7 @@ function Assert-MonocleElementValue -AttributeName $AttributeName ` -AttributeValue $AttributeValue ` -ElementValue $ElementValue ` - -MPath $MPath + -XPath $XPath if ($value -ine $ExpectedValue) { @@ -71,7 +71,7 @@ function Assert-MonocleElementValue -AttributeName $AttributeName ` -AttributeValue $AttributeValue ` -ElementValue $ElementValue ` - -MPath $MPath ` + -XPath $XPath ` -UseInnerHtml if ($innerHtml -ine $ExpectedValue) { diff --git a/src/Public/Elements.ps1 b/src/Public/Elements.ps1 index 6926b46..d4229da 100644 --- a/src/Public/Elements.ps1 +++ b/src/Public/Elements.ps1 @@ -26,12 +26,22 @@ function Set-MonocleElementValue [string] $ElementValue, - [Parameter(ParameterSetName='MPath')] + [Parameter(ParameterSetName='XPath')] [string] - $MPath, + $XPath, + + [Parameter()] + [int] + $Timeout = 10, + + [switch] + $Wait, [switch] - $Mask + $Mask, + + [switch] + $NoClear ) # Attempt to retrieve an appropriate element @@ -42,7 +52,9 @@ function Set-MonocleElementValue -AttributeName $AttributeName ` -AttributeValue $AttributeValue ` -ElementValue $ElementValue ` - -MPath $MPath + -XPath $XPath ` + -Timeout $Timeout ` + -Wait:$Wait if ($Mask) { Write-MonocleHost -Message "Setting $($result.Id) element value to: ********" @@ -52,15 +64,20 @@ function Set-MonocleElementValue } # Set the value of the element, if it's a select element, set the appropriate option with value to be selected - if ($result.Element.Length -gt 1 -and $result.Element[0].tagName -ieq 'option') { - ($result.Element | Where-Object { $_.innerHTML -ieq $Value }).Selected = $true + if ($result.Element.Length -gt 1 -and $result.Element[0].TagName -ieq 'option') { + $element = ($result.Element | Where-Object { $_.Text -ieq $Value }) + $element.Click() | Out-Null } else { - $result.Element.value = $Value + if (!$NoClear) { + $result.Element.Clear() + } + + $result.Element.SendKeys($Value) } } -function Get-MonocleElementValue +function Submit-MonocleForm { [CmdletBinding(DefaultParameterSetName='Id')] [OutputType([string])] @@ -85,12 +102,19 @@ function Get-MonocleElementValue [string] $ElementValue, - [Parameter(ParameterSetName='MPath')] + [Parameter(ParameterSetName='XPath')] [string] - $MPath, + $XPath, + + [Parameter()] + [int] + $Timeout = 10, + + [switch] + $Wait, [switch] - $UseInnerHtml + $WaitUrl ) $result = Get-MonocleElement ` @@ -100,19 +124,75 @@ function Get-MonocleElementValue -AttributeName $AttributeName ` -AttributeValue $AttributeValue ` -ElementValue $ElementValue ` - -MPath $MPath + -XPath $XPath ` + -Timeout $Timeout ` + -Wait:$Wait - # get the value of the element, if it's a select element, get the appropriate option where option is selected - if (($result.Element.Length -gt 1) -and ($result.Element[0].tagName -ieq 'option')) { - return ($result.Element | Where-Object { $_.Selected -eq $true }).innerHTML + $url = Get-MonocleUrl + $result.Element.Submit() | Out-Null + Start-MonocleSleepWhileBusy + + # check if we should wait until the url is different + if ($WaitUrl) { + Wait-MonocleUrlDifferent -FromUrl $url -Timeout $Timeout } +} - # if not a select element, then return either the innerHTML or value - if ($UseInnerHtml) { - return $result.Element.innerHTML +function Get-MonocleElementValue +{ + [CmdletBinding(DefaultParameterSetName='Id')] + [OutputType([string])] + param ( + [Parameter(Mandatory=$true, ParameterSetName='Id')] + [string] + $Id, + + [Parameter(Mandatory=$true, ParameterSetName='Tag')] + [string] + $TagName, + + [Parameter(ParameterSetName='Tag')] + [string] + $AttributeName, + + [Parameter(ParameterSetName='Tag')] + [string] + $AttributeValue, + + [Parameter(ParameterSetName='Tag')] + [string] + $ElementValue, + + [Parameter(ParameterSetName='XPath')] + [string] + $XPath, + + [Parameter()] + [int] + $Timeout = 10, + + [switch] + $Wait + ) + + $result = Get-MonocleElement ` + -FilterType $PSCmdlet.ParameterSetName ` + -Id $Id ` + -TagName $TagName ` + -AttributeName $AttributeName ` + -AttributeValue $AttributeValue ` + -ElementValue $ElementValue ` + -XPath $XPath ` + -Timeout $Timeout ` + -Wait:$Wait + + # get the value of the element, if it's a select element, get the appropriate option where option is selected + if (($result.Element.Length -gt 1) -and ($result.Element[0].TagName -ieq 'option')) { + return ($result.Element | Where-Object { $_.Selected -eq $true }).Text } - return $result.Element.value + # if not a select element, then return the value + return $result.Element.Text } function Test-MonocleElement @@ -140,9 +220,9 @@ function Test-MonocleElement [string] $ElementValue, - [Parameter(ParameterSetName='MPath')] + [Parameter(ParameterSetName='XPath')] [string] - $MPath + $XPath ) $result = Get-MonocleElement ` @@ -152,10 +232,10 @@ function Test-MonocleElement -AttributeName $AttributeName ` -AttributeValue $AttributeValue ` -ElementValue $ElementValue ` - -MPath $MPath ` + -XPath $XPath ` -NoThrow - return !(Test-MonocleElementNull -Element $result.Element) + return ($null -ne $result.Element) } function Wait-MonocleValue @@ -182,9 +262,9 @@ function Wait-MonocleValue 'pattern' { Write-MonocleHost -Message "Waiting for value to match pattern: $Pattern" - while ($Browser.Document.body.outerHTML -inotmatch $Pattern) { + while ($Browser.PageSource -inotmatch $Pattern) { if ($count -ge $AttemptCount) { - throw "Expected value to match pattern: $($Pattern)`nBut found nothing`nOn: $($Browser.LocationURL)" + throw "Expected value to match pattern: $($Pattern)`nBut found nothing`nOn: $(Get-MonocleUrl)" } $count++ @@ -195,9 +275,9 @@ function Wait-MonocleValue 'value' { Write-MonocleHost -Message "Waiting for value: $Value" - while ($Browser.Document.body.outerHTML -ine $Value) { + while ($Browser.PageSource -ine $Value) { if ($count -ge $AttemptCount) { - throw "Expected value: $($Value)`nBut found nothing`nOn: $($Browser.LocationURL)" + throw "Expected value: $($Value)`nBut found nothing`nOn: $(Get-MonocleUrl)" } $count++ @@ -234,9 +314,9 @@ function Wait-MonocleElement [string] $ElementValue, - [Parameter(ParameterSetName='MPath')] + [Parameter(ParameterSetName='XPath')] [string] - $MPath, + $XPath, [Parameter()] [int] @@ -251,14 +331,14 @@ function Wait-MonocleElement -AttributeName $AttributeName ` -AttributeValue $AttributeValue ` -ElementValue $ElementValue ` - -MPath $MPath ` + -XPath $XPath ` -NoThrow Write-MonocleHost -Message "Waiting for element: $($result.Id)" - while (Test-MonocleElementNull -Element $result.Element) { + while ($null -eq $result.Element) { if ($count -ge $AttemptCount) { - throw "Expected element: $($result.Id)`nBut found nothing`nOn: $($Browser.LocationURL)" + throw "Expected element: $($result.Id)`nBut found nothing`nOn: $(Get-MonocleUrl)" } $result = Get-MonocleElement ` @@ -268,7 +348,7 @@ function Wait-MonocleElement -AttributeName $AttributeName ` -AttributeValue $AttributeValue ` -ElementValue $ElementValue ` - -MPath $MPath ` + -XPath $XPath ` -NoThrow $count++ @@ -302,13 +382,16 @@ function Invoke-MonocleElementClick [string] $ElementValue, - [Parameter(ParameterSetName='MPath')] + [Parameter(ParameterSetName='XPath')] [string] - $MPath, + $XPath, [Parameter()] [int] - $Duration = 10, + $Timeout = 10, + + [switch] + $Wait, [switch] $WaitUrl @@ -322,17 +405,19 @@ function Invoke-MonocleElementClick -AttributeName $AttributeName ` -AttributeValue $AttributeValue ` -ElementValue $ElementValue ` - -MPath $MPath + -XPath $XPath ` + -Timeout $Timeout ` + -Wait:$Wait ` Write-MonocleHost -Message "Clicking element: $($result.Id)" $url = Get-MonocleUrl - $result.Element.click() | Out-Null + $result.Element.Click() | Out-Null Start-MonocleSleepWhileBusy # check if we should wait until the url is different if ($WaitUrl) { - Wait-MonocleUrlDifferent -CurrentUrl $url -Duration $Duration + Wait-MonocleUrlDifferent -FromUrl $url -Timeout $Timeout } } @@ -360,9 +445,16 @@ function Invoke-MonocleElementCheck [string] $ElementValue, - [Parameter(ParameterSetName='MPath')] + [Parameter(ParameterSetName='XPath')] [string] - $MPath, + $XPath, + + [Parameter()] + [int] + $Timeout = 10, + + [switch] + $Wait, [switch] $Uncheck @@ -376,17 +468,22 @@ function Invoke-MonocleElementCheck -AttributeName $AttributeName ` -AttributeValue $AttributeValue ` -ElementValue $ElementValue ` - -MPath $MPath + -XPath $XPath ` + -Timeout $Timeout ` + -Wait:$Wait if ($Uncheck) { Write-MonocleHost -Message "Unchecking element: $($result.Id)" + if ($result.Element.Selected) { + $result.Element.Click() | Out-Null + } } else { Write-MonocleHost -Message "Checking element: $($result.Id)" + if (!$result.Element.Selected) { + $result.Element.Click() | Out-Null + } } - # Attempt to toggle the check value - $result.Element.Checked = !$Uncheck - Start-MonocleSleepWhileBusy } \ No newline at end of file diff --git a/src/Public/Flow.ps1 b/src/Public/Flow.ps1 index 1bdefa1..47c8a9a 100644 --- a/src/Public/Flow.ps1 +++ b/src/Public/Flow.ps1 @@ -1,3 +1,56 @@ +function New-MonocleBrowser +{ + [CmdletBinding()] + [OutputType([OpenQA.Selenium.Remote.RemoteWebDriver])] + param( + [Parameter(Mandatory=$true)] + [ValidateSet('IE', 'Chrome', 'Firefox')] + [string] + $Type, + + [Parameter()] + [int] + $PageTimeout = 30, + + [Parameter()] + [string[]] + $Arguments, + + [switch] + $Hide + ) + + $Browser = Initialize-MonocleBrowser -Type $Type -Arguments $Arguments -Hide:$Hide + if (!$? -or ($null -eq $Browser)) { + throw 'Failed to create Browser' + } + + $Browser.Manage().Timeouts().PageLoad = [timespan]::FromSeconds($PageTimeout) + return $Browser +} + +function Close-MonocleBrowser +{ + [CmdletBinding()] + param( + [Parameter(Mandatory=$true)] + [OpenQA.Selenium.Remote.RemoteWebDriver[]] + $Browser + ) + + @($Browser) | ForEach-Object { + $type = ($_.GetType().Name -ireplace 'Driver', '') + + Write-Verbose "Closing the $($type) Browser" + $_.Quit() | Out-Null + + Write-Verbose "Disposing the $($type) Browser" + $_.Dispose() | Out-Null + } + + $Browser = $null +} + function Start-MonocleFlow { [CmdletBinding()] @@ -15,26 +68,18 @@ function Start-MonocleFlow [string] $ScreenshotPath, - [switch] - $Visible, + [Parameter(Mandatory=$true)] + [OpenQA.Selenium.Remote.RemoteWebDriver] + $Browser, [Parameter(ParameterSetName='Screenshot')] [switch] $ScreenshotOnFail, [switch] - $KeepOpen + $CloseBrowser ) - # create a new browser - $Browser = New-Object -ComObject InternetExplorer.Application - if (!$? -or ($null -eq $Browser)) { - throw 'Failed to create Browser for IE' - } - - $Browser.Visible = [bool]$Visible - $Browser.TheaterMode = $false - # set the output depth $env:MONOCLE_OUTPUT_DEPTH = '1' @@ -48,8 +93,8 @@ function Start-MonocleFlow { # take a screenshot if enabled if ($ScreenshotOnFail) { - $screenshotName = ("{0}_{1}" -f $Name, [DateTime]::Now.ToString('yyyy-MM-dd-HH-mm-ss')) - $sPath = Invoke-MonocoleScreenshot -Name $screenshotName -Path $ScreenshotPath + $screenshotName = "$($Name)_$([DateTime]::Now.ToString('yyyy-MM-dd-HH-mm-ss'))" + $sPath = Invoke-MonocleScreenshot -Name $screenshotName -Path $ScreenshotPath } try { @@ -66,9 +111,8 @@ function Start-MonocleFlow finally { # close the browser - if (($null -ne $Browser) -and !$KeepOpen) { - $Browser.Quit() - $Browser = $null + if ($CloseBrowser) { + Close-MonocleBrowser -Browser $Browser } } } diff --git a/src/Public/Misc.ps1 b/src/Public/Misc.ps1 index 3f0569d..b5c295c 100644 --- a/src/Public/Misc.ps1 +++ b/src/Public/Misc.ps1 @@ -11,7 +11,7 @@ function Start-MonocleSleep Start-Sleep -Seconds $Seconds } -function Invoke-MonocoleScreenshot +function Invoke-MonocleScreenshot { [CmdletBinding()] param ( @@ -23,13 +23,7 @@ function Invoke-MonocoleScreenshot $Path ) - $initialVisibleState = $Browser.Visible - - $Browser.Visible = $true - $Browser.TheaterMode = $true - - Set-MonocleBrowserFocus - Start-MonocleSleepWhileBusy + $screenshot = $Browser.GetScreenshot() if ([string]::IsNullOrWhiteSpace($Path)) { $Path = $pwd @@ -38,18 +32,9 @@ function Invoke-MonocoleScreenshot $Name = ($Name -replace ' ', '_') $filepath = Join-Path $Path "$($Name).png" - Add-Type -AssemblyName System.Drawing - - $bitmap = New-Object System.Drawing.Bitmap $Browser.Width, $Browser.Height - $graphic = [System.Drawing.Graphics]::FromImage($bitmap) - $graphic.CopyFromScreen($Browser.Left, $Browser.Top, 0, 0, $bitmap.Size) - $bitmap.Save($filepath) - - $Browser.TheaterMode = $false - $Browser.Visible = $initialVisibleState + $screenshot.SaveAsFile($filepath, [OpenQA.Selenium.ScreenshotImageFormat]::Png) Write-MonocleHost -Message "Screenshot saved to: $filepath" - Start-MonocleSleepWhileBusy return $filepath } @@ -82,9 +67,9 @@ function Save-MonocleImage [string] $ElementValue, - [Parameter(ParameterSetName='MPath')] + [Parameter(ParameterSetName='XPath')] [string] - $MPath + $XPath ) $result = Get-MonocleElement ` @@ -94,20 +79,21 @@ function Save-MonocleImage -AttributeName $AttributeName ` -AttributeValue $AttributeValue ` -ElementValue $ElementValue ` - -MPath $MPath + -XPath $XPath Write-MonocleHost -Message "Downloading image from $($result.Id)" - $tag = $result.Element.tagName - if (($tag -ine 'img') -and ($tag -ine 'image')) { + $tag = $result.Element.TagName + if (@('img', 'image') -inotcontains $tag) { throw "Element $($result.Id) is not an image element: $tag" } - if ([string]::IsNullOrWhiteSpace($result.Element.src)) { + $src = $result.Element.GetAttribute('src') + if ([string]::IsNullOrWhiteSpace($src)) { throw "Element $($result.Id) has no src attribute" } - Invoke-MonocleDownloadImage -Source $result.Element.src -Path $Path + Invoke-MonocleDownloadImage -Source $src -Path $Path } function Restart-MonocleBrowser @@ -116,7 +102,7 @@ function Restart-MonocleBrowser param () Write-MonocleHost -Message "Refreshing the Browser" - $Browser.Refresh() + $Browser.Navigate().Refresh() Start-MonocleSleepWhileBusy Start-Sleep -Seconds 2 } @@ -130,7 +116,7 @@ function Get-MonocleHtml $FilePath ) - $content = $Browser.Document.IHTMLDocument3_documentElement.outerHTML + $content = $Browser.PageSource if ([string]::IsNullOrWhiteSpace($FilePath)) { Write-MonocleHost -Message "Retrieving the current page's HTML content" diff --git a/src/Public/Url.ps1 b/src/Public/Url.ps1 index b604e1e..2ebe619 100644 --- a/src/Public/Url.ps1 +++ b/src/Public/Url.ps1 @@ -30,18 +30,19 @@ function Set-MonocleUrl while ($attempt -le $Attempts) { try { Write-MonocleHost -Message "Navigating to: $url (Status: $code) [attempt: $($attempt)]" - $Browser.Navigate($Url) | Out-Null + $Browser.Navigate().GoToUrl($Url) | Out-Null Start-MonocleSleepWhileBusy break } catch { $attempt++ - Start-Sleep -Seconds 1 if ($attempt -gt $Attempts) { throw $_.Exception } + + Start-Sleep -Seconds 1 } } } @@ -52,7 +53,7 @@ function Get-MonocleUrl [OutputType([string])] param() - return $Browser.LocationURL + return $Browser.Url } function Edit-MonocleUrl @@ -69,11 +70,9 @@ function Edit-MonocleUrl [switch] $Force - - #TODO: wait ) - $Url = $Browser.LocationURL -ireplace $Pattern, $Value + $Url = ((Get-MonocleUrl) -ireplace $Pattern, $Value) Set-MonocleUrl -Url $Url -Force:$Force Start-MonocleSleepWhileBusy } @@ -92,7 +91,7 @@ function Wait-MonocleUrl [Parameter()] [int] - $Duration = 10, + $Timeout = 10, [Parameter()] [int] @@ -103,13 +102,13 @@ function Wait-MonocleUrl $StartsWith ) - # ensure duration and attempts is >=1 + # ensure timeout and attempts is >=1 if ($Attempts -le 0) { $Attempts = 1 } - if ($Duration -le 0) { - $Duration = 1 + if ($Timeout -le 0) { + $Timeout = 1 } # generic values @@ -123,9 +122,9 @@ function Wait-MonocleUrl 'pattern' { Write-MonocleHost -Message "Waiting for URL to match pattern: $($Pattern) [attempt: $($attempt)]" - while ($Browser.LocationURL -inotmatch $Pattern) { - if ($seconds -ge $Duration) { - throw "Expected URL to match pattern: $($Pattern)`nBut got: $($Browser.LocationURL)" + while ((Get-MonocleUrl) -inotmatch $Pattern) { + if ($seconds -ge $Timeout) { + throw "Expected URL to match pattern: $($Pattern)`nBut got: $(Get-MonocleUrl)" } $seconds++ @@ -136,9 +135,9 @@ function Wait-MonocleUrl 'url' { Write-MonocleHost -Message "Waiting for URL: $($Url) [attempt: $($attempt)]" - while ((!$StartsWith -and $Browser.LocationURL -ine $Url) -or ($StartsWith -and !$Browser.LocationURL.StartsWith($Url, [StringComparison]::InvariantCultureIgnoreCase))) { - if ($seconds -ge $Duration) { - throw "Expected URL: $($Url)`nBut got: $($Browser.LocationURL)" + while ((!$StartsWith -and ((Get-MonocleUrl) -ine $Url)) -or ($StartsWith -and !((Get-MonocleUrl).StartsWith($Url, [StringComparison]::InvariantCultureIgnoreCase)))) { + if ($seconds -ge $Timeout) { + throw "Expected URL: $($Url)`nBut got: $(Get-MonocleUrl)" } $seconds++ @@ -151,11 +150,12 @@ function Wait-MonocleUrl } catch { $attempt++ - Start-Sleep -Seconds 1 if ($attempt -gt $Attempts) { throw $_.Exception } + + Start-Sleep -Seconds 1 } } @@ -169,26 +169,26 @@ function Wait-MonocleUrlDifferent param ( [Parameter(Mandatory=$true)] [string] - $CurrentUrl, + $FromUrl, [Parameter()] [int] - $Duration = 10 + $Timeout = 10 ) - # ensure duration >=1 - if ($Duration -le 0) { - $Duration = 1 + # ensure timeout >=1 + if ($Timeout -le 0) { + $Timeout = 1 } # generic values $seconds = 0 - Write-MonocleHost -Message "Waiting for URL to change: From $($CurrentUrl)" + Write-MonocleHost -Message "Waiting for URL to change from: $($FromUrl)" - while (($newUrl = Get-MonocleUrl) -ieq $CurrentUrl) { - if ($seconds -ge $Duration) { - throw "Expected URL to change: From $($CurrentUrl)`nBut got: $($newUrl)" + while (($newUrl = Get-MonocleUrl) -ieq $FromUrl) { + if ($seconds -ge $Timeout) { + throw "Expected URL to change: From $($FromUrl)`nBut got: $($newUrl)" } $seconds++ diff --git a/src/lib/Browsers/linux/chromedriver b/src/lib/Browsers/linux/chromedriver new file mode 100644 index 0000000..e21c03d Binary files /dev/null and b/src/lib/Browsers/linux/chromedriver differ diff --git a/src/lib/Browsers/linux/geckodriver b/src/lib/Browsers/linux/geckodriver new file mode 100644 index 0000000..ff08a41 Binary files /dev/null and b/src/lib/Browsers/linux/geckodriver differ diff --git a/src/lib/Browsers/mac/chromedriver b/src/lib/Browsers/mac/chromedriver new file mode 100644 index 0000000..543ed9f Binary files /dev/null and b/src/lib/Browsers/mac/chromedriver differ diff --git a/src/lib/Browsers/mac/geckodriver b/src/lib/Browsers/mac/geckodriver new file mode 100644 index 0000000..83a86e1 Binary files /dev/null and b/src/lib/Browsers/mac/geckodriver differ diff --git a/src/lib/Browsers/win/IEDriverServer.exe b/src/lib/Browsers/win/IEDriverServer.exe new file mode 100644 index 0000000..90644e4 Binary files /dev/null and b/src/lib/Browsers/win/IEDriverServer.exe differ diff --git a/src/lib/Browsers/win/chromedriver.exe b/src/lib/Browsers/win/chromedriver.exe new file mode 100644 index 0000000..ae80772 Binary files /dev/null and b/src/lib/Browsers/win/chromedriver.exe differ diff --git a/src/lib/Browsers/win/geckodriver.exe b/src/lib/Browsers/win/geckodriver.exe new file mode 100644 index 0000000..9fae8e0 Binary files /dev/null and b/src/lib/Browsers/win/geckodriver.exe differ diff --git a/src/lib/Microsoft.mshtml.dll b/src/lib/Microsoft.mshtml.dll deleted file mode 100644 index 46e2e0c..0000000 Binary files a/src/lib/Microsoft.mshtml.dll and /dev/null differ diff --git a/src/lib/WebDriver/net45/WebDriver.Support.dll b/src/lib/WebDriver/net45/WebDriver.Support.dll new file mode 100644 index 0000000..0f85686 Binary files /dev/null and b/src/lib/WebDriver/net45/WebDriver.Support.dll differ diff --git a/src/lib/WebDriver/net45/WebDriver.Support.xml b/src/lib/WebDriver/net45/WebDriver.Support.xml new file mode 100644 index 0000000..d12d63e --- /dev/null +++ b/src/lib/WebDriver/net45/WebDriver.Support.xml @@ -0,0 +1,2223 @@ + + + + WebDriver.Support + + + + + A wrapper around an arbitrary WebDriver instance which supports registering for + events, e.g. for logging purposes. + + + + + Initializes a new instance of the class. + + The driver to register events for. + + + + Fires before the driver begins navigation. + + + + + Fires after the driver completes navigation + + + + + Fires before the driver begins navigation back one entry in the browser history list. + + + + + Fires after the driver completes navigation back one entry in the browser history list. + + + + + Fires before the driver begins navigation forward one entry in the browser history list. + + + + + Fires after the driver completes navigation forward one entry in the browser history list. + + + + + Fires before the driver clicks on an element. + + + + + Fires after the driver has clicked on an element. + + + + + Fires before the driver changes the value of an element via Clear(), SendKeys() or Toggle(). + + + + + Fires after the driver has changed the value of an element via Clear(), SendKeys() or Toggle(). + + + + + Fires before the driver starts to find an element. + + + + + Fires after the driver completes finding an element. + + + + + Fires before a script is executed. + + + + + Fires after a script is executed. + + + + + Fires when an exception is thrown. + + + + + Gets the wrapped by this EventsFiringWebDriver instance. + + + + + Gets or sets the URL the browser is currently displaying. + + + Setting the property will load a new web page in the current browser window. + This is done using an HTTP GET operation, and the method will block until the + load is complete. This will follow redirects issued either by the server or + as a meta-redirect from within the returned HTML. Should a meta-redirect "rest" + for any duration of time, it is best to wait until this timeout is over, since + should the underlying page change while your test is executing the results of + future calls against this interface will be against the freshly loaded page. + + + + + + + Gets the title of the current browser window. + + + + + Gets the source of the page last loaded by the browser. + + + If the page has been modified after loading (for example, by JavaScript) + there is no guarantee that the returned text is that of the modified page. + Please consult the documentation of the particular driver being used to + determine whether the returned text reflects the current state of the page + or the text last sent by the web server. The page source returned is a + representation of the underlying DOM: do not expect it to be formatted + or escaped in the same way as the response sent from the web server. + + + + + Gets the current window handle, which is an opaque handle to this + window that uniquely identifies it within this driver instance. + + + + + Gets the window handles of open browser windows. + + + + + Close the current window, quitting the browser if it is the last window currently open. + + + + + Quits this driver, closing every associated window. + + + + + Instructs the driver to change its settings. + + An object allowing the user to change + the settings of the driver. + + + + Instructs the driver to navigate the browser to another location. + + An object allowing the user to access + the browser's history and to navigate to a given URL. + + + + Instructs the driver to send future commands to a different frame or window. + + An object which can be used to select + a frame or window. + + + + Find the first using the given method. + + The locating mechanism to use. + The first matching on the current context. + If no element matches the criteria. + + + + Find all IWebElements within the current context + using the given mechanism. + + The locating mechanism to use. + A of all WebElements + matching the current criteria, or an empty list if nothing matches. + + + + Frees all managed and unmanaged resources used by this instance. + + + + + Executes JavaScript in the context of the currently selected frame or window. + + The JavaScript code to execute. + The arguments to the script. + The value returned by the script. + + + The method executes JavaScript in the context of + the currently selected frame or window. This means that "document" will refer + to the current document. If the script has a return value, then the following + steps will be taken: + + + + For an HTML element, this method returns a + For a number, a is returned + For a boolean, a is returned + For all other cases a is returned. + For an array,we check the first element, and attempt to return a + of that type, following the rules above. Nested lists are not + supported. + If the value is null or there is no return value, + is returned. + + + + Arguments must be a number (which will be converted to a ), + a , a or a . + An exception will be thrown if the arguments do not meet these criteria. + The arguments will be made available to the JavaScript via the "arguments" magic + variable, as if the function were called via "Function.apply" + + + + + + Executes JavaScript asynchronously in the context of the currently selected frame or window. + + The JavaScript code to execute. + The arguments to the script. + The value returned by the script. + + + + Gets a object representing the image of the page on the screen. + + A object containing the image. + + + + Frees all managed and, optionally, unmanaged resources used by this instance. + + to dispose of only managed resources; + to dispose of managed and unmanaged resources. + + + + Raises the event. + + A that contains the event data. + + + + Raises the event. + + A that contains the event data. + + + + Raises the event. + + A that contains the event data. + + + + Raises the event. + + A that contains the event data. + + + + Raises the event. + + A that contains the event data. + + + + Raises the event. + + A that contains the event data. + + + + Raises the event. + + A that contains the event data. + + + + Raises the event. + + A that contains the event data. + + + + Raises the event. + + A that contains the event data. + + + + Raises the event. + + A that contains the event data. + + + + Raises the event. + + A that contains the event data. + + + + Raises the event. + + A that contains the event data. + + + + Raises the event. + + A that contains the event data. + + + + Raises the event. + + A that contains the event data. + + + + Raises the event. + + A that contains the event data. + + + + Provides a mechanism for Navigating with the driver. + + + + + Initializes a new instance of the class + + Driver in use + + + + Move the browser back + + + + + Move the browser forward + + + + + Navigate to a url for your test + + String of where you want the browser to go to + + + + Navigate to a url for your test + + Uri object of where you want the browser to go to + + + + Refresh the browser + + + + + Provides a mechanism for setting options needed for the driver during the test. + + + + + Initializes a new instance of the class + + Instance of the driver currently in use + + + + Gets an object allowing the user to manipulate cookies on the page. + + + + + Gets an object allowing the user to manipulate the currently-focused browser window. + + "Currently-focused" is defined as the browser window having the window handle + returned when IWebDriver.CurrentWindowHandle is called. + + + + Provides access to the timeouts defined for this driver. + + An object implementing the interface. + + + + Provides a mechanism for finding elements on the page with locators. + + + + + Initializes a new instance of the class + + The driver that is currently in use + + + + Move to a different frame using its index + + The index of the + A WebDriver instance that is currently in use + + + + Move to different frame using its name + + name of the frame + A WebDriver instance that is currently in use + + + + Move to a frame element. + + a previously found FRAME or IFRAME element. + A WebDriver instance that is currently in use. + + + + Select the parent frame of the currently selected frame. + + An instance focused on the specified frame. + + + + Change to the Window by passing in the name + + name of the window that you wish to move to + A WebDriver instance that is currently in use + + + + Change the active frame to the default + + Element of the default + + + + Finds the active element on the page and returns it + + Element that is active + + + + Switches to the currently active modal dialog for this particular driver instance. + + A handle to the dialog. + + + + Defines the interface through which the user can define timeouts. + + + + + Initializes a new instance of the class + + The object to wrap. + + + + Gets or sets the implicit wait timeout, which is the amount of time the + driver should wait when searching for an element if it is not immediately + present. + + + When searching for a single element, the driver should poll the page + until the element has been found, or this timeout expires before throwing + a . When searching for multiple elements, + the driver should poll the page until at least one element has been found + or this timeout has expired. + + Increasing the implicit wait timeout should be used judiciously as it + will have an adverse effect on test run time, especially when used with + slower location strategies like XPath. + + + + + + Gets or sets the asynchronous script timeout, which is the amount + of time the driver should wait when executing JavaScript asynchronously. + This timeout only affects the + method. + + + + + Gets or sets the page load timeout, which is the amount of time the driver + should wait for a page to load when setting the + property. + + + + + EventFiringWebElement allows you to have access to specific items that are found on the page + + + + + Initializes a new instance of the class. + + The instance hosting this element. + The to wrap for event firing. + + + + Gets the underlying wrapped . + + + + + Gets the DOM Tag of element + + + + + Gets the text from the element + + + + + Gets a value indicating whether an element is currently enabled + + + + + Gets a value indicating whether this element is selected or not. This operation only applies to input elements such as checkboxes, options in a select and radio buttons. + + + + + Gets the Location of an element and returns a Point object + + + + + Gets the of the element on the page + + + + + Gets a value indicating whether the element is currently being displayed + + + + + Gets the underlying EventFiringWebDriver for this element. + + + + + Method to clear the text out of an Input element + + + + + Method for sending native key strokes to the browser + + String containing what you would like to type onto the screen + + + + If this current element is a form, or an element within a form, then this will be submitted to the remote server. + If this causes the current page to change, then this method will block until the new page is loaded. + + + + + Click this element. If this causes a new page to load, this method will block until + the page has loaded. At this point, you should discard all references to this element + and any further operations performed on this element will have undefined behavior unless + you know that the element and the page will still be present. If this element is not + clickable, then this operation is a no-op since it's pretty common for someone to + accidentally miss the target when clicking in Real Life + + + + + If this current element is a form, or an element within a form, then this will be submitted to the remote server. If this causes the current page to change, then this method will block until the new page is loaded. + + Attribute you wish to get details of + The attribute's current value or null if the value is not set. + + + + Gets the value of a JavaScript property of this element. + + The name JavaScript the JavaScript property to get the value of. + The JavaScript property's current value. Returns a if the + value is not set or the property does not exist. + + + + Method to return the value of a CSS Property + + CSS property key + string value of the CSS property + + + + Finds the first element in the page that matches the object + + By mechanism to find the element + IWebElement object so that you can interaction that object + + + + Finds the elements on the page by using the object and returns a ReadOnlyCollection of the Elements on the page + + By mechanism to find the element + ReadOnlyCollection of IWebElement + + + + Provides data for events related to finding elements. + + + + + Initializes a new instance of the class. + + The WebDriver instance used in finding elements. + The object containing the method used to find elements + + + + Initializes a new instance of the class. + + The WebDriver instance used in finding elements. + The parent element used as the context for the search. + The object containing the method used to find elements. + + + + Gets the WebDriver instance used in finding elements. + + + + + Gets the parent element used as the context for the search. + + + + + Gets the object containing the method used to find elements. + + + + + Provides data for events relating to exception handling. + + + + + Initializes a new instance of the class. + + The WebDriver instance throwing the exception. + The exception thrown by the driver. + + + + Gets the exception thrown by the driver. + + + + + Gets the WebDriver instance . + + + + + Provides data for events relating to navigation. + + + + + Initializes a new instance of the class. + + The WebDriver instance used in navigation. + + + + Initializes a new instance of the class. + + The WebDriver instance used in navigation. + The URL navigated to by the driver. + + + + Gets the URL navigated to by the driver. + + + + + Gets the WebDriver instance used in navigation. + + + + + Provides data for events relating to executing JavaScript. + + + + + Initializes a new instance of the class. + + The WebDriver instance used to execute the script. + The script executed by the driver. + + + + Gets the WebDriver instance used to execute the script. + + + + + Gets the script executed by the driver. + + + + + Provides data for events relating to elements. + + + + + Initializes a new instance of the class. + + The WebDriver instance used for the action. + The element used for the action. + + + + Gets the WebDriver instance used for the action. + + + + + Gets the element used for the action. + + + + + Provides data for events related to finding elements. + + + + + Initializes a new instance of the class. + + The WebDriver instance used for the action. + The element used for the action. + The new value for the element. + + + + Gets the Value that is written to the element + + + + + Provides extension methods for convenience in using WebDriver. + + + + + Gets a object representing the image of the page on the screen. + + The driver instance to extend. + A object containing the image. + Thrown if this instance + does not implement , or the capabilities of the driver + indicate that it cannot take screenshots. + + + + Executes JavaScript in the context of the currently selected frame or window + + The driver instance to extend. + The JavaScript code to execute. + The arguments to the script. + Thrown if this instance + does not implement + + + + Executes JavaScript in the context of the currently selected frame or window + + Expected return type of the JavaScript execution. + The driver instance to extend. + The JavaScript code to execute. + The arguments to the script. + The value returned by the script. + Thrown if this instance + does not implement , or if the actual return type + of the JavaScript execution does not match the expected type. + + + + Mechanism used to locate elements within a document using a series of lookups. This class will + find all DOM elements that matches all of the locators in sequence, e.g. + + + The following code will find all elements that match by1 and then all elements that also match by2. + + driver.findElements(new ByAll(by1, by2)) + + This means that the list of elements returned may not be in document order. + > + + + + Initializes a new instance of the class with one or more objects. + + One or more references + + + + Find a single element. + + Context used to find the element. + The element that matches + + + + Finds many elements + + Context used to find the element. + A readonly collection of elements that match. + + + + Writes out a comma separated list of the objects used in the chain. + + Converts the value of this instance to a + + + + Mechanism used to locate elements within a document using a series of other lookups. This class + will find all DOM elements that matches each of the locators in sequence + + + The following code will will find all elements that match by2 and appear under an element that matches + by1. + + driver.findElements(new ByChained(by1, by2)) + + + + + + Initializes a new instance of the class with one or more objects. + + One or more references + + + + Find a single element. + + Context used to find the element. + The element that matches + + + + Finds many elements + + Context used to find the element. + A readonly collection of elements that match. + + + + Writes out a comma separated list of the objects used in the chain. + + Converts the value of this instance to a + + + + Provides instances of the object to the attributes. + + + + + Gets an instance of the class based on the specified attribute. + + The describing how to find the element. + An instance of the class. + + + + Finds element when the id or the name attribute has the specified value. + + + + + Initializes a new instance of the class. + + The ID or Name to use in finding the element. + + + + Find a single element. + + Context used to find the element. + The element that matches + + + + Finds many elements + + Context used to find the element. + A readonly collection of elements that match. + + + + Writes out a description of this By object. + + Converts the value of this instance to a + + + + Marks the element so that lookups to the browser page are cached. This class cannot be inherited. + + + + + A default locator for elements for use with the . This locator + implements no retry logic for elements not being found, nor for elements being stale. + + + + + Initializes a new instance of the class. + + The used by this locator + to locate elements. + + + + Gets the to be used in locating elements. + + + + + Locates an element using the given list of criteria. + + The list of methods by which to search for the element. + An which is the first match under the desired criteria. + + + + Locates a list of elements using the given list of criteria. + + The list of methods by which to search for the elements. + A list of all elements which match the desired criteria. + + + + Default decorator determining how members of a class which represent elements in a Page Object + are detected. + + + + + Locates an element or list of elements for a Page Object member, and returns a + proxy object for the element or list of elements. + + The containing information about + a class's member. + The used to locate elements. + A transparent proxy to the WebDriver element object. + + + + Determines whether lookups on this member should be cached. + + The containing information about + the member of the Page Object class. + if lookups are to be cached; otherwise, . + + + + Creates a list of locators based on the attributes of this member. + + The containing information about + the member of the Page Object class. + A list of locators based on the attributes of this member. + + + + Marks elements to indicate that found elements should match the criteria of + all on the field or property. + + + + When used with a set of , all criteria must be + matched to be returned. The criteria are used in sequence according to the + Priority property. Note that the behavior when setting multiple + Priority properties to the same value, or not + specifying a Priority value, is undefined. + + + + // Will find the element with the tag name "input" that also has an ID + // attribute matching "elementId". + [FindsByAll] + [FindsBy(How = How.TagName, Using = "input", Priority = 0)] + [FindsBy(How = How.Id, Using = "elementId", Priority = 1)] + public IWebElement thisElement; + + + + + + + Marks program elements with methods by which to find a corresponding element on the page. Used + in conjunction with the , it allows you to quickly create Page Objects. + + + + You can use this attribute by specifying the and properties + to indicate how to find the elements. This attribute can be used to decorate fields and properties + in your Page Object classes. The of the field or property must be either + or IList{IWebElement}. Any other type will throw an + when is called. + + + + [FindsBy(How = How.Name, Using = "myElementName")] + public IWebElement foundElement; + + [FindsBy(How = How.TagName, Using = "a")] + public IList{IWebElement} allLinks; + + + + You can also use multiple instances of this attribute to find an element that may meet + one of multiple criteria. When using multiple instances, you can specify the order in + which the criteria is matched by using the property. + + + + // Will find the element with the name attribute matching the first of "anElementName" + // or "differentElementName". + [FindsBy(How = How.Name, Using = "anElementName", Priority = 0)] + [FindsBy(How = How.Name, Using = "differentElementName", Priority = 1)] + public IWebElement thisElement; + + + + + + + Gets or sets the method used to look up the element + + + + + Gets or sets the value to lookup by (i.e. for How.Name, the actual name to look up) + + + + + Gets or sets a value indicating where this attribute should be evaluated relative to other instances + of this attribute decorating the same class member. + + + + + Gets or sets a value indicating the of the custom finder. The custom finder must + descend from the class, and expose a public constructor that takes a + argument. + + + + + Gets or sets an explicit object to find by. + Setting this property takes precedence over setting the How or Using properties. + + + + + Determines if two instances are equal. + + One instance to compare. + The other instance to compare. + if the two instances are equal; otherwise, . + + + + Determines if two instances are unequal. + s + One instance to compare. + The other instance to compare. + if the two instances are not equal; otherwise, . + + + + Determines if one instance is greater than another. + + One instance to compare. + The other instance to compare. + if the first instance is greater than the second; otherwise, . + + + + Determines if one instance is less than another. + + One instance to compare. + The other instance to compare. + if the first instance is less than the second; otherwise, . + + + + Compares the current instance with another object of the same type and returns an + integer that indicates whether the current instance precedes, follows, or occurs + in the same position in the sort order as the other object. + + An object to compare with this instance. + A value that indicates the relative order of the objects being compared. The return value has these meanings: + + ValueMeaning + Less than zeroThis instance precedes in the sort order. + ZeroThis instance occurs in the same position in the sort order as . + Greater than zeroThis instance follows in the sort order. + + + + + + Determines whether the specified Object is equal + to the current Object. + + The Object to compare with the + current Object. + if the specified Object + is equal to the current Object; otherwise, + . + + + + Serves as a hash function for a particular type. + + A hash code for the current Object. + + + + Marks elements to indicate that each on the field or + property should be used in sequence to find the appropriate element. + + + + When used with a set of , the criteria are used + in sequence according to the Priority property to find child elements. Note that + the behavior when setting multiple Priority + properties to the same value, or not specifying a Priority value, is undefined. + + + + // Will find the element with the ID attribute matching "elementId", then will find + // a child element with the ID attribute matching "childElementId". + [FindsBySequence] + [FindsBy(How = How.Id, Using = "elementId", Priority = 0)] + [FindsBy(How = How.Id, Using = "childElementId", Priority = 1)] + public IWebElement thisElement; + + + + + + + Provides the lookup methods for the FindsBy attribute (for using in PageObjects) + + + + + Finds by + + + + + Finds by + + + + + Finds by + + + + + Finds by + + + + + Finds by + + + + + Finds by + + + + + Finds by + + + + + Finds by + + + + + Finds by a custom implementation. + + + + + Interface describing how elements are to be located by a . + + + A locator must always contain a way to retrieve the to + use in locating elements. In practice, this will usually be implemented by passing + the context in via a constructor. + + + + + Gets the to be used in locating elements. + + + + + Locates an element using the given list of criteria. + + The list of methods by which to search for the element. + An which is the first match under the desired criteria. + + + + Locates a list of elements using the given list of criteria. + + The list of methods by which to search for the elements. + A list of all elements which match the desired criteria. + + + + Interface describing how members of a class which represent elements in a Page Object + are detected. + + + + + Locates an element or list of elements for a Page Object member, and returns a + proxy object for the element or list of elements. + + The containing information about + a class's member. + The used to locate elements. + A transparent proxy to the WebDriver element object. + + + + Provides the ability to produce Page Objects modeling a page. This class cannot be inherited. + + + + + Initializes a new instance of the class. + Private constructor prevents a default instance from being created. + + + + + Initializes the elements in the Page Object with the given type. + + The of the Page Object class. + The instance used to populate the page. + An instance of the Page Object class with the elements initialized. + + The class used in the argument must have a public constructor + that takes a single argument of type . This helps to enforce + best practices of the Page Object pattern, and encapsulates the driver into the Page + Object so that it can have no external WebDriver dependencies. + + + thrown if no constructor to the class can be found with a single IWebDriver argument + -or- + if a field or property decorated with the is not of type + or IList{IWebElement}. + + + + + Initializes the elements in the Page Object with the given type. + + The of the Page Object class. + The implementation that + determines how elements are located. + An instance of the Page Object class with the elements initialized. + + The class used in the argument must have a public constructor + that takes a single argument of type . This helps to enforce + best practices of the Page Object pattern, and encapsulates the driver into the Page + Object so that it can have no external WebDriver dependencies. + + + thrown if no constructor to the class can be found with a single IWebDriver argument + -or- + if a field or property decorated with the is not of type + or IList{IWebElement}. + + + + + Initializes the elements in the Page Object. + + The driver used to find elements on the page. + The Page Object to be populated with elements. + + thrown if a field or property decorated with the is not of type + or IList{IWebElement}. + + + + + Initializes the elements in the Page Object. + + The driver used to find elements on the page. + The Page Object to be populated with elements. + The implementation that + determines how Page Object members representing elements are discovered and populated. + + thrown if a field or property decorated with the is not of type + or IList{IWebElement}. + + + + + Initializes the elements in the Page Object. + + The Page Object to be populated with elements. + The implementation that + determines how elements are located. + + thrown if a field or property decorated with the is not of type + or IList{IWebElement}. + + + + + Initializes the elements in the Page Object. + + The Page Object to be populated with elements. + The implementation that + determines how elements are located. + The implementation that + determines how Page Object members representing elements are discovered and populated. + + thrown if a field or property decorated with the is not of type + or IList{IWebElement}. + + + + + A locator for elements for use with the that retries locating + the element up to a timeout if the element is not found. + + + + + Initializes a new instance of the class. + + The object that the + locator uses for locating elements. + + + + Initializes a new instance of the class. + + The object that the + locator uses for locating elements. + The indicating how long the locator should + retry before timing out. + + + + Initializes a new instance of the class. + + The object that the + locator uses for locating elements. + The indicating how long the locator should + retry before timing out. + The indicating how often to poll + for the existence of the element. + + + + Gets the to be used in locating elements. + + + + + Locates an element using the given list of criteria. + + The list of methods by which to search for the element. + An which is the first match under the desired criteria. + + + + Locates a list of elements using the given list of criteria. + + The list of methods by which to search for the elements. + A list of all elements which match the desired criteria. + + + + Represents a base proxy class for objects used with the PageFactory. + + + + + Initializes a new instance of the class. + + The of object for which to create a proxy. + The implementation that + determines how elements are located. + The list of methods by which to search for the elements. + to cache the lookup to the element; otherwise, . + + + + Gets the implementation that determines how elements are located. + + + + + Gets the list of methods by which to search for the elements. + + + + + Gets a value indicating whether element search results should be cached. + + + + + Invokes a method on the object this proxy represents. + + Message containing the parameters of the method being invoked. + The object this proxy represents. + The instance as a result of method invocation on the + object which this proxy represents. + + + + Represents a proxy class for a list of elements to be used with the PageFactory. + + + + + Initializes a new instance of the class. + + The of object for which to create a proxy. + The implementation that + determines how elements are located. + The list of methods by which to search for the elements. + to cache the lookup to the element; otherwise, . + + + + Gets the list of IWebElement objects this proxy represents, returning a cached one if requested. + + + + + Creates an object used to proxy calls to properties and methods of the + list of objects. + + The of object for which to create a proxy. + The implementation that + determines how elements are located. + The list of methods by which to search for the elements. + to cache the lookup to the + element; otherwise, . + An object used to proxy calls to properties and methods of the + list of objects. + + + + Invokes the method that is specified in the provided on the + object that is represented by the current instance. + + An that contains an of + information about the method call. + The message returned by the invoked method, containing the return value and any + out or ref parameters. + + + + Intercepts the request to a single + + + + + Initializes a new instance of the class. + + The of object for which to create a proxy. + The implementation that determines + how elements are located. + The list of methods by which to search for the elements. + to cache the lookup to the element; otherwise, . + + + + Gets the wrapped by this object. + + + + + Gets the IWebElement object this proxy represents, returning a cached one if requested. + + + + + Creates an object used to proxy calls to properties and methods of an object. + + The of object for which to create a proxy. + The implementation that + determines how elements are located. + The list of methods by which to search for the elements. + to cache the lookup to the element; otherwise, . + An object used to proxy calls to properties and methods of the list of objects. + + + + Invokes the method that is specified in the provided on the + object that is represented by the current instance. + + An that contains a dictionary of + information about the method call. + The message returned by the invoked method, containing the return value and any + out or ref parameters. + + + + Supplies a set of common conditions that can be waited for using . + + + + IWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(3)) + IWebElement element = wait.Until(ExpectedConditions.ElementExists(By.Id("foo"))); + + + + + + Prevents a default instance of the class from being created. + + + + + An expectation for checking the title of a page. + + The expected title, which must be an exact match. + when the title matches; otherwise, . + + + + An expectation for checking that the title of a page contains a case-sensitive substring. + + The fragment of title expected. + when the title matches; otherwise, . + + + + An expectation for the URL of the current page to be a specific URL. + + The URL that the page should be on + when the URL is what it should be; otherwise, . + + + + An expectation for the URL of the current page to be a specific URL. + + The fraction of the url that the page should be on + when the URL contains the text; otherwise, . + + + + An expectation for the URL of the current page to be a specific URL. + + The regular expression that the URL should match + if the URL matches the specified regular expression; otherwise, . + + + + An expectation for checking that an element is present on the DOM of a + page. This does not necessarily mean that the element is visible. + + The locator used to find the element. + The once it is located. + + + + An expectation for checking that an element is present on the DOM of a page + and visible. Visibility means that the element is not only displayed but + also has a height and width that is greater than 0. + + The locator used to find the element. + The once it is located and visible. + + + + An expectation for checking that all elements present on the web page that + match the locator are visible. Visibility means that the elements are not + only displayed but also have a height and width that is greater than 0. + + The locator used to find the element. + The list of once it is located and visible. + + + + An expectation for checking that all elements present on the web page that + match the locator are visible. Visibility means that the elements are not + only displayed but also have a height and width that is greater than 0. + + list of WebElements + The list of once it is located and visible. + + + + An expectation for checking that all elements present on the web page that + match the locator. + + The locator used to find the element. + The list of once it is located. + + + + An expectation for checking if the given text is present in the specified element. + + The WebElement + Text to be present in the element + once the element contains the given text; otherwise, . + + + + An expectation for checking if the given text is present in the element that matches the given locator. + + The locator used to find the element. + Text to be present in the element + once the element contains the given text; otherwise, . + + + + An expectation for checking if the given text is present in the specified elements value attribute. + + The WebElement + Text to be present in the element + once the element contains the given text; otherwise, . + + + + An expectation for checking if the given text is present in the specified elements value attribute. + + The locator used to find the element. + Text to be present in the element + once the element contains the given text; otherwise, . + + + + An expectation for checking whether the given frame is available to switch + to. If the frame is available it switches the given driver to the + specified frame. + + Used to find the frame (id or name) + + + + + An expectation for checking whether the given frame is available to switch + to. If the frame is available it switches the given driver to the + specified frame. + + Locator for the Frame + + + + + An expectation for checking that an element is either invisible or not present on the DOM. + + The locator used to find the element. + if the element is not displayed; otherwise, . + + + + An expectation for checking that an element with text is either invisible or not present on the DOM. + + The locator used to find the element. + Text of the element + if the element is not displayed; otherwise, . + + + + An expectation for checking an element is visible and enabled such that you + can click it. + + The locator used to find the element. + The once it is located and clickable (visible and enabled). + + + + An expectation for checking an element is visible and enabled such that you + can click it. + + The element. + The once it is clickable (visible and enabled). + + + + Wait until an element is no longer attached to the DOM. + + The element. + is the element is still attached to the DOM; otherwise, . + + + + An expectation for checking if the given element is selected. + + The element. + given element is selected.; otherwise, . + + + + An expectation for checking if the given element is in correct state. + + The element. + selected or not selected + given element is in correct state.; otherwise, . + + + + An expectation for checking if the given element is in correct state. + + The element. + selected or not selected + given element is in correct state.; otherwise, . + + + + An expectation for checking if the given element is selected. + + The locator used to find the element. + given element is selected.; otherwise, . + + + + An expectation for checking if the given element is in correct state. + + The locator used to find the element. + selected or not selected + given element is in correct state.; otherwise, . + + + + An expectation for checking the AlterIsPresent + + Alert + + + + An expectation for checking the Alert State + + A value indicating whether or not an alert should be displayed in order to meet this condition. + alert is in correct state present or not present; otherwise, . + + + + Interface allows for the component to be used in Nested Component scenarios such that the + child component class does not have to declare the generic type of the parent explicitly. + + + public class HypotheticalLoadableComponent : LoadableComponent<T> { + ILoadableComponent parent; + public HypotheticalLoadableComponent(ILoadableComponent parent) { + this.parent = parent; + } + protected void EvaluateLoadedStatus() { //code to determine loaded state } + protected void ExecuteLoad() { + parent.Load(); //loads the parent + //code to load this component + } + } + + + + + Loads the component. + + A reference to this . + + + + This exception is thrown by to indicate that + the component was not successfully loaded. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with + a specified error message. + + The message of the exception + + + + Initializes a new instance of the class with + a specified error message and a reference to the inner exception that is the + cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, + or if no inner exception is specified. + + + + Initializes a new instance of the class with serialized data. + + The that holds the serialized + object data about the exception being thrown. + The that contains contextual + information about the source or destination. + + + + Represents any abstraction of something that can be loaded. This may be an entire web page, or + simply a component within that page (such as a login box or menu) or even a service. + + The type to be returned (normally the subclass' type) + + The expected usage is: + + + new HypotheticalComponent().Load(); + + + + + After the method is called, the component will be loaded and + ready for use. Overload the protected Load and IsLoaded members to both load a component and determine + if the component is already loaded. + + + + + Gets or sets the message for the exception thrown when a component cannot be loaded + + + + + Gets a value indicating whether the component is fully loaded. + + + When the component is loaded, this property will return true or false depending on + the execution of to indicate the not loaded state. + + + + + Ensure that the component is currently loaded. + + The loaded component. + This is equivalent to the Get() method in Java version. + + + + Ensure that the component is currently loaded. + + The loaded instance. + + + + HandleLoadError gives a subclass the opportunity to handle a that occurred + during the execution of . + + The exception which occurs on load. + + + + When this method returns, the component modeled by the subclass should be fully loaded. This + subclass is expected to navigate to an appropriate page or trigger loading the correct HTML + should this be necessary. + + + + + Determine whether or not the component is loaded. Subclasses are expected to provide the details + to determine if the page or component is loaded. + + A boolean value indicating if the component is loaded. + + + + Attempts to load this component, providing an opportunity for the user to handle any errors encountered + during the load process. + + A self-reference to this + + + + Provides a mechanism by which the window handle of an invoked + popup browser window may be determined. + + + + // Store the current window handle so you can switch back to the + // original window when you close the popup. + string current = driver.CurrentWindowHandle; + PopupWindowFinder finder = new PopupWindowFinder(driver); + string newHandle = finder.Click(driver.FindElement(By.LinkText("Open new window"))); + driver.SwitchTo.Window(newHandle); + + + + + + Initializes a new instance of the class. + + The instance that is used + to manipulate the popup window. + When using this constructor overload, the timeout will be 5 seconds, + and the check for a new window will be performed every 250 milliseconds. + + + + Initializes a new instance of the class + with the specified timeout. + + The instance that is used + to manipulate the popup window. + The representing the amount of + time to wait for the popup window to appear. + When using this constructor overload, the check for a new window + will be performed every 250 milliseconds. + + + + Initializes a new instance of the class + with the specified timeout and using the specified interval to check for + the existence of the new window. + + The instance that is used + to manipulate the popup window. + The representing the amount of + time to wait for the popup window to appear. + The representing the + amount of time to wait between checks of the available window handles. + + + + Clicks on an element that is expected to trigger a popup browser window. + + The that, when clicked, invokes + the popup browser window. + The window handle of the popup browser window. + Thrown if no popup window appears within the specified timeout. + Thrown if the element to click is . + + + + Invokes a method that is expected to trigger a popup browser window. + + An that, when run, invokes + the popup browser window. + The window handle of the popup browser window. + Thrown if no popup window appears within the specified timeout. + Thrown if the action to invoke is . + + + + Provides a convenience method for manipulating selections of options in an HTML select element. + + + + + Initializes a new instance of the class. + + The element to be wrapped + Thrown when the object is + Thrown when the element wrapped is not a <select> element. + + + + Gets the wrapped by this object. + + + + + Gets a value indicating whether the parent element supports multiple selections. + + + + + Gets the list of options for the select element. + + + + + Gets the selected item within the select element. + + If more than one item is selected this will return the first item. + Thrown if no option is selected. + + + + Gets all of the selected options within the select element. + + + + + Select all options by the text displayed. + + The text of the option to be selected. + Default value is false. If true a partial match on the Options list will be performed, otherwise exact match. + When given "Bar" this method would select an option like: + + <option value="foo">Bar</option> + + + Thrown if there is no element with the given text present. + + + + Select an option by the value. + + The value of the option to be selected. + When given "foo" this method will select an option like: + + <option value="foo">Bar</option> + + + Thrown when no element with the specified value is found. + + + + Select the option by the index, as determined by the "index" attribute of the element. + + The value of the index attribute of the option to be selected. + Thrown when no element exists with the specified index attribute. + + + + Clear all selected entries. This is only valid when the SELECT supports multiple selections. + + Thrown when attempting to deselect all options from a SELECT + that does not support multiple selections. + + + + Deselect the option by the text displayed. + + Thrown when attempting to deselect option from a SELECT + that does not support multiple selections. + Thrown when no element exists with the specified test attribute. + The text of the option to be deselected. + When given "Bar" this method would deselect an option like: + + <option value="foo">Bar</option> + + + + + + Deselect the option having value matching the specified text. + + Thrown when attempting to deselect option from a SELECT + that does not support multiple selections. + Thrown when no element exists with the specified value attribute. + The value of the option to deselect. + When given "foo" this method will deselect an option like: + + <option value="foo">Bar</option> + + + + + + Deselect the option by the index, as determined by the "index" attribute of the element. + + Thrown when attempting to deselect option from a SELECT + that does not support multiple selections. + Thrown when no element exists with the specified index attribute. + The value of the index attribute of the option to deselect. + + + + A which might not have finished loading when Load() returns. After a + call to Load(), the IsLoaded property should continue to return false until the component has fully + loaded. Use the HandleErrors() method to check for error conditions which caused the Load() to fail. + +
+            new SlowHypotheticalComponent().Load();
+            
+
+
+ The type to be returned (normally the subclass' type) +
+ + + Initializes a new instance of the class. + + The within which the component should be loaded. + + + + Initializes a new instance of the class. + + The within which the component should be loaded. + The to use when measuring the timeout. + + + + Gets or sets the time to sleep between each check of the load status of the component. + + + + + Ensures that the component is currently loaded. + + The loaded component. + This is equivalent to the Get() method in Java version. + + + + Checks for well known error cases, which would mean that loading has finished, but an error + condition was seen. + + + This method should be overridden so that expected errors can be automatically handled. + + + + + The exception thrown when using the Select class on a tag that + does not support the HTML select element's selection semantics. + + + + + Initializes a new instance of the class with + the expected tag name and the actual tag name. + + The tag name that was expected. + The actual tag name of the element. + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with + a specified error message. + + The message of the exception + + + + Initializes a new instance of the class with + a specified error message and a reference to the inner exception that is the + cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, + or if no inner exception is specified. + + + + Initializes a new instance of the class with serialized data. + + The that holds the serialized + object data about the exception being thrown. + The that contains contextual + information about the source or destination. + +
+
diff --git a/src/lib/WebDriver/net45/WebDriver.dll b/src/lib/WebDriver/net45/WebDriver.dll new file mode 100644 index 0000000..41d471f Binary files /dev/null and b/src/lib/WebDriver/net45/WebDriver.dll differ diff --git a/src/lib/WebDriver/net45/WebDriver.xml b/src/lib/WebDriver/net45/WebDriver.xml new file mode 100644 index 0000000..bfcf869 --- /dev/null +++ b/src/lib/WebDriver/net45/WebDriver.xml @@ -0,0 +1,12041 @@ + + + + WebDriver + + + + + Provides a mechanism by which to find elements within a document. + + It is possible to create your own locating mechanisms for finding documents. + In order to do this,subclass this class and override the protected methods. However, + it is expected that that all subclasses rely on the basic finding mechanisms provided + through static methods of this class. An example of this can be found in OpenQA.Support.ByIdOrName + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class using the given functions to find elements. + + A function that takes an object implementing + and returns the found . + A function that takes an object implementing + and returns a of the foundIWebElements. + IWebElements/>. + + + + Gets or sets the value of the description for this class instance. + + + + + Gets or sets the method used to find a single element matching specified criteria. + + + + + Gets or sets the method used to find all elements matching specified criteria. + + + + + Determines if two instances are equal. + + One instance to compare. + The other instance to compare. + + if the two instances are equal; otherwise, . + + + + Determines if two instances are unequal. + s + One instance to compare.The other instance to compare. if the two instances are not equal; otherwise, . + + + Gets a mechanism to find elements by their ID. + + The ID to find. + A object the driver can use to find the elements. + + + + Gets a mechanism to find elements by their link text. + + The link text to find. + A object the driver can use to find the elements. + + + + Gets a mechanism to find elements by their name. + + The name to find. + A object the driver can use to find the elements. + + + + Gets a mechanism to find elements by an XPath query. + When searching within a WebElement using xpath be aware that WebDriver follows standard conventions: + a search prefixed with "//" will search the entire document, not just the children of this current node. + Use ".//" to limit your search to the children of this WebElement. + + The XPath query to use. + A object the driver can use to find the elements. + + + + Gets a mechanism to find elements by their CSS class. + + The CSS class to find. + A object the driver can use to find the elements. + If an element has many classes then this will match against each of them. + For example if the value is "one two onone", then the following values for the + className parameter will match: "one" and "two". + + + + Gets a mechanism to find elements by a partial match on their link text. + + The partial link text to find. + A object the driver can use to find the elements. + + + + Gets a mechanism to find elements by their tag name. + + The tag name to find. + A object the driver can use to find the elements. + + + + Gets a mechanism to find elements by their cascading style sheet (CSS) selector. + + The CSS selector to find. + A object the driver can use to find the elements. + + + + Finds the first element matching the criteria. + + An object to use to search for the elements. + The first matching on the current context. + + + + Finds all elements matching the criteria. + + An object to use to search for the elements. + A of all WebElements + matching the current criteria, or an empty list if nothing matches. + + + + Gets a string representation of the finder. + + The string displaying the finder content. + + + + Determines whether the specified Object is equal + to the current Object. + + The Object to compare with the + current Object. + + if the specified Object + is equal to the current Object; otherwise, + . + + + + Serves as a hash function for a particular type. + + A hash code for the current Object. + + + + Provides a mechanism to write tests against Chrome + + + + [TestFixture] + public class Testing + { + private IWebDriver driver; + + [SetUp] + public void SetUp() + { + driver = new ChromeDriver(); + } + + [Test] + public void TestGoogle() + { + driver.Navigate().GoToUrl("http://www.google.co.uk"); + /* + * Rest of the test + */ + } + + [TearDown] + public void TearDown() + { + driver.Quit(); + } + } + + + + + + Accept untrusted SSL Certificates + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class using the specified options. + + The to be used with the Chrome driver. + + + + Initializes a new instance of the class using the specified driver service. + + The used to initialize the driver. + + + + Initializes a new instance of the class using the specified path + to the directory containing ChromeDriver.exe. + + The full path to the directory containing ChromeDriver.exe. + + + + Initializes a new instance of the class using the specified path + to the directory containing ChromeDriver.exe and options. + + The full path to the directory containing ChromeDriver.exe. + The to be used with the Chrome driver. + + + + Initializes a new instance of the class using the specified path + to the directory containing ChromeDriver.exe, options, and command timeout. + + The full path to the directory containing ChromeDriver.exe. + The to be used with the Chrome driver. + The maximum amount of time to wait for each command. + + + + Initializes a new instance of the class using the specified + and options. + + The to use. + The used to initialize the driver. + + + + Initializes a new instance of the class using the specified . + + The to use. + The to be used with the Chrome driver. + The maximum amount of time to wait for each command. + + + + Gets or sets the responsible for detecting + sequences of keystrokes representing file paths and names. + + The Chrome driver does not allow a file detector to be set, + as the server component of the Chrome driver (ChromeDriver.exe) only + allows uploads from the local computer environment. Attempting to set + this property has no effect, but does not throw an exception. If you + are attempting to run the Chrome driver remotely, use + in conjunction with a standalone WebDriver server. + + + + Gets or sets the network condition emulation for Chrome. + + + + + Executes a custom Chrome command. + + Name of the command to execute. + Parameters of the command to execute. + + + + Exposes the service provided by the native ChromeDriver executable. + + + + + Initializes a new instance of the class. + + The full path to the ChromeDriver executable. + The file name of the ChromeDriver executable. + The port on which the ChromeDriver executable should listen. + + + + Gets or sets the location of the log file written to by the ChromeDriver executable. + + + + + Gets or sets the base URL path prefix for commands (e.g., "wd/url"). + + + + + Gets or sets the address of a server to contact for reserving a port. + + + + + Gets or sets the port on which the Android Debug Bridge is listening for commands. + + + + + Gets or sets a value indicating whether to enable verbose logging for the ChromeDriver executable. + Defaults to . + + + + + Gets or sets the comma-delimited list of IP addresses that are approved to + connect to this instance of the Chrome driver. Defaults to an empty string, + which means only the local loopback address can connect. + + + + + Gets the command-line arguments for the driver service. + + + + + Creates a default instance of the ChromeDriverService. + + A ChromeDriverService that implements default settings. + + + + Creates a default instance of the ChromeDriverService using a specified path to the ChromeDriver executable. + + The directory containing the ChromeDriver executable. + A ChromeDriverService using a random port. + + + + Creates a default instance of the ChromeDriverService using a specified path to the ChromeDriver executable with the given name. + + The directory containing the ChromeDriver executable. + The name of the ChromeDriver executable file. + A ChromeDriverService using a random port. + + + + Returns the Chrome driver filename for the currently running platform + + The file name of the Chrome driver service executable. + + + + Represents the type-safe options for setting settings for emulating a + mobile device in the Chrome browser. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The user agent string to be used by the browser when emulating + a mobile device. + + + + Gets or sets the user agent string to be used by the browser when emulating + a mobile device. + + + + + Gets or sets the width in pixels to be used by the browser when emulating + a mobile device. + + + + + Gets or sets the height in pixels to be used by the browser when emulating + a mobile device. + + + + + Gets or sets the pixel ratio to be used by the browser when emulating + a mobile device. + + + + + Gets or sets a value indicating whether touch events should be enabled by + the browser when emulating a mobile device. Defaults to . + + + + + Provides manipulation of getting and setting network conditions from Chrome. + + + + + Gets or sets a value indicating whether the network is offline. Defaults to . + + + + + Gets or sets the simulated latency of the connection. Typically given in milliseconds. + + + + + Gets or sets the throughput of the network connection in kb/second for downloading. + + + + + Gets or sets the throughput of the network connection in kb/second for uploading. + + + + + Class to manage options specific to + + Used with ChromeDriver.exe v17.0.963.0 and higher. + + + + ChromeOptions options = new ChromeOptions(); + options.AddExtensions("\path\to\extension.crx"); + options.BinaryLocation = "\path\to\chrome"; + + + For use with ChromeDriver: + + + ChromeDriver driver = new ChromeDriver(options); + + + For use with RemoteWebDriver: + + + RemoteWebDriver driver = new RemoteWebDriver(new Uri("http://localhost:4444/wd/hub"), options.ToCapabilities()); + + + + + + Gets the name of the capability used to store Chrome options in + a object. + + + + + Gets or sets the location of the Chrome browser's binary executable file. + + + + + Gets or sets a value indicating whether Chrome should be left running after the + ChromeDriver instance is exited. Defaults to . + + + + + Gets the list of arguments appended to the Chrome command line as a string array. + + + + + Gets the list of extensions to be installed as an array of base64-encoded strings. + + + + + Gets or sets the address of a Chrome debugger server to connect to. + Should be of the form "{hostname|IP address}:port". + + + + + Gets or sets the directory in which to store minidump files. + + + + + Gets or sets the performance logging preferences for the driver. + + + + + Gets or sets a value indicating whether the instance + should use the legacy OSS protocol dialect or a dialect compliant with the W3C + WebDriver Specification. + + + + + Adds a single argument to the list of arguments to be appended to the Chrome.exe command line. + + The argument to add. + + + + Adds arguments to be appended to the Chrome.exe command line. + + An array of arguments to add. + + + + Adds arguments to be appended to the Chrome.exe command line. + + An object of arguments to add. + + + + Adds a single argument to be excluded from the list of arguments passed by default + to the Chrome.exe command line by chromedriver.exe. + + The argument to exclude. + + + + Adds arguments to be excluded from the list of arguments passed by default + to the Chrome.exe command line by chromedriver.exe. + + An array of arguments to exclude. + + + + Adds arguments to be excluded from the list of arguments passed by default + to the Chrome.exe command line by chromedriver.exe. + + An object of arguments to exclude. + + + + Adds a path to a packed Chrome extension (.crx file) to the list of extensions + to be installed in the instance of Chrome. + + The full path to the extension to add. + + + + Adds a list of paths to packed Chrome extensions (.crx files) to be installed + in the instance of Chrome. + + An array of full paths to the extensions to add. + + + + Adds a list of paths to packed Chrome extensions (.crx files) to be installed + in the instance of Chrome. + + An of full paths to the extensions to add. + + + + Adds a base64-encoded string representing a Chrome extension to the list of extensions + to be installed in the instance of Chrome. + + A base64-encoded string representing the extension to add. + + + + Adds a list of base64-encoded strings representing Chrome extensions to the list of extensions + to be installed in the instance of Chrome. + + An array of base64-encoded strings representing the extensions to add. + + + + Adds a list of base64-encoded strings representing Chrome extensions to be installed + in the instance of Chrome. + + An of base64-encoded strings + representing the extensions to add. + + + + Adds a preference for the user-specific profile or "user data directory." + If the specified preference already exists, it will be overwritten. + + The name of the preference to set. + The value of the preference to set. + + + + Adds a preference for the local state file in the user's data directory for Chrome. + If the specified preference already exists, it will be overwritten. + + The name of the preference to set. + The value of the preference to set. + + + + Allows the Chrome browser to emulate a mobile device. + + The name of the device to emulate. The device name must be a + valid device name from the Chrome DevTools Emulation panel. + Specifying an invalid device name will not throw an exeption, but + will generate an error in Chrome when the driver starts. To unset mobile + emulation, call this method with as the argument. + + + + Allows the Chrome browser to emulate a mobile device. + + The + object containing the settings of the device to emulate. + Thrown if the device settings option does + not have a user agent string set. + Specifying an invalid device name will not throw an exeption, but + will generate an error in Chrome when the driver starts. To unset mobile + emulation, call this method with as the argument. + + + + Adds a type of window that will be listed in the list of window handles + returned by the Chrome driver. + + The name of the window type to add. + This method can be used to allow the driver to access {webview} + elements by adding "webview" as a window type. + + + + Adds a list of window types that will be listed in the list of window handles + returned by the Chrome driver. + + An array of window types to add. + + + + Adds a list of window types that will be listed in the list of window handles + returned by the Chrome driver. + + An of window types to add. + + + + Provides a means to add additional capabilities not yet added as type safe options + for the Chrome driver. + + The name of the capability to add. + The value of the capability to add. + + thrown when attempting to add a capability for which there is already a type safe option, or + when is or the empty string. + + Calling + where has already been added will overwrite the + existing value with the new value in . + Also, by default, calling this method adds capabilities to the options object passed to + chromedriver.exe. + + + + Provides a means to add additional capabilities not yet added as type safe options + for the Chrome driver. + + The name of the capability to add. + The value of the capability to add. + Indicates whether the capability is to be set as a global + capability for the driver instead of a Chrome-specific option. + + thrown when attempting to add a capability for which there is already a type safe option, or + when is or the empty string. + + Calling + where has already been added will overwrite the + existing value with the new value in + + + + Returns DesiredCapabilities for Chrome with these options included as + capabilities. This does not copy the options. Further changes will be + reflected in the returned capabilities. + + The DesiredCapabilities for Chrome with these options. + + + + Represents the type-safe options for setting preferences for performance + logging in the Chrome browser. + + + + + Gets or sets a value indicating whether Chrome will collect events from the Network domain. + Defaults to . + + + + + Gets or sets a value indicating whether Chrome will collect events from the Page domain. + Defaults to . + + + + + Gets or sets the interval between Chrome DevTools trace buffer usage events. + Defaults to 1000 milliseconds. + + Thrown when an attempt is made to set + the value to a time span of less tnan or equal to zero milliseconds. + + + + Gets a comma-separated list of the categories for which tracing is enabled. + + + + + Adds a single category to the list of Chrome tracing categories for which events should be collected. + + The category to add. + + + + Adds categories to the list of Chrome tracing categories for which events should be collected. + + An array of categories to add. + + + + Adds categories to the list of Chrome tracing categories for which events should be collected. + + An object of categories to add. + + + + Provides a mechanism to get elements off the page for test + + + + + Initializes a new instance of the class. + + Driver in use + Id of the element + + + + Represents a cookie in the browser. + + + + + Initializes a new instance of the class with a specific name, + value, domain, path and expiration date. + + The name of the cookie. + The value of the cookie. + The domain of the cookie. + The path of the cookie. + The expiration date of the cookie. + If the name is or an empty string, + or if it contains a semi-colon. + If the value is . + + + + Initializes a new instance of the class with a specific name, + value, path and expiration date. + + The name of the cookie. + The value of the cookie. + The path of the cookie. + The expiration date of the cookie. + If the name is or an empty string, + or if it contains a semi-colon. + If the value is . + + + + Initializes a new instance of the class with a specific name, + value, and path. + + The name of the cookie. + The value of the cookie. + The path of the cookie. + If the name is or an empty string, + or if it contains a semi-colon. + If the value is . + + + + Initializes a new instance of the class with a specific name and value. + + The name of the cookie. + The value of the cookie. + If the name is or an empty string, + or if it contains a semi-colon. + If the value is . + + + + Gets the name of the cookie. + + + + + Gets the value of the cookie. + + + + + Gets the domain of the cookie. + + + + + Gets the path of the cookie. + + + + + Gets a value indicating whether the cookie is secure. + + + + + Gets a value indicating whether the cookie is an HTTP-only cookie. + + + + + Gets the expiration date of the cookie. + + + + + Gets the cookie expiration date in seconds from the defined zero date (01 January 1970 00:00:00 UTC). + + This property only exists so that the JSON serializer can serialize a + cookie without resorting to a custom converter. + + + + Converts a Dictionary to a Cookie. + + The Dictionary object containing the cookie parameters. + A object with the proper parameters set. + + + + Creates and returns a string representation of the cookie. + + A string representation of the cookie. + + + + Determines whether the specified Object is equal + to the current Object. + + The Object to compare with the + current Object. + + if the specified Object + is equal to the current Object; otherwise, + . + + + + Serves as a hash function for a particular type. + + A hash code for the current Object. + + + + Represents the default file detector for determining whether a file + must be uploaded to a remote server. + + + + + Returns a value indicating whether a specified key sequence represents + a file name and path. + + The sequence to test for file existence. + This method always returns in this implementation. + + + + Specifies the behavior of handling unexpected alerts in the IE driver. + + + + + Indicates the behavior is not set. + + + + + Ignore unexpected alerts, such that the user must handle them. + + + + + Accept unexpected alerts. + + + + + Dismiss unexpected alerts. + + + + + Accepts unexpected alerts and notifies the user that the alert has + been accepted by throwing an + + + + Dismisses unexpected alerts and notifies the user that the alert has + been dismissed by throwing an + + + + Specifies the behavior of waiting for page loads in the driver. + + + + + Indicates the behavior is not set. + + + + + Waits for pages to load and ready state to be 'complete'. + + + + + Waits for pages to load and for ready state to be 'interactive' or 'complete'. + + + + + Does not wait for pages to load, returning immediately. + + + + + Base class for managing options specific to a browser driver. + + + + + Gets or sets the name of the browser. + + + + + Gets or sets the version of the browser. + + + + + Gets or sets the name of the platform on which the browser is running. + + + + + Gets or sets a value indicating whether the browser should accept self-signed + SSL certificates. + + + + + Gets or sets the value for describing how unexpected alerts are to be handled in the browser. + Defaults to . + + + + + Gets or sets the value for describing how the browser is to wait for pages to load in the browser. + Defaults to . + + + + + Gets or sets the to be used with this browser. + + + + + Provides a means to add additional capabilities not yet added as type safe options + for the specific browser driver. + + The name of the capability to add. + The value of the capability to add. + + thrown when attempting to add a capability for which there is already a type safe option, or + when is or the empty string. + + Calling + where has already been added will overwrite the + existing value with the new value in . + + + + + Returns the for the specific browser driver with these + options included as capabilities. This does not copy the options. Further + changes will be reflected in the returned capabilities. + + The for browser driver with these options. + + + + Compares this object with another to see if there + are merge conflicts between them. + + The object to compare with. + A object containing the status of the attempted merge. + + + + Sets the logging preferences for this driver. + + The type of log for which to set the preference. + Known log types can be found in the class. + The value to which to set the log level. + + + + Returns a string representation of this . + + A string representation of this . + + + + Returns the current options as a . + + The current options as a . + + + + Adds a known capability to the list of known capabilities and associates it + with the type-safe property name of the options class to be used instead. + + The name of the capability. + The name of the option property or method to be used instead. + + + + Gets a value indicating whether the specified capability name is a known capability name which has a type-safe option. + + The name of the capability to check. + + if the capability name is known; otherwise . + + + + Gets the name of the type-safe option for a given capability name. + + The name of the capability to check. + The name of the type-safe option for the given capability name. + + + + Generates the logging preferences dictionary for transmission as a desired capability. + + The dictionary containing the logging preferences. + + + + Generates the current options as a capabilities object for further processing. + + A value indicating whether to generate capabilities compliant with the W3C WebDriver Specification. + A object representing the current options for further processing. + + + + Gets or sets a value indicating whether the DriverOptions would conflict when merged with another option + + + + + Gets or sets the name of the name of the option that is in conflict. + + + + + Provides types of capabilities for the DesiredCapabilities object. + + + + + Capability name used for the browser name. + + + + + Capability name used for the browser version. + + + + + Capability name used for the platform name. + + + + + Capability name used for the browser platform. + + + + + Capability name used for the browser version. + + + + + Capability name used to indicate whether JavaScript is enabled for the browser. + + + + + Capability name used to indicate whether the browser can take screenshots. + + + + + Capability name used to indicate whether the browser can handle alerts. + + + + + Capability name used to indicate whether the browser can find elements via CSS selectors. + + + + + Capability name used for the browser proxy. + + + + + Capability name used to indicate whether the browser supports rotation. + + + + + Capability name used to indicate whether the browser accepts SSL certificates. + + + + + Capability name used to indicate whether the browser accepts SSL certificates on W3C Endpoints + + + + + Capability name used to indicate whether the browser uses native events. + + + + + Capability name used to indicate how the browser handles unexpected alerts. + + + + + Capability name used to indicate how the browser handles unhandled user prompts. + + + + + Capability name used to indicate the page load strategy for the browser. + + + + + Capability name used to indicate the logging preferences for the session. + + + + + Capability name used to disable the check for overlapping elements. + + + + + Capability name used to enable the profiling log for the session. + + + + + Capability name used to indicate whether the driver supports geolocation context. + + + + + Capability name used to indicate whether the driver supports application cache. + + + + + Capability name used to indicate whether the driver supports web storage. + + + + + Capability name used to indicate whether the driver supports setting the browser window's size and position. + + + + + Capability name used to get or set timeout values when creating a session. + + + + + Provides a way to send commands to the remote server + + + + + Initializes a new instance of the class using a command name and a JSON-encoded string for the parameters. + + Name of the command + Parameters for the command as a JSON-encoded string. + + + + Initializes a new instance of the class for a Session + + Session ID the driver is using + Name of the command + Parameters for that command + + + + Gets the SessionID of the command + + + + + Gets the command name + + + + + Gets the parameters of the command + + + + + Gets the parameters of the command as a JSON-encoded string. + + + + + Returns a string of the Command object + + A string representation of the Command Object + + + + Gets the command parameters as a , with a string key, and an object value. + + The JSON-encoded string representing the command parameters. + A with a string keys, and an object value. + + + + Provides the execution information for a . + + + + + POST verb for the command info + + + + + GET verb for the command info + + + + + DELETE verb for the command info + + + + + Initializes a new instance of the class + + Method of the Command + Relative URL path to the resource used to execute the command + + + + Gets the URL representing the path to the resource. + + + + + Gets the HTTP method associated with the command. + + + + + Creates the full URI associated with this command, substituting command + parameters for tokens in the URI template. + + The base URI associated with the command. + The command containing the parameters with which + to substitute the tokens in the template. + The full URI for the command, with the parameters of the command + substituted for the tokens in the template. + + + + Holds the information about all commands specified by the JSON wire protocol. + This class cannot be inherited, as it is intended to be a singleton, and + allowing subclasses introduces the possibility of multiple instances. + + + + + Initializes a new instance of the class. + Protected accessibility prevents a default instance from being created. + + + + + Gets the level of the W3C WebDriver specification that this repository supports. + + + + + Gets the for a . + + The for which to get the information. + The for the specified command. + + + + Tries to add a command to the list of known commands. + + Name of the command. + The command information. + + if the new command has been added successfully; otherwise, . + + This method is used by WebDriver implementations to add additional custom driver-specific commands. + This method will not overwrite existing commands for a specific name, and will return + in that case. + + + + + Initializes the dictionary of commands for the CommandInfoRepository + + + + + Class to Create the capabilities of the browser you require for . + If you wish to use default values use the static methods + + + + + Initializes a new instance of the class + + Name of the browser e.g. firefox, internet explorer, safari + Version of the browser + The platform it works on + + + + Initializes a new instance of the class + + + + + Initializes a new instance of the class + + Dictionary of items for the remote driver + + + DesiredCapabilities capabilities = new DesiredCapabilities(new Dictionary]]>(){["browserName","firefox"],["version",string.Empty],["javaScript",true]}); + + + + + + Initializes a new instance of the class + + Name of the browser e.g. firefox, internet explorer, safari + Version of the browser + The platform it works on + Sets a value indicating whether the capabilities are + compliant with the W3C WebDriver specification. + + + + Gets the browser name + + + + + Gets or sets the platform + + + + + Gets the browser version + + + + + Gets or sets a value indicating whether the browser accepts SSL certificates. + + + + + Gets the underlying Dictionary for a given set of capabilities. + + + + + Gets the underlying Dictionary for a given set of capabilities. + + + + + Gets the capability value with the specified name. + + The name of the capability to get. + The value of the capability. + + The specified capability name is not in the set of capabilities. + + + + + Gets a value indicating whether the browser has a given capability. + + The capability to get. + Returns if the browser has the capability; otherwise, . + + + + Gets a capability of the browser. + + The capability to get. + An object associated with the capability, or + if the capability is not set on the browser. + + + + Sets a capability of the browser. + + The capability to get. + The value for the capability. + + + + Return HashCode for the DesiredCapabilities that has been created + + Integer of HashCode generated + + + + Return a string of capabilities being used + + String of capabilities being used + + + + Compare two DesiredCapabilities and will return either true or false + + DesiredCapabilities you wish to compare + true if they are the same or false if they are not + + + + Returns a read-only version of this capabilities object. + + A read-only version of this capabilities object. + + + + Values describing the list of commands understood by a remote server using the JSON wire protocol. + + + + + Represents the Define Driver Mapping command + + + + + Represents the Status command. + + + + + Represents a New Session command + + + + + Represents the Get Session List command + + + + + Represents the Get Session Capabilities command + + + + + Represents a Browser close command + + + + + Represents a browser quit command + + + + + Represents a GET command + + + + + Represents a Browser going back command + + + + + Represents a Browser going forward command + + + + + Represents a Browser refreshing command + + + + + Represents adding a cookie command + + + + + Represents getting all cookies command + + + + + Represents getting cookie command + + + + + Represents deleting a cookie command + + + + + Represents Deleting all cookies command + + + + + Represents FindElement command + + + + + Represents FindElements command + + + + + Represents FindChildElement command + + + + + Represents FindChildElements command + + + + + Describes an element + + + + + Represents ClearElement command + + + + + Represents ClickElement command + + + + + Represents SendKeysToElements command + + + + + Represents TapElement command + + + + + Represents SubmitElement command + + + + + Represents GetCurrentWindowHandle command + + + + + Represents GetWindowHandles command + + + + + Represents SwitchToWindow command + + + + + Represents SwitchToFrame command + + + + + Represents SwitchToParentFrame command + + + + + Represents GetActiveElement command + + + + + Represents GetCurrentUrl command + + + + + Represents GetPageSource command + + + + + Represents GetTitle command + + + + + Represents ExecuteScript command + + + + + Represents ExecuteAsyncScript command + + + + + Represents GetElementText command + + + + + Represents GetElementTagName command + + + + + Represents IsElementSelected command + + + + + Represents IsElementEnabled command + + + + + Represents IsElementDisplayed command + + + + + Represents GetElementLocation command + + + + + Represents GetElementLocationOnceScrolledIntoView command + + + + + Represents GetElementSize command + + + + + Represents GetElementRect command + + + + + Represents GetElementAttribute command + + + + + Represents GetElementProperty command + + + + + Represents GetElementValueOfCSSProperty command + + + + + Represents ElementEquals command + + + + + Represents Screenshot command + + + + + Represents the ElementScreenshot command + + + + + Represents GetOrientation command + + + + + Represents SetOrientation command + + + + + Represents GetWindowSize command + + + + + Represents SetWindowSize command + + + + + Represents GetWindowPosition command + + + + + Represents SetWindowPosition command + + + + + Represents GetWindowRect command + + + + + Represents SetWindowRect command + + + + + Represents MaximizeWindow command + + + + + Represents MinimizeWindow command + + + + + Represents FullScreenWindow command + + + + + Represents the DismissAlert command + + + + + Represents the AcceptAlert command + + + + + Represents the GetAlertText command + + + + + Represents the SetAlertValue command + + + + + Represents the Authenticate command + + + + + Represents the ImplicitlyWait command + + + + + Represents the SetAsyncScriptTimeout command + + + + + Represents the SetTimeout command + + + + + Represents the SetTimeout command + + + + + Represents the Actions command. + + + + + Represents the CancelActions command. + + + + + Represents the MouseClick command. + + + + + Represents the MouseDoubleClick command. + + + + + Represents the MouseDown command. + + + + + Represents the MouseUp command. + + + + + Represents the MouseMoveTo command. + + + + + Represents the SendKeysToActiveElement command. + + + + + Represents the UploadFile command. + + + + + Represents the TouchSingleTap command. + + + + + Represents the TouchPress command. + + + + + Represents the TouchRelease command. + + + + + Represents the TouchMove command. + + + + + Represents the TouchScroll command. + + + + + Represents the TouchDoubleTap command. + + + + + Represents the TouchLongPress command. + + + + + Represents the TouchFlick command. + + + + + Represents the GetLocation command. + + + + + Represents the SetLocation command. + + + + + Represents the GetAppCache command. + + + + + Represents the application cache GetStatus command. + + + + + Represents the ClearAppCache command. + + + + + Represents the GetLocalStorageItem command. + + + + + Represents the GetLocalStorageKeys command. + + + + + Represents the SetLocalStorageItem command. + + + + + Represents the RemoveLocalStorageItem command. + + + + + Represents the ClearLocalStorage command. + + + + + Represents the GetLocalStorageSize command. + + + + + Represents the GetSessionStorageItem command. + + + + + Represents the GetSessionStorageKeys command. + + + + + Represents the SetSessionStorageItem command. + + + + + Represents the RemoveSessionStorageItem command. + + + + + Represents the ClearSessionStorage command. + + + + + Represents the GetSessionStorageSize command. + + + + + Represents the GetAvailableLogTypes command. + + + + + Represents the GetLog command. + + + + + Provides a mechanism to execute commands on the browser + + + + + Initializes a new instance of the class. + + The that drives the browser. + The maximum amount of time to wait for each command. + + + + Initializes a new instance of the class. + + The that drives the browser. + The maximum amount of time to wait for each command. + + if the KeepAlive header should be sent + with HTTP requests; otherwise, . + + + + Gets the object associated with this executor. + + + + + Gets the that sends commands to the remote + end WebDriver implementation. + + + + + Executes a command + + The command you wish to execute + A response from the browser + + + + Releases all resources used by the . + + + + + Releases the unmanaged resources used by the and + optionally releases the managed resources. + + + to release managed and resources; + to only release unmanaged resources. + + + + Provides a way to store errors from a response + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class using the specified values. + + A containing names and values of + the properties of this . + + + + Gets or sets the message from the response + + + + + Gets or sets the class name that threw the error + + + + + Gets or sets the screenshot of the error + + + + + Gets or sets the stack trace of the error + + + + + Provides a way of executing Commands over HTTP + + + + + Initializes a new instance of the class + + Address of the WebDriver Server + The timeout within which the server must respond. + + + + Initializes a new instance of the class + + Address of the WebDriver Server + The timeout within which the server must respond. + + if the KeepAlive header should be sent + with HTTP requests; otherwise, . + + + + Gets the repository of objects containin information about commands. + + + + + Gets or sets an object to be used to proxy requests + between this and the remote end WebDriver + implementation. + + + + + Gets or sets a value indicating whether keep-alive is enabled for HTTP + communication between this and the + remote end WebDriver implementation. + + + + + Executes a command + + The command you wish to execute + A response from the browser + + + + Raises the event. + + A that contains the event data. + + + + Releases all resources used by the . + + + + + Releases the unmanaged resources used by the and + optionally releases the managed resources. + + + to release managed and resources; + to only release unmanaged resources. + + + + Provides a way to send commands to the remote server + + + + + Gets the repository of objects containin information about commands. + + + + + Executes a command + + The command you wish to execute + A response from the browser + + + + Provides a way to start a server that understands remote commands + + + + + Starts the server. + + + + + Interface indicating the driver has a Session ID. + + + + + Gets the session ID of the current session. + + + + + Provides a way to convert a Char array to JSON + + + + + Checks if the object can be converted + + Type of the object to see if can be converted + True if can be converted else false + + + + Writes the Object to JSON + + A JSON Writer object + Object to be converted + JSON Serializer object instance + + + + Method not implemented + + JSON Reader instance + Object type being read + Existing Value to be read + JSON Serializer instance + Object from JSON + + + + Converts the response to JSON + + + + + Checks if the object can be converted + + The object to be converted + True if it can be converted or false if can't be + + + + Process the reader to return an object from JSON + + A JSON reader + Type of the object + The existing value of the object + JSON Serializer + Object created from JSON + + + + Writes objects to JSON. Currently not implemented + + JSON Writer Object + Value to be written + JSON Serializer + + + + Represents a file detector for determining whether a file + must be uploaded to a remote server. + + + + + Returns a value indicating whether a specified key sequence represents + a file name and path. + + The sequence to test for file existence. + + if the key sequence represents a file; otherwise, . + + + + Class to Create the capabilities of the browser you require for . + If you wish to use default values use the static methods + + + + + Prevents a default instance of the class. + + + + + Gets the browser name + + + + + Gets or sets the platform + + + + + Gets the browser version + + + + + Gets or sets a value indicating whether the browser accepts SSL certificates. + + + + + Gets the underlying Dictionary for a given set of capabilities. + + + + + Gets the underlying Dictionary for a given set of capabilities. + + + + + Gets the capability value with the specified name. + + The name of the capability to get. + The value of the capability. + + The specified capability name is not in the set of capabilities. + + + + + Gets a value indicating whether the browser has a given capability. + + The capability to get. + Returns if the browser has the capability; otherwise, . + + + + Gets a capability of the browser. + + The capability to get. + An object associated with the capability, or + if the capability is not set on the browser. + + + + Converts the object to a . + + The containing the capabilities. + + + + Return HashCode for the DesiredCapabilities that has been created + + Integer of HashCode generated + + + + Return a string of capabilities being used + + String of capabilities being used + + + + Compare two DesiredCapabilities and will return either true or false + + DesiredCapabilities you wish to compare + true if they are the same or false if they are not + + + + Defines the interface through which the user can manipulate JavaScript alerts. + + + + + Initializes a new instance of the class. + + The for which the alerts will be managed. + + + + Gets the text of the alert. + + + + + Dismisses the alert. + + + + + Accepts the alert. + + + + + Sends keys to the alert. + + The keystrokes to send. + + + + Sets the user name and password in an alert prompting for credentials. + + The user name to set. + The password to set. + + + + Defines the interface through which the user can manipulate application cache. + + + + + Initializes a new instance of the class. + + The for which the application cache will be managed. + + + + Gets the current state of the application cache. + + + + + Defines an interface allowing the user to manipulate cookies on the current page. + + + + + Initializes a new instance of the class. + + The driver that is currently in use + + + + Gets all cookies defined for the current page. + + + + + Method for creating a cookie in the browser + + + that represents a cookie in the browser + + + + Delete the cookie by passing in the name of the cookie + + The name of the cookie that is in the browser + + + + Delete a cookie in the browser by passing in a copy of a cookie + + An object that represents a copy of the cookie that needs to be deleted + + + + Delete All Cookies that are present in the browser + + + + + Method for returning a getting a cookie by name + + name of the cookie that needs to be returned + A Cookie from the name + + + + Method for getting a Collection of Cookies that are present in the browser + + ReadOnlyCollection of Cookies in the browser + + + + Defines the interface through which the user can discover where an element is on the screen. + + + + + Initializes a new instance of the class. + + The to be located. + + + + Gets the location of an element in absolute screen coordinates. + + + + + Gets the location of an element relative to the origin of the view port. + + + + + Gets the location of an element's position within the HTML DOM. + + + + + Gets a locator providing a user-defined location for this element. + + + + + Defines the interface through which the user can execute advanced keyboard interactions. + + + + + Initializes a new instance of the class. + + The for which the keyboard will be managed. + + + + Sends a sequence of keystrokes to the target. + + A string representing the keystrokes to send. + + + + Presses a key. + + The key value representing the key to press. + The key value must be one of the values from the class. + + + + Releases a key. + + The key value representing the key to release. + The key value must be one of the values from the class. + + + + Defines the interface through which the user can manipulate local storage. + + + + + Initializes a new instance of the class. + + The for which the application cache will be managed. + + + + Gets the number of items in local storage. + + + + + Returns local storage value given a key. + + The key value for the item in storage. + A local storage value given a key, if present, otherwise returns null. + + + + Returns a read-only list of local storage keys. + + A read-only list of local storage keys. + + + + Sets local storage entry using given key/value pair. + + local storage key + local storage value + + + + Removes local storage entry for the given key. + + key to be removed from the list + Response value for the given key. + + + + Removes all entries from the local storage. + + + + + Defines the interface through which the user can manipulate browser location. + + + + + Initializes a new instance of the class. + + The for which the application cache will be managed. + + + + Gets or sets a value indicating the physical location of the browser. + + + + + Provides a mechanism for examining logs for the driver during the test. + + + + + Initializes a new instance of the class. + + Instance of the driver currently in use + + + + Gets the list of available log types for this driver. + + + + + Gets the set of objects for a specified log. + + The log for which to retrieve the log entries. + Log types can be found in the class. + The list of objects for the specified log. + + + + Defines the interface through which the user can execute advanced mouse interactions. + + + + + Initializes a new instance of the class. + + The for which the mouse will be managed. + + + + Clicks at a set of coordinates using the primary mouse button. + + An describing where to click. + + + + Double-clicks at a set of coordinates. + + A describing where to double-click. + + + + Presses the primary mouse button at a set of coordinates. + + A describing where to press the mouse button down. + + + + Releases the primary mouse button at a set of coordinates. + + A describing where to release the mouse button. + + + + Moves the mouse to the specified set of coordinates. + + A describing where to move the mouse to. + + + + Moves the mouse to the specified set of coordinates. + + A describing where to click. + A horizontal offset from the coordinates specified in . + A vertical offset from the coordinates specified in . + + + + Clicks at a set of coordinates using the secondary mouse button. + + A describing where to click. + + + + Provides a mechanism for Navigating with the driver. + + + + + Initializes a new instance of the class + + Driver in use + + + + Move the browser back + + + + + Move the browser forward + + + + + Navigate to a url for your test + + String of where you want the browser to go to + + + + Navigate to a url for your test + + Uri object of where you want the browser to go to + + + + Refresh the browser + + + + + Provides a mechanism for setting options needed for the driver during the test. + + + + + Initializes a new instance of the class + + Instance of the driver currently in use + + + + Gets an object allowing the user to manipulate cookies on the page. + + + + + Gets an object allowing the user to manipulate the currently-focused browser window. + + "Currently-focused" is defined as the browser window having the window handle + returned when IWebDriver.CurrentWindowHandle is called. + + + + Gets an object allowing the user to examine the logs of the current driver instance. + + + + + Provides access to the timeouts defined for this driver. + + An object implementing the interface. + + + + Defines the interface through which the user can manipulate session storage. + + + + + Initializes a new instance of the class. + + The driver instance. + + + + Gets the number of items in session storage. + + + + + Returns session storage value given a key. + + The key of the item in storage. + A session storage value given a key, if present, otherwise return null. + + + + Returns a read-only list of session storage keys. + + A read-only list of session storage keys. + + + + Sets session storage entry using given key/value pair. + + Session storage key + Session storage value + + + + Removes session storage entry for the given key. + + key to be removed from the list + Response value for the given key. + + + + Removes all entries from the session storage. + + + + + Provides a mechanism for finding elements on the page with locators. + + + + + Initializes a new instance of the class + + The driver that is currently in use + + + + Move to a different frame using its index + + The index of the + A WebDriver instance that is currently in use + + + + Move to different frame using its name + + name of the frame + A WebDriver instance that is currently in use + + + + Move to a frame element. + + a previously found FRAME or IFRAME element. + A WebDriver instance that is currently in use. + + + + Select the parent frame of the currently selected frame. + + An instance focused on the specified frame. + + + + Change to the Window by passing in the name + + Window handle or name of the window that you wish to move to + A WebDriver instance that is currently in use + + + + Change the active frame to the default + + Element of the default + + + + Finds the active element on the page and returns it + + Element that is active + + + + Switches to the currently active modal dialog for this particular driver instance. + + A handle to the dialog. + + + + Defines the interface through which the user can define timeouts. + + + + + Initializes a new instance of the class + + The driver that is currently in use + + + + Gets or sets the implicit wait timeout, which is the amount of time the + driver should wait when searching for an element if it is not immediately + present. + + + When searching for a single element, the driver should poll the page + until the element has been found, or this timeout expires before throwing + a . When searching for multiple elements, + the driver should poll the page until at least one element has been found + or this timeout has expired. + + Increasing the implicit wait timeout should be used judiciously as it + will have an adverse effect on test run time, especially when used with + slower location strategies like XPath. + + + + + Gets or sets the asynchronous script timeout, which is the amount + of time the driver should wait when executing JavaScript asynchronously. + This timeout only affects the + method. + + + + + Gets or sets the page load timeout, which is the amount of time the driver + should wait for a page to load when setting the + property. + + + + + Defines the interface through which the user can execute advanced touch screen interactions. + + + + + Initializes a new instance of the class. + + The for which the touch screen will be managed. + + + + Allows the execution of single tap on the screen, analogous to click using a Mouse. + + The object representing the location on the screen, + usually an . + + + + Allows the execution of the gesture 'down' on the screen. It is typically the first of a + sequence of touch gestures. + + The x coordinate relative to the view port. + The y coordinate relative to the view port. + + + + Allows the execution of the gesture 'up' on the screen. It is typically the last of a + sequence of touch gestures. + + The x coordinate relative to the view port. + The y coordinate relative to the view port. + + + + Allows the execution of the gesture 'move' on the screen. + + The x coordinate relative to the view port. + The y coordinate relative to the view port. + + + + Creates a scroll gesture that starts on a particular screen location. + + The object representing the location on the screen + where the scroll starts, usually an . + The x coordinate relative to the view port. + The y coordinate relative to the view port. + + + + Creates a scroll gesture for a particular x and y offset. + + The horizontal offset relative to the view port. + The vertical offset relative to the view port. + + + + Allows the execution of double tap on the screen, analogous to click using a Mouse. + + The object representing the location on the screen, + usually an . + + + + Allows the execution of a long press gesture on the screen. + + The object representing the location on the screen, + usually an . + + + + Creates a flick gesture for the current view. + + The horizontal speed in pixels per second. + The vertical speed in pixels per second. + + + + Creates a flick gesture for the current view starting at a specific location. + + The object representing the location on the screen + where the scroll starts, usually an . + The x offset relative to the viewport. + The y offset relative to the viewport. + The speed in pixels per second. + + + + Provides a way to use the driver through + + /// + [TestFixture] + public class Testing + { + private IWebDriver driver; + + [SetUp] + public void SetUp() + { + driver = new RemoteWebDriver(new Uri("http://127.0.0.1:4444/wd/hub"),DesiredCapabilities.InternetExplorer()); + } + + [Test] + public void TestGoogle() + { + driver.Navigate().GoToUrl("http://www.google.co.uk"); + /* + * Rest of the test + */ + } + + [TearDown] + public void TearDown() + { + driver.Quit(); + } + } + + + + The default command timeout for HTTP requests in a RemoteWebDriver instance. + + + + + Initializes a new instance of the class. This constructor defaults proxy to http://127.0.0.1:4444/wd/hub + + An object containing the desired capabilities of the browser. + + + + Initializes a new instance of the class. This constructor defaults proxy to http://127.0.0.1:4444/wd/hub + + An object containing the desired capabilities of the browser. + + + + Initializes a new instance of the class. This constructor defaults proxy to http://127.0.0.1:4444/wd/hub + + URI containing the address of the WebDriver remote server (e.g. http://127.0.0.1:4444/wd/hub). + An object containing the desired capabilities of the browser. + + + + Initializes a new instance of the class + + URI containing the address of the WebDriver remote server (e.g. http://127.0.0.1:4444/wd/hub). + An object containing the desired capabilities of the browser. + + + + Initializes a new instance of the class using the specified remote address, desired capabilities, and command timeout. + + URI containing the address of the WebDriver remote server (e.g. http://127.0.0.1:4444/wd/hub). + An object containing the desired capabilities of the browser. + The maximum amount of time to wait for each command. + + + + Initializes a new instance of the class + + An object which executes commands for the driver. + An object containing the desired capabilities of the browser. + + + + Gets or sets the URL the browser is currently displaying. + + + + + + + + Gets the title of the current browser window. + + + + + Gets the source of the page last loaded by the browser. + + + + + Gets the current window handle, which is an opaque handle to this + window that uniquely identifies it within this driver instance. + + + + + Gets the window handles of open browser windows. + + + + + Gets an object for sending keystrokes to the browser. + + + + + Gets an object for sending mouse commands to the browser. + + + + + Gets a value indicating whether web storage is supported for this driver. + + + + + Gets an object for managing web storage. + + + + + Gets a value indicating whether manipulating the application cache is supported for this driver. + + + + + Gets an object for managing application cache. + + + + + Gets a value indicating whether manipulating geolocation is supported for this driver. + + + + + Gets an object for managing browser location. + + + + + Gets the capabilities that the RemoteWebDriver instance is currently using + + + + + Gets or sets the responsible for detecting + sequences of keystrokes representing file paths and names. + + + + + Gets the for the current session of this driver. + + + + + Gets a value indicating whether this object is a valid action executor. + + + + + Gets a value indicating whether or not the driver is compliant with the W3C WebDriver specification. + + + + + Gets the which executes commands for this driver. + + + + + Gets or sets the factory object used to create instances of + or its subclasses. + + + + + Finds the first element in the page that matches the object + + By mechanism to find the object + IWebElement object so that you can interact with that object + + + IWebDriver driver = new InternetExplorerDriver(); + IWebElement elem = driver.FindElement(By.Name("q")); + + + + + + Finds the elements on the page by using the object and returns a ReadOnlyCollection of the Elements on the page + + By mechanism to find the element + ReadOnlyCollection of IWebElement + + + IWebDriver driver = new InternetExplorerDriver(); + ReadOnlyCollection]]> classList = driver.FindElements(By.ClassName("class")); + + + + + + Closes the Browser + + + + + Close the Browser and Dispose of WebDriver + + + + + Method For getting an object to set the Speed + + Returns an IOptions object that allows the driver to set the speed and cookies and getting cookies + + + + IWebDriver driver = new InternetExplorerDriver(); + driver.Manage().GetCookies(); + + + + + + Method to allow you to Navigate with WebDriver + + Returns an INavigation Object that allows the driver to navigate in the browser + + + IWebDriver driver = new InternetExplorerDriver(); + driver.Navigate().GoToUrl("http://www.google.co.uk"); + + + + + + Method to give you access to switch frames and windows + + Returns an Object that allows you to Switch Frames and Windows + + + IWebDriver driver = new InternetExplorerDriver(); + driver.SwitchTo().Frame("FrameName"); + + + + + + Executes JavaScript in the context of the currently selected frame or window + + The JavaScript code to execute. + The arguments to the script. + The value returned by the script. + + + + Executes JavaScript asynchronously in the context of the currently selected frame or window. + + The JavaScript code to execute. + The arguments to the script. + The value returned by the script. + + + + Finds the first element in the page that matches the ID supplied + + ID of the element + IWebElement object so that you can interact with that object + + + IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox()); + IWebElement elem = driver.FindElementById("id") + + + + + + Finds the first element in the page that matches the ID supplied + + ID of the Element + ReadOnlyCollection of Elements that match the object so that you can interact that object + + + IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox()); + ReadOnlyCollection]]> elem = driver.FindElementsById("id") + + + + + + Finds the first element in the page that matches the CSS Class supplied + + className of the + IWebElement object so that you can interact that object + + + IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox()); + IWebElement elem = driver.FindElementByClassName("classname") + + + + + + Finds a list of elements that match the class name supplied + + CSS class Name on the element + ReadOnlyCollection of IWebElement object so that you can interact with those objects + + + IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox()); + ReadOnlyCollection]]> elem = driver.FindElementsByClassName("classname") + + + + + + Finds the first of elements that match the link text supplied + + Link text of element + IWebElement object so that you can interact that object + + + IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox()); + IWebElement elem = driver.FindElementsByLinkText("linktext") + + + + + + Finds a list of elements that match the link text supplied + + Link text of element + ReadOnlyCollection]]> object so that you can interact with those objects + + + IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox()); + ReadOnlyCollection]]> elem = driver.FindElementsByClassName("classname") + + + + + + Finds the first of elements that match the part of the link text supplied + + part of the link text + IWebElement object so that you can interact that object + + + IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox()); + IWebElement elem = driver.FindElementsByPartialLinkText("partOfLink") + + + + + + Finds a list of elements that match the class name supplied + + part of the link text + ReadOnlyCollection]]> objects so that you can interact that object + + + IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox()); + ReadOnlyCollection]]> elem = driver.FindElementsByPartialLinkText("partOfTheLink") + + + + + + Finds the first of elements that match the name supplied + + Name of the element on the page + IWebElement object so that you can interact that object + + + IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox()); + elem = driver.FindElementsByName("name") + + + + + + Finds a list of elements that match the name supplied + + Name of element + ReadOnlyCollect of IWebElement objects so that you can interact that object + + + IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox()); + ReadOnlyCollection]]> elem = driver.FindElementsByName("name") + + + + + + Finds the first of elements that match the DOM Tag supplied + + DOM tag Name of the element being searched + IWebElement object so that you can interact that object + + + IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox()); + IWebElement elem = driver.FindElementsByTagName("tag") + + + + + + Finds a list of elements that match the DOM Tag supplied + + DOM tag Name of element being searched + IWebElement object so that you can interact that object + + + IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox()); + ReadOnlyCollection]]> elem = driver.FindElementsByTagName("tag") + + + + + + Finds the first of elements that match the XPath supplied + + xpath to the element + IWebElement object so that you can interact that object + + + IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox()); + IWebElement elem = driver.FindElementsByXPath("//table/tbody/tr/td/a"); + + + + + + Finds a list of elements that match the XPath supplied + + xpath to the element + ReadOnlyCollection of IWebElement objects so that you can interact that object + + + IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox()); + ReadOnlyCollection]]> elem = driver.FindElementsByXpath("//tr/td/a") + + + + + + Finds the first element matching the specified CSS selector. + + The CSS selector to match. + The first matching the criteria. + + + + Finds all elements matching the specified CSS selector. + + The CSS selector to match. + A containing all + IWebElements matching the criteria. + + + + Gets a object representing the image of the page on the screen. + + A object containing the image. + + + + Dispose the RemoteWebDriver Instance + + + + + Performs the specified list of actions with this action executor. + + The list of action sequences to perform. + + + + Resets the input state of the action executor. + + + + + Escapes invalid characters in a CSS selector. + + The selector to escape. + The selector with invalid characters escaped. + + + + Executes commands with the driver + + Command that needs executing + Parameters needed for the command + WebDriver Response + + + + Find the element in the response + + Response from the browser + Element from the page + + + + Finds the elements that are in the response + + Response from the browser + Collection of elements + + + + Stops the client from running + + if its in the process of disposing + + + + Starts a session with the driver + + Capabilities of the browser + + + + Gets the capabilities as a dictionary supporting legacy drivers. + + The dictionary to return. + A Dictionary consisting of the capabilities requested. + This method is only transitional. Do not rely on it. It will be removed + once browser driver capability formats stabilize. + + + + Gets the capabilities as a dictionary. + + The dictionary to return. + A Dictionary consisting of the capabilities requested. + This method is only transitional. Do not rely on it. It will be removed + once browser driver capability formats stabilize. + + + + Executes a command with this driver . + + A value representing the command to execute. + A containing the names and values of the parameters of the command. + A containing information about the success or failure of the command and any data returned by the command. + + + + Starts the command executor, enabling communication with the browser. + + + + + Stops the command executor, ending further communication with the browser. + + + + + Finds an element matching the given mechanism and value. + + The mechanism by which to find the element. + The value to use to search for the element. + The first matching the given criteria. + + + + Finds all elements matching the given mechanism and value. + + The mechanism by which to find the elements. + The value to use to search for the elements. + A collection of all of the IWebElements matching the given criteria. + + + + Executes JavaScript in the context of the currently selected frame or window using a specific command. + + The JavaScript code to execute. + The name of the command to execute. + The arguments to the script. + The value returned by the script. + + + + Converts the arguments to JavaScript objects. + + The arguments. + The list of the arguments converted to JavaScript objects. + + + + RemoteWebElement allows you to have access to specific items that are found on the page + + + + + + + The property name that represents a web element in the wire protocol. + + + + + The property name that represents a web element in the legacy dialect of the wire protocol. + + + + + Initializes a new instance of the class. + + The instance hosting this element. + The ID assigned to the element. + + + + Gets the used to find this element. + + + + + Gets the tag name of this element. + + + The property returns the tag name of the + element, not the value of the name attribute. For example, it will return + "input" for an element specified by the HTML markup <input name="foo" />. + + Thrown when the target element is no longer valid in the document DOM. + + + + Gets the innerText of this element, without any leading or trailing whitespace, + and with other whitespace collapsed. + + Thrown when the target element is no longer valid in the document DOM. + + + + Gets a value indicating whether or not this element is enabled. + + The property will generally + return for everything except explicitly disabled input elements. + Thrown when the target element is no longer valid in the document DOM. + + + + Gets a value indicating whether or not this element is selected. + + This operation only applies to input elements such as checkboxes, + options in a select element and radio buttons. + Thrown when the target element is no longer valid in the document DOM. + + + + Gets a object containing the coordinates of the upper-left corner + of this element relative to the upper-left corner of the page. + + Thrown when the target element is no longer valid in the document DOM. + + + + Gets a object containing the height and width of this element. + + Thrown when the target element is no longer valid in the document DOM. + + + + Gets a value indicating whether or not this element is displayed. + + The property avoids the problem + of having to parse an element's "style" attribute to determine + visibility of an element. + Thrown when the target element is no longer valid in the document DOM. + + + + Gets the point where the element would be when scrolled into view. + + + + + Gets the coordinates identifying the location of this element using + various frames of reference. + + + + + Gets the internal ID of the element. + + + + + Gets the ID of the element + + This property is internal to the WebDriver instance, and is + not intended to be used in your code. The element's ID has no meaning + outside of internal WebDriver usage, so it would be improper to scope + it as public. However, both subclasses of + and the parent driver hosting the element have a need to access the + internal element ID. Therefore, we have two properties returning the + same value, one scoped as internal, the other as protected. + + + + Clears the content of this element. + + If this element is a text entry element, the + method will clear the value. It has no effect on other elements. Text entry elements + are defined as elements with INPUT or TEXTAREA tags. + Thrown when the target element is no longer valid in the document DOM. + + + + Simulates typing text into the element. + + The text to type into the element. + The text to be typed may include special characters like arrow keys, + backspaces, function keys, and so on. Valid special keys are defined in + . + + Thrown when the target element is not enabled. + Thrown when the target element is not visible. + Thrown when the target element is no longer valid in the document DOM. + + + + Submits this element to the web server. + + If this current element is a form, or an element within a form, + then this will be submitted to the web server. If this causes the current + page to change, then this method will attempt to block until the new page + is loaded. + Thrown when the target element is no longer valid in the document DOM. + + + + Clicks this element. + + + Click this element. If the click causes a new page to load, the + method will attempt to block until the page has loaded. After calling the + method, you should discard all references to this + element unless you know that the element and the page will still be present. + Otherwise, any further operations performed on this element will have an undefined + behavior. + + Thrown when the target element is not enabled. + Thrown when the target element is not visible. + Thrown when the target element is no longer valid in the document DOM. + + + + Gets the value of the specified attribute for this element. + + The name of the attribute. + The attribute's current value. Returns a if the + value is not set. + The method will return the current value + of the attribute, even if the value has been modified after the page has been + loaded. Note that the value of the following attributes will be returned even if + there is no explicit attribute on the element: + Attribute nameValue returned if not explicitly specifiedValid element typescheckedcheckedCheck BoxselectedselectedOptions in Select elementsdisableddisabledInput and other UI elements + Thrown when the target element is no longer valid in the document DOM. + + + + Gets the value of a JavaScript property of this element. + + The name JavaScript the JavaScript property to get the value of. + The JavaScript property's current value. Returns a if the + value is not set or the property does not exist. + Thrown when the target element is no longer valid in the document DOM. + + + + Gets the value of a CSS property of this element. + + The name of the CSS property to get the value of. + The value of the specified CSS property. + The value returned by the + method is likely to be unpredictable in a cross-browser environment. + Color values should be returned as hex strings. For example, a + "background-color" property set as "green" in the HTML source, will + return "#008000" for its value. + Thrown when the target element is no longer valid in the document DOM. + + + + Finds all IWebElements within the current context + using the given mechanism. + + The locating mechanism to use. + A of all WebElements + matching the current criteria, or an empty list if nothing matches. + + + + Finds the first using the given method. + + The locating mechanism to use. + The first matching on the current context. + If no element matches the criteria. + + + + Finds the first of elements that match the link text supplied + + Link text of element + IWebElement object so that you can interact that object + + + IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox()); + IWebElement elem = driver.FindElementByLinkText("linktext") + + + + + + Finds the first of elements that match the link text supplied + + Link text of element + IWebElement object so that you can interact that object + + + IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox()); + ReadOnlyCollection]]> elem = driver.FindElementsByLinkText("linktext") + + + + + + Finds the first element in the page that matches the ID supplied + + ID of the element + IWebElement object so that you can interact with that object + + + IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox()); + IWebElement elem = driver.FindElementById("id") + + + + + + Finds the first element in the page that matches the ID supplied + + ID of the Element + ReadOnlyCollection of Elements that match the object so that you can interact that object + + + IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox()); + ReadOnlyCollection]]> elem = driver.FindElementsById("id") + + + + + + Finds the first of elements that match the name supplied + + Name of the element + IWebElement object so that you can interact that object + + + IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox()); + elem = driver.FindElementsByName("name") + + + + + + Finds a list of elements that match the name supplied + + Name of element + ReadOnlyCollect of IWebElement objects so that you can interact that object + + + IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox()); + ReadOnlyCollection]]> elem = driver.FindElementsByName("name") + + + + + + Finds the first of elements that match the DOM Tag supplied + + tag name of the element + IWebElement object so that you can interact that object + + + IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox()); + IWebElement elem = driver.FindElementsByTagName("tag") + + + + + + Finds a list of elements that match the DOM Tag supplied + + DOM Tag of the element on the page + IWebElement object so that you can interact that object + + + IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox()); + ReadOnlyCollection]]> elem = driver.FindElementsByTagName("tag") + + + + + + Finds the first element in the page that matches the CSS Class supplied + + CSS class name of the element on the page + IWebElement object so that you can interact that object + + + IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox()); + IWebElement elem = driver.FindElementByClassName("classname") + + + + + + Finds a list of elements that match the class name supplied + + CSS class name of the elements on the page + ReadOnlyCollection of IWebElement object so that you can interact with those objects + + + IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox()); + ReadOnlyCollection]]> elem = driver.FindElementsByClassName("classname") + + + + + + Finds the first of elements that match the XPath supplied + + xpath to the element + IWebElement object so that you can interact that object + + + IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox()); + IWebElement elem = driver.FindElementsByXPath("//table/tbody/tr/td/a"); + + + + + + Finds a list of elements that match the XPath supplied + + xpath to element on the page + ReadOnlyCollection of IWebElement objects so that you can interact that object + + + IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox()); + ReadOnlyCollection]]> elem = driver.FindElementsByXpath("//tr/td/a") + + + + + + Finds the first of elements that match the part of the link text supplied + + part of the link text + IWebElement object so that you can interact that object + + + IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox()); + IWebElement elem = driver.FindElementsByPartialLinkText("partOfLink") + + + + + + Finds a list of elements that match the link text supplied + + part of the link text + ReadOnlyCollection]]> objects so that you can interact that object + + + IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox()); + ReadOnlyCollection]]> elem = driver.FindElementsByPartialLinkText("partOfTheLink") + + + + + + Finds the first element matching the specified CSS selector. + + The id to match. + The first matching the criteria. + + + + Finds all elements matching the specified CSS selector. + + The CSS selector to match. + A containing all + IWebElements matching the criteria. + + + + Gets a object representing the image of this element on the screen. + + A object containing the image. + + + + Returns a string that represents the current . + + A string that represents the current . + + + + Method to get the hash code of the element + + Integer of the hash code for the element + + + + Compares if two elements are equal + + Object to compare against + A boolean if it is equal or not + + + + Converts an object into an object that represents an element for the wire protocol. + + A that represents an element in the wire protocol. + + + + Finds a child element matching the given mechanism and value. + + The mechanism by which to find the element. + The value to use to search for the element. + The first matching the given criteria. + + + + Finds all child elements matching the given mechanism and value. + + The mechanism by which to find the elements. + The value to use to search for the elements. + A collection of all of the IWebElements matching the given criteria. + + + + Executes a command on this element using the specified parameters. + + The to execute against this element. + A containing names and values of the parameters for the command. + The object containing the result of the command execution. + + + + Creates a from a dictionary containing a reference to an element. + + The dictionary containing the element reference. + A containing the information from the specified dictionary. + + + + Gets a value indicating wether the specified dictionary represents a reference to a web element. + + The dictionary to check. + + if the dictionary contains an element reference; otherwise, . + + + + Provides remote access to the API. + + + + + Initializes a new instance of the class. + + The driver instance. + + + + Gets the local storage for the site currently opened in the browser. + + + + + Gets the session storage for the site currently opened in the browser. + + + + + Defines the interface through which the user can manipulate the browser window. + + + + + Initializes a new instance of the class. + + Instance of the driver currently in use + + + + Gets or sets the position of the browser window relative to the upper-left corner of the screen. + + When setting this property, it should act as the JavaScript window.moveTo() method. + + + + Gets or sets the size of the outer browser window, including title bars and window borders. + + When setting this property, it should act as the JavaScript window.resizeTo() method. + + + + Maximizes the current window if it is not already maximized. + + + + + Minimizes the current window if it is not already maximized. + + + + + Sets the current window to full screen if it is not already in that state. + + + + + Handles reponses from the browser + + + + + Initializes a new instance of the class + + + + + Initializes a new instance of the class + + Session ID in use + + + + Gets or sets the value from JSON. + + + + + Gets or sets the session ID. + + + + + Gets or sets the status value of the response. + + + + + Gets a value indicating whether this response is compliant with the WebDriver specification. + + + + + Returns a new from a JSON-encoded string. + + The JSON string to deserialize into a . + A object described by the JSON string. + + + + Returns this object as a JSON-encoded string. + + A JSON-encoded string representing this object. + + + + Returns the object as a string. + + A string with the Session ID, status value, and the value from JSON. + + + + Provides a mechanism for maintaining a session for a test + + + + + Initializes a new instance of the class + + Key for the session in use + + + + Get the value of the key + + The key in use + + + + Get the hash code of the key + + The hash code of the key + + + + Compares two Sessions + + Session to compare + True if they are equal or False if they are not + + + + Gives properties to get a stack trace + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class using the given property values. + + A containing the names and values for the properties of this . + + + + Gets or sets the value of the filename in the stack + + + + + Gets or sets the value of the Class name in the stack trace + + + + + Gets or sets the line number + + + + + Gets or sets the Method name in the stack trace + + + + + Gets a string representation of the object. + + A string representation of the object. + + + + Holds the information about all commands specified by the JSON wire protocol. + This class cannot be inherited, as it is intended to be a singleton, and + allowing subclasses introduces the possibility of multiple instances. + + + + + Initializes a new instance of the class. + + + + + Gets the level of the W3C WebDriver specification that this repository supports. + + + + + Initializes the dictionary of commands for the CommandInfoRepository + + + + + Represents an error condition from a remote end using the W3C specification + dialect of the wire protocol. + + + + + Represents the element click intercepted error. + + + + + Represents the element not selectable error. + + + + + Represents the element not interactable error. + + + + + Represents the element not visible error. + + TODO: Remove this string; it is no longer valid in the specification. + + + + Represents the insecure certificate error. + + + + + Represents the invalid argument error. + + + + + Represents the invalid cookie domain error. + + + + + Represents the invalid coordinates error. + + + + + Represents the invalid element coordinates error. + + TODO: Remove this string; it is no longer valid in the specification. + + + + Represents the invalid element state error. + + + + + Represents the invalid selector error. + + + + + Represents the invalid session ID error. + + + + + Represents the unhandled JavaScript error. + + + + + Represents the move target out of bounds error. + + + + + Represents the no such alert error. + + + + + Represents the no such cookie error. + + + + + Represents the no such element error. + + + + + Represents the no such alert frame. + + + + + Represents the no such alert window. + + + + + Represents the script timeout error. + + + + + Represents the session not created error. + + + + + Represents the stale element reference error. + + + + + Represents the timeout error. + + + + + Represents the unable to set cookie error. + + + + + Represents the unable to capture screen error. + + + + + Represents the unexpected alert open error. + + + + + Represents the unknown command error. + + + + + Represents an unknown error. + + + + + Represents the unknown method error. + + + + + Represents the unsupported operation error. + + + + + Converts a string error to a value. + + The error string to convert. + The converted value. + + + + Holds the information about all commands specified by the JSON wire protocol. + This class cannot be inherited, as it is intended to be a singleton, and + allowing subclasses introduces the possibility of multiple instances. + + + + + Initializes a new instance of the class. + + + + + Gets the level of the W3C WebDriver specification that this repository supports. + + + + + Initializes the dictionary of commands for the CommandInfoRepository + + + + + Exposes the service provided by a native WebDriver server executable. + + + + + Initializes a new instance of the class. + + The full path to the directory containing the executable providing the service to drive the browser. + The port on which the driver executable should listen. + The file name of the driver service executable. + A URL at which the driver service executable may be downloaded. + + If the path specified is or an empty string. + + + If the specified driver service executable does not exist in the specified directory. + + + + + Gets the Uri of the service. + + + + + Gets or sets the host name of the service. Defaults to "localhost." + + + Most driver service executables do not allow connections from remote + (non-local) machines. This property can be used as a workaround so + that an IP address (like "127.0.0.1" or "::1") can be used instead. + + + + + Gets or sets the port of the service. + + + + + Gets or sets a value indicating whether the initial diagnostic information is suppressed + when starting the driver server executable. Defaults to , meaning + diagnostic information should be shown by the driver server executable. + + + + + Gets a value indicating whether the service is running. + + + + + Gets or sets a value indicating whether the command prompt window of the service should be hidden. + + + + + Gets the process ID of the running driver service executable. Returns 0 if the process is not running. + + + + + Gets the executable file name of the driver service. + + + + + Gets the command-line arguments for the driver service. + + + + + Gets a value indicating the time to wait for an initial connection before timing out. + + + + + Gets a value indicating the time to wait for the service to terminate before forcing it to terminate. + + + + + Gets a value indicating whether the service has a shutdown API that can be called to terminate + it gracefully before forcing a termination. + + + + + Gets a value indicating whether the service is responding to HTTP requests. + + + + + Releases all resources associated with this . + + + + + Starts the DriverService. + + + + + Finds the specified driver service executable. + + The file name of the executable to find. + A URL at which the driver service executable may be downloaded. + The directory containing the driver service executable. + + If the specified driver service executable does not exist in the current directory or in a directory on the system path. + + + + + Releases all resources associated with this . + + + if the Dispose method was explicitly called; otherwise, . + + + + Stops the DriverService. + + + + + Waits until a the service is initialized, or the timeout set + by the property is reached. + + + if the service is properly started and receiving HTTP requests; + otherwise; . + + + + The exception that is thrown when an element is not visible. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with + a specified error message. + + The message that describes the error. + + + + Initializes a new instance of the class with + a specified error message and a reference to the inner exception that is the + cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, + or if no inner exception is specified. + + + + Initializes a new instance of the class with serialized data. + + The that holds the serialized + object data about the exception being thrown. + The that contains contextual + information about the source or destination. + + + + Provides a mechanism to write tests against Edge + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class using the specified options. + + The to be used with the Edge driver. + + + + Initializes a new instance of the class using the specified driver service. + + The used to initialize the driver. + + + + Initializes a new instance of the class using the specified path + to the directory containing EdgeDriver.exe. + + The full path to the directory containing EdgeDriver.exe. + + + + Initializes a new instance of the class using the specified path + to the directory containing EdgeDriver.exe and options. + + The full path to the directory containing EdgeDriver.exe. + The to be used with the Edge driver. + + + + Initializes a new instance of the class using the specified path + to the directory containing EdgeDriver.exe, options, and command timeout. + + The full path to the directory containing EdgeDriver.exe. + The to be used with the Edge driver. + The maximum amount of time to wait for each command. + + + + Initializes a new instance of the class using the specified + and options. + + The to use. + The used to initialize the driver. + + + + Initializes a new instance of the class using the specified . + + The to use. + The to be used with the Edge driver. + The maximum amount of time to wait for each command. + + + + Exposes the service provided by the native MicrosoftWebDriver executable. + + + + + Initializes a new instance of the class. + + The full path to the EdgeDriver executable. + The file name of the EdgeDriver executable. + The port on which the EdgeDriver executable should listen. + + + + Gets or sets the value of the host adapter on which the Edge driver service should listen for connections. + + + + + Gets or sets the value of the package the Edge driver service will launch and automate. + + + + + Gets or sets a value indicating whether the service should use verbose logging. + + + + + Gets or sets a value indicating whether the instance + should use the a protocol dialect compliant with the W3C WebDriver Specification. + + + Setting this property to a non- value for driver + executables matched to versions of Windows before the 2018 Fall Creators + Update will result in a the driver executable shutting down without + execution, and all commands will fail. Do not set this property unless + you are certain your version of the MicrosoftWebDriver.exe supports the + --w3c and --jwp command-line arguments. + + + + + Gets a value indicating whether the service has a shutdown API that can be called to terminate + it gracefully before forcing a termination. + + + + + Gets a value indicating the time to wait for the service to terminate before forcing it to terminate. + + + + + Gets the command-line arguments for the driver service. + + + + + Creates a default instance of the EdgeDriverService. + + A EdgeDriverService that implements default settings. + + + + Creates a default instance of the EdgeDriverService using a specified path to the EdgeDriver executable. + + The directory containing the EdgeDriver executable. + A EdgeDriverService using a random port. + + + + Creates a default instance of the EdgeDriverService using a specified path to the EdgeDriver executable with the given name. + + The directory containing the EdgeDriver executable. + The name of the EdgeDriver executable file. + A EdgeDriverService using a random port. + + + + Creates a default instance of the EdgeDriverService using a specified path to the EdgeDriver executable with the given name and listening port. + + The directory containing the EdgeDriver executable. + The name of the EdgeDriver executable file + The port number on which the driver will listen + A EdgeDriverService using the specified port. + + + + Specifies the behavior of waiting for page loads in the Edge driver. + + + + + Indicates the behavior is not set. + + + + + Waits for pages to load and ready state to be 'complete'. + + + + + Waits for pages to load and for ready state to be 'interactive' or 'complete'. + + + + + Does not wait for pages to load, returning immediately. + + + + + Class to manage options specific to + + + EdgeOptions options = new EdgeOptions(); + + + For use with EdgeDriver: + + + EdgeDriver driver = new EdgeDriver(options); + + + For use with RemoteWebDriver: + + + RemoteWebDriver driver = new RemoteWebDriver(new Uri("http://localhost:4444/wd/hub"), options.ToCapabilities()); + + + + + + Gets or sets a value indicating whether the browser should be launched using + InPrivate browsing. + + + + + Gets or sets the URL of the page with which the browser will be navigated to on launch. + + + + + Adds a path to an extension that is to be used with the Edge driver. + + The full path and file name of the extension. + + + + Adds a list of paths to an extensions that are to be used with the Edge driver. + + An array of full paths with file names of extensions to add. + + + + Adds a list of paths to an extensions that are to be used with the Edge driver. + + An of full paths with file names of extensions to add. + + + + Provides a means to add additional capabilities not yet added as type safe options + for the Edge driver. + + The name of the capability to add. + The value of the capability to add. + + thrown when attempting to add a capability for which there is already a type safe option, or + when is or the empty string. + + Calling where + has already been added will overwrite the existing value with the new value in + + + + Returns DesiredCapabilities for Edge with these options included as + capabilities. This copies the options. Further changes will not be + reflected in the returned capabilities. + + The DesiredCapabilities for Edge with these options. + + + + Provides a mechanism to get elements off the page for test + + + + + Initializes a new instance of the class + + Driver in use + Id of the element + + + + The exception that is thrown when an element is not visible. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with + a specified error message. + + The message that describes the error. + + + + Initializes a new instance of the class with + a specified error message and a reference to the inner exception that is the + cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, + or if no inner exception is specified. + + + + Initializes a new instance of the class with serialized data. + + The that holds the serialized + object data about the exception being thrown. + The that contains contextual + information about the source or destination. + + + + The exception that is thrown when an element is not visible. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with + a specified error message. + + The message that describes the error. + + + + Initializes a new instance of the class with + a specified error message and a reference to the inner exception that is the + cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, + or if no inner exception is specified. + + + + Initializes a new instance of the class with serialized data. + + The that holds the serialized + object data about the exception being thrown. + The that contains contextual + information about the source or destination. + + + + The exception that is thrown when an element is not visible. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with + a specified error message. + + The message that describes the error. + + + + Initializes a new instance of the class with + a specified error message and a reference to the inner exception that is the + cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, + or if no inner exception is specified. + + + + Initializes a new instance of the class with serialized data. + + The that holds the serialized + object data about the exception being thrown. + The that contains contextual + information about the source or destination. + + + + The exception that is thrown when an element is not visible. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with + a specified error message. + + The message that describes the error. + + + + Initializes a new instance of the class with + a specified error message and a reference to the inner exception that is the + cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, + or if no inner exception is specified. + + + + Initializes a new instance of the class with serialized data. + + The that holds the serialized + object data about the exception being thrown. + The that contains contextual + information about the source or destination. + + + + Represents the binary associated with Firefox. + + The class is responsible for instantiating the + Firefox process, and the operating system environment in which it runs. + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class located at a specific file location. + + Full path and file name to the Firefox executable. + + + + Gets or sets the timeout to wait for Firefox to be available for command execution. + + + + + Gets the associated with this . + + + + + Gets a value indicating whether the current operating system is Linux. + + + + + Gets a containing string key-value pairs + representing any operating system environment variables beyond the defaults. + + + + + Starts Firefox using the specified profile and command-line arguments. + + The to use with this instance of Firefox. + The command-line arguments to use in starting Firefox. + + + + Sets a variable to be used in the Firefox execution environment. + + The name of the environment variable to set. + The value of the environment variable to set. + + + + Waits for the process to complete execution. + + + + + Releases all resources used by the . + + + + + Returns a String that represents the current Object. + + A String that represents the current Object. + + + + Starts the Firefox process. + + + + + Releases the unmanaged resources used by the and optionally + releases the managed resources. + + + to release managed and resources; + to only release unmanaged resources. + + + + Provides a way to access Firefox to run tests. + + + When the FirefoxDriver object has been instantiated the browser will load. The test can then navigate to the URL under test and + start your test. + + In the case of the FirefoxDriver, you can specify a named profile to be used, or you can let the + driver create a temporary, anonymous profile. A custom extension allowing the driver to communicate + to the browser will be installed into the profile. + + + + [TestFixture] + public class Testing + { + private IWebDriver driver; + + [SetUp] + public void SetUp() + { + driver = new FirefoxDriver(); + } + + [Test] + public void TestGoogle() + { + driver.Navigate().GoToUrl("http://www.google.co.uk"); + /* + * Rest of the test + */ + } + + [TearDown] + public void TearDown() + { + driver.Quit(); + } + } + + + + + + The name of the ICapabilities setting to use to define a custom Firefox profile. + + + + + The name of the ICapabilities setting to use to define a custom location for the + Firefox executable. + + + + + The default port on which to communicate with the Firefox extension. + + + + + Indicates whether native events is enabled by default for this platform. + + + + + Indicates whether the driver will accept untrusted SSL certificates. + + + + + Indicates whether the driver assume the issuer of untrusted certificates is untrusted. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class using the specified options. Uses the Mozilla-provided Marionette driver implementation. + + The to be used with the Firefox driver. + + + + Initializes a new instance of the class using the specified driver service. Uses the Mozilla-provided Marionette driver implementation. + + The used to initialize the driver. + + + + Initializes a new instance of the class using the specified path + to the directory containing geckodriver.exe. + + The full path to the directory containing geckodriver.exe. + + + + Initializes a new instance of the class using the specified path + to the directory containing geckodriver.exe and options. + + The full path to the directory containing geckodriver.exe. + The to be used with the Firefox driver. + + + + Initializes a new instance of the class using the specified path + to the directory containing geckodriver.exe, options, and command timeout. + + The full path to the directory containing geckodriver.exe. + The to be used with the Firefox driver. + The maximum amount of time to wait for each command. + + + + Initializes a new instance of the class using the specified options, driver service, and timeout. Uses the Mozilla-provided Marionette driver implementation. + + The to use. + The to be used with the Firefox driver. + + + + Initializes a new instance of the class using the specified options, driver service, and timeout. Uses the Mozilla-provided Marionette driver implementation. + + The to use. + The to be used with the Firefox driver. + The maximum amount of time to wait for each command. + + + + Gets or sets the responsible for detecting + sequences of keystrokes representing file paths and names. + + The Firefox driver does not allow a file detector to be set, + as the server component of the Firefox driver only allows uploads from + the local computer environment. Attempting to set this property has no + effect, but does not throw an exception. If you are attempting to run + the Firefox driver remotely, use in + conjunction with a standalone WebDriver server. + + + + Gets a value indicating whether the Firefox driver instance uses + Mozilla's Marionette implementation. This is a temporary property + and will be removed when Marionette is available for the release + channel of Firefox. + + + + + In derived classes, the method prepares the environment for test execution. + + + + + Provides a way of executing Commands using the FirefoxDriver. + + + + + Initializes a new instance of the class. + + The on which to make the connection. + The creating the connection. + The name of the host on which to connect to the Firefox extension (usually "localhost"). + The maximum amount of time to wait for each command. + + + + Gets the repository of objects containin information about commands. + + + + + Executes a command + + The command you wish to execute + A response from the browser + + + + Releases all resources used by the . + + + + + Releases the unmanaged resources used by the and + optionally releases the managed resources. + + + to release managed and resources; + to only release unmanaged resources. + + + + Represents the valid values of logging levels available with the Firefox driver (geckodriver.exe). + + + + + Represents the Trace value, the most detailed logging level available. + + + + + Represents the Debug value + + + + + Represents the Config value + + + + + Represents the Info value + + + + + Represents the Warn value + + + + + Represents the Error value + + + + + Represents the Fatal value, the least detailed logging level available. + + + + + Represents that the logging value is unspecified, and should be the default level. + + + + + Provides methods for launching Firefox with the WebDriver extension installed. + + + + + Initializes a new instance of the class. + + The on which to make the connection. + The creating the connection. + The name of the host on which to connect to the Firefox extension (usually "localhost"). + + + + Gets the for communicating with this server. + + + + + Starts the server. + + + + + Releases all resources used by the . + + + + + Releases the unmanaged resources used by the and optionally + releases the managed resources. + + + to release managed and resources; + to only release unmanaged resources. + + + + Exposes the service provided by the native FirefoxDriver executable. + + + + + Initializes a new instance of the class. + + The full path to the Firefox driver executable. + The file name of the Firefox driver executable. + The port on which the Firefox driver executable should listen. + + + + Gets or sets the location of the Firefox binary executable. + + + + + Gets or sets the port used by the driver executable to communicate with the browser. + + + + + Gets or sets the value of the IP address of the host adapter on which the + service should listen for connections. + + + + + Gets or sets a value indicating whether to connect to an already-running + instance of Firefox. + + + + + Gets or sets a value indicating whether to open the Firefox Browser Toolbox + when Firefox is launched. + + + + + Gets a value indicating the time to wait for an initial connection before timing out. + + + + + Gets a value indicating the time to wait for the service to terminate before forcing it to terminate. + + + + + Gets a value indicating whether the service has a shutdown API that can be called to terminate + it gracefully before forcing a termination. + + + + + Gets the command-line arguments for the driver service. + + + + + Creates a default instance of the FirefoxDriverService. + + A FirefoxDriverService that implements default settings. + + + + Creates a default instance of the FirefoxDriverService using a specified path to the Firefox driver executable. + + The directory containing the Firefox driver executable. + A FirefoxDriverService using a random port. + + + + Creates a default instance of the FirefoxDriverService using a specified path to the Firefox driver executable with the given name. + + The directory containing the Firefox driver executable. + The name of the Firefox driver executable file. + A FirefoxDriverService using a random port. + + + + Returns the Firefox driver filename for the currently running platform + + The file name of the Firefox driver service executable. + + + + Provides the ability to install extensions into a . + + + + + Initializes a new instance of the class. + + The name of the file containing the Firefox extension. + WebDriver attempts to resolve the parameter + by looking first for the specified file in the directory of the calling assembly, + then using the full path to the file, if a full path is provided. + + + + Initializes a new instance of the class. + + The name of the file containing the Firefox extension. + The ID of the resource within the assembly containing the extension + if the file is not present in the file system. + WebDriver attempts to resolve the parameter + by looking first for the specified file in the directory of the calling assembly, + then using the full path to the file, if a full path is provided. If the file is + not found in the file system, WebDriver attempts to locate a resource in the + executing assembly with the name specified by the + parameter. + + + + Installs the extension into a profile directory. + + The Firefox profile directory into which to install the extension. + + + + Class to manage options specific to + + Used with the marionette executable wires.exe. + + + + FirefoxOptions options = new FirefoxOptions(); + + + For use with FirefoxDriver: + + + FirefoxDriver driver = new FirefoxDriver(options); + + + For use with RemoteWebDriver: + + + RemoteWebDriver driver = new RemoteWebDriver(new Uri("http://localhost:4444/wd/hub"), options.ToCapabilities()); + + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class for the given profile and binary. + + The to use in the options. + The to use in the options. + The to copy into the options. + + + + Gets or sets a value indicating whether to use the legacy driver implementation. + + + + + Gets or sets the object to be used with this instance. + + + + + Gets or sets the path and file name of the Firefox browser executable. + + + + + Gets or sets the logging level of the Firefox driver. + + + + + Adds an argument to be used in launching the Firefox browser. + + The argument to add. + Arguments must be preceeded by two dashes ("--"). + + + + Adds a list arguments to be used in launching the Firefox browser. + + An array of arguments to add. + Each argument must be preceeded by two dashes ("--"). + + + + Adds a list arguments to be used in launching the Firefox browser. + + An array of arguments to add. + Each argument must be preceeded by two dashes ("--"). + + + + Sets a preference in the profile used by Firefox. + + Name of the preference to set. + Value of the preference to set. + + + + Sets a preference in the profile used by Firefox. + + Name of the preference to set. + Value of the preference to set. + + + + Sets a preference in the profile used by Firefox. + + Name of the preference to set. + Value of the preference to set. + + + + Sets a preference in the profile used by Firefox. + + Name of the preference to set. + Value of the preference to set. + + + + Sets a preference in the profile used by Firefox. + + Name of the preference to set. + Value of the preference to set. + + + + Provides a means to add additional capabilities not yet added as type safe options + for the Firefox driver. + + The name of the capability to add. + The value of the capability to add. + + thrown when attempting to add a capability for which there is already a type safe option, or + when is or the empty string. + + Calling + where has already been added will overwrite the + existing value with the new value in . + Also, by default, calling this method adds capabilities to the options object passed to + geckodriver.exe. + + + + Provides a means to add additional capabilities not yet added as type safe options + for the Firefox driver. + + The name of the capability to add. + The value of the capability to add. + Indicates whether the capability is to be set as a global + capability for the driver instead of a Firefox-specific option. + + thrown when attempting to add a capability for which there is already a type safe option, or + when is or the empty string. + + Calling + where has already been added will overwrite the + existing value with the new value in + + + + Returns DesiredCapabilities for Firefox with these options included as + capabilities. This does not copy the options. Further changes will be + reflected in the returned capabilities. + + The DesiredCapabilities for Firefox with these options. + + + + Provides the ability to edit the preferences associated with a Firefox profile. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class using a + specific profile directory. + + The directory containing the profile. + + + + Initializes a new instance of the class using a + specific profile directory. + + The directory containing the profile. + Delete the source directory of the profile upon cleaning. + + + + Gets or sets the port on which the profile connects to the WebDriver extension. + + + + + Gets the directory containing the profile. + + + + + Gets or sets a value indicating whether to delete this profile after use with + the . + + + + + Gets or sets a value indicating whether native events are enabled. + + + + + Gets or sets a value indicating whether to always load the library for allowing Firefox + to execute commands without its window having focus. + + The property is only used on Linux. + + + + Gets or sets a value indicating whether Firefox should accept SSL certificates which have + expired, signed by an unknown authority or are generally untrusted. Set to true + by default. + + + + + Gets or sets a value indicating whether Firefox assume untrusted SSL certificates + come from an untrusted issuer or are self-signed. Set to true by default. + + + + Due to limitations within Firefox, it is easy to find out if a certificate has expired + or does not match the host it was served for, but hard to find out if the issuer of the + certificate is untrusted. By default, it is assumed that the certificates were not + issued from a trusted certificate authority. + + + If you receive an "untrusted site" prompt it Firefox when using a certificate that was + issued by valid issuer, but the certificate has expired or is being served served for + a different host (e.g. production certificate served in a testing environment) set this + to false. + + + + + + Converts a base64-encoded string into a . + + The base64-encoded string containing the profile contents. + The constructed . + + + + Adds a Firefox Extension to this profile + + The path to the new extension + + + + Sets a preference in the profile. + + The name of the preference to add. + A value to add to the profile. + + + + Sets a preference in the profile. + + The name of the preference to add. + A value to add to the profile. + + + + Sets a preference in the profile. + + The name of the preference to add. + A value to add to the profile. + + + + Set proxy preferences for this profile. + + The object defining the proxy + preferences for the profile. + + + + Writes this in-memory representation of a profile to disk. + + + + + Cleans this Firefox profile. + + If this profile is a named profile that existed prior to + launching Firefox, the method removes the WebDriver + Firefox extension. If the profile is an anonymous profile, the profile + is deleted. + + + + Converts the profile into a base64-encoded string. + + A base64-encoded string containing the contents of the profile. + + + + Adds the WebDriver extension for Firefox to the profile. + + + + + Removes the WebDriver extension for Firefox to the profile, for use with non-legacy + FirefoxDriver instances that use geckodriver. + + + + + Internal implementation to set proxy preferences for this profile. + + The object defining the proxy + preferences for the profile. + + + + Generates a random directory name for the profile. + + A random directory name for the profile. + + + + Deletes the lock files for a profile. + + + + + Installs all extensions in the profile in the directory on disk. + + + + + Deletes the cache of extensions for this profile, if the cache exists. + + If the extensions cache does not exist for this profile, the + method performs no operations, but + succeeds. + + + + Writes the user preferences to the profile. + + + + + Reads the existing preferences from the profile. + + A containing key-value pairs representing the preferences. + Assumes that we only really care about the preferences, not the comments + + + + Sets a preference for a manually specified proxy. + + The protocol for which to set the proxy. + The setting for the proxy. + + + + Allows the user to enumerate and access existing named Firefox profiles. + + + + + Initializes a new instance of the class. + + + + + Gets a containing FirefoxProfiles + representing the existing named profiles for Firefox. + + + + + Gets a with a given name. + + The name of the profile to get. + A with a given name. + Returns if no profile with the given name exists. + + + + Allows the user to control elements on a page in Firefox. + + + + + Initializes a new instance of the class. + + The instance hosting this element. + The ID assigned to the element. + + + + Determines whether two instances are equal. + + The to compare with the current . + + if the specified is equal to the + current ; otherwise, . + + + + Serves as a hash function for a . + + A hash code for the current . + + + + Represents the executable file for Firefox. + + + + + Initializes a new instance of the class. + + The path and file name to the Firefox executable. + + + + Gets the full path to the executable. + + + + + Sets the library path for the Firefox executable environment. + + The used to execute the binary. + + + + Locates the Firefox binary by platform. + + The full path to the binary. + + + + Retrieves an environment variable + + Name of the variable. + Default value of the variable. + The value of the variable. If no variable with that name is set, returns the default. + + + + Retrieves the platform specific environment property name which contains the library path. + + The platform specific environment property name which contains the library path. + + + + Walk a PATH to locate binaries with a specified name. Binaries will be searched for in the + order they are provided. + + The binary names to search for. + The first binary found matching that name. + + + + Defines the interface through which the mutex port for establishing communication + with the WebDriver extension can be locked. + + + + + Locks the mutex port. + + The describing the amount of time to wait for + the mutex port to become available. + + + + Unlocks the mutex port. + + + + + Parses and reads an INI file. + + + + + Initializes a new instance of the class. + + The full path to the .INI file to be read. + + + + Gets a containing the names of the sections in the .INI file. + + + + + Gets a value from the .INI file. + + The section in which to find the key-value pair. + The key of the key-value pair. + The value associated with the given section and key. + + + + Provides a mutex-like lock on a socket. + + + + + Initializes a new instance of the class. + + Port to use to acquire the lock. + The class will attempt to acquire the + specified port number, and wait for it to become free. + + + + Locks the mutex port. + + The describing the amount of time to wait for + the mutex port to become available. + + + + Unlocks the mutex port. + + + + + Releases all resources associated with this + + + + Represents the preferences used by a profile in Firefox. + + + + + Initializes a new instance of the class. + + A set of preferences that cannot be modified once set. + A set of default preferences. + + + + Sets a preference. + + The name of the preference to set. + A value give the preference. + If the preference already exists in the currently-set list of preferences, + the value will be updated. + + + + Sets a preference. + + The name of the preference to set. + A value give the preference. + If the preference already exists in the currently-set list of preferences, + the value will be updated. + + + + Sets a preference. + + The name of the preference to set. + A value give the preference. + If the preference already exists in the currently-set list of preferences, + the value will be updated. + + + + Gets a preference from the list of preferences. + + The name of the preference to retrieve. + The value of the preference, or an empty string if the preference is not set. + + + + Appends this set of preferences to the specified set of preferences. + + A dictionary containing the preferences to which to + append these values. + If the preference already exists in , + the value will be updated. + + + + Writes the preferences to a file. + + The full path to the file to be written. + + + + Represents the application cache status. + + + + + AppCache status is uncached + + + + + AppCache status is idle + + + + + AppCache status is checkint + + + + + AppCache status is downloading + + + + + AppCache status is updated-ready + + + + + AppCache status is obsolete + + + + + Defines an interface allowing the user to access application cache status + + + + + Gets the current state of the application cache. + + + + + Interface allowing the user to determine if the driver instance supports application cache. + + + + + Gets a value indicating whether manipulating the application cache is supported for this driver. + + + + + Gets an object for managing application cache. + + + + + Interface allowing the user to determine if the driver instance supports geolocation. + + + + + Gets a value indicating whether manipulating geolocation is supported for this driver. + + + + + Gets an object for managing browser location. + + + + + Interface allowing the user to determine if the driver instance supports web storage. + + + + + Gets a value indicating whether web storage is supported for this driver. + + + + + Gets an object for managing web storage. + + + + + Represents the local storage for the site currently opened in the browser. + Each site has its own separate storage area. + + + + + Gets the number of items in local storage. + + + + + Returns value of the local storage given a key. + + key to for a local storage entry + Value of the local storage entry as given a key. + + + + Returns the set of keys associated with local storage. + + Returns the set of keys associated with local storage as . + + + + Adds key/value pair to local storage. + + storage key + storage value + + + + Removes key/value pair from local storage. + + key to remove from storage + Value from local storage as string for the given key. + + + + Clears local storage. + + + + + Interface for location context + + + + + Gets or sets a value indicating the physical location of the browser. + + + + + Represents the session storage for the site currently opened in the browser. + Each site has its own separate storage area. + + + + + Gets the number of items in session storage. + + + + + Returns value of the session storage given a key. + + key to for a session storage entry + Value of the session storage entry as given a key. + + + + Returns the set of keys associated with session storage. + + Returns the set of keys associated with session storage as . + + + + Adds key/value pair to session storage. + + storage key + storage value + + + + Removes key/value pair from session storage. + + key to remove from storage + Value from session storage as string for the given key. + + + + Clears local storage. + + + + + Represents both local and session storage for the site currently opened in the browser. + + + + + Gets the local storage for the site currently opened in the browser. + + + + + Gets the session storage for the site currently opened in the browser. + + + + + Represents the physical location of the browser. + + + + + Initializes a new instance of the class. + + latitude for current location + longitude for current location + altitude for current location + + + + Gets the latitude of the current location. + + + + + Gets the longitude of the current location. + + + + + Gets the altitude of the current location. + + + + + Retuns string represenation for current location. + + Returns string reprsentation for current location. + + + + Defines the interface through which the user can manipulate JavaScript alerts. + + + + + Gets the text of the alert. + + + + + Dismisses the alert. + + + + + Accepts the alert. + + + + + Sends keys to the alert. + + The keystrokes to send. + + + + Sets the user name and password in an alert prompting for credentials. + + The user name to set. + The password to set. + + + + Interface determining whether the driver implementation allows detection of files + when sending keystrokes to a file upload element. + + + + + Gets or sets the responsible for detecting + sequences of keystrokes representing file paths and names. + + + + + Capabilities of the browser that you are going to use + + + + + Gets the capability value with the specified name. + + The name of the capability to get. + The value of the capability. + + The specified capability name is not in the set of capabilities. + + + + + Gets a value indicating whether the browser has a given capability. + + The capability to get. + Returns if the browser has the capability; otherwise, . + + + + Gets a capability of the browser. + + The capability to get. + An object associated with the capability, or + if the capability is not set on the browser. + + + + Defines an interface allowing the user to manipulate cookies on the current page. + + + + + Gets all cookies defined for the current page. + + + + + Adds a cookie to the current page. + + The object to be added. + + + + Gets a cookie with the specified name. + + The name of the cookie to retrieve. + The containing the name. Returns + if no cookie with the specified name is found. + + + + Deletes the specified cookie from the page. + + The to be deleted. + + + + Deletes the cookie with the specified name from the page. + + The name of the cookie to be deleted. + + + + Deletes all cookies from the page. + + + + + Provides a way to access Internet Explorer to run your tests by creating a InternetExplorerDriver instance + + + When the WebDriver object has been instantiated the browser will load. The test can then navigate to the URL under test and + start your test. + + + + [TestFixture] + public class Testing + { + private IWebDriver driver; + + [SetUp] + public void SetUp() + { + driver = new InternetExplorerDriver(); + } + + [Test] + public void TestGoogle() + { + driver.Navigate().GoToUrl("http://www.google.co.uk"); + /* + * Rest of the test + */ + } + + [TearDown] + public void TearDown() + { + driver.Quit(); + driver.Dispose(); + } + } + + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with the desired + options. + + The used to initialize the driver. + + + + Initializes a new instance of the class using the specified driver service. + + The used to initialize the driver. + + + + Initializes a new instance of the class using the specified path + to the directory containing IEDriverServer.exe. + + The full path to the directory containing IEDriverServer.exe. + + + + Initializes a new instance of the class using the specified path + to the directory containing IEDriverServer.exe and options. + + The full path to the directory containing IEDriverServer.exe. + The used to initialize the driver. + + + + Initializes a new instance of the class using the specified path + to the directory containing IEDriverServer.exe, options, and command timeout. + + The full path to the directory containing IEDriverServer.exe. + The used to initialize the driver. + The maximum amount of time to wait for each command. + + + + Initializes a new instance of the class using the specified + and options. + + The to use. + The used to initialize the driver. + + + + Initializes a new instance of the class using the specified + , , and command timeout. + + The to use. + The used to initialize the driver. + The maximum amount of time to wait for each command. + + + + Gets or sets the responsible for detecting + sequences of keystrokes representing file paths and names. + + The IE driver does not allow a file detector to be set, + as the server component of the IE driver (IEDriverServer.exe) only + allows uploads from the local computer environment. Attempting to set + this property has no effect, but does not throw an exception. If you + are attempting to run the IE driver remotely, use + in conjunction with a standalone WebDriver server. + + + + Gets the capabilities as a dictionary supporting legacy drivers. + + The dictionary to return. + A Dictionary consisting of the capabilities requested. + This method is only transitional. Do not rely on it. It will be removed + once browser driver capability formats stabilize. + + + + Represents the valid values of logging levels available with the IEDriverServer.exe. + + + + + Represents the Trace value, the most detailed logging level available. + + + + + Represents the Debug value + + + + + Represents the Info value + + + + + Represents the Warn value + + + + + Represents the Error value + + + + + Represents the Fatal value, the least detailed logging level available. + + + + + Exposes the service provided by the native IEDriverServer executable. + + + + + Initializes a new instance of the class. + + The full path to the IEDriverServer executable. + The file name of the IEDriverServer executable. + The port on which the IEDriverServer executable should listen. + + + + Gets or sets the value of the host adapter on which the IEDriverServer should listen for connections. + + + + + Gets or sets the location of the log file written to by the IEDriverServer. + + + + + Gets or sets the logging level used by the IEDriverServer. + + + + + Gets or sets the path to which the supporting library of the IEDriverServer.exe is extracted. + Defaults to the temp directory if this property is not set. + + + The IEDriverServer.exe requires extraction of a supporting library to perform some of its functions. Setting + This library is extracted to the temp directory if this property is not set. If the property is set, it must + be set to a valid directory. + + + + + Gets or sets the comma-delimited list of IP addresses that are approved to + connect to this instance of the IEDriverServer. Defaults to an empty string, + which means only the local loopback address can connect. + + + + + Gets the command-line arguments for the driver service. + + + + + Creates a default instance of the InternetExplorerDriverService. + + A InternetExplorerDriverService that implements default settings. + + + + Creates a default instance of the InternetExplorerDriverService using a specified path to the IEDriverServer executable. + + The directory containing the IEDriverServer executable. + A InternetExplorerDriverService using a random port. + + + + Creates a default instance of the InternetExplorerDriverService using a specified path to the IEDriverServer executable with the given name. + + The directory containing the IEDriverServer executable. + The name of the IEDriverServer executable file. + A InternetExplorerDriverService using a random port. + + + + Specifies the scroll behavior of elements scrolled into view in the IE driver. + + + + + Indicates the behavior is unspecified. + + + + + Scrolls elements to align with the top of the viewport. + + + + + Scrolls elements to align with the bottom of the viewport. + + + + + Class to manage options specific to + + + InternetExplorerOptions options = new InternetExplorerOptions(); + options.IntroduceInstabilityByIgnoringProtectedModeSettings = true; + + + For use with InternetExplorerDriver: + + + InternetExplorerDriver driver = new InternetExplorerDriver(options); + + + For use with RemoteWebDriver: + + + RemoteWebDriver driver = new RemoteWebDriver(new Uri("http://localhost:4444/wd/hub"), options.ToCapabilities()); + + + + + + Gets the name of the capability used to store IE options in + a object. + + + + + Gets or sets a value indicating whether to ignore the settings of the Internet Explorer Protected Mode. + + + + + Gets or sets a value indicating whether to ignore the zoom level of Internet Explorer . + + + + + Gets or sets a value indicating whether to use native events in interacting with elements. + + + + + Gets or sets a value indicating whether to require the browser window to have focus before interacting with elements. + + + + + Gets or sets the initial URL displayed when IE is launched. If not set, the browser launches + with the internal startup page for the WebDriver server. + + + By setting the to + and this property to a correct URL, you can launch IE in the Internet Protected Mode zone. This can be helpful + to avoid the flakiness introduced by ignoring the Protected Mode settings. Nevertheless, setting Protected Mode + zone settings to the same value in the IE configuration is the preferred method. + + + + + Gets or sets the value for describing how elements are scrolled into view in the IE driver. Defaults + to scrolling the element to the top of the viewport. + + + + + Gets or sets a value indicating whether to enable persistently sending WM_MOUSEMOVE messages + to the IE window during a mouse hover. + + + + + Gets or sets the amount of time the driver will attempt to look for a newly launched instance + of Internet Explorer. + + + + + Gets or sets the amount of time the driver will attempt to look for the file selection + dialog when attempting to upload a file. + + + + + Gets or sets a value indicating whether to force the use of the Windows CreateProcess API + when launching Internet Explorer. The default value is . + + + + + Gets or sets a value indicating whether to force the use of the Windows ShellWindows API + when attaching to Internet Explorer. The default value is . + + + + + Gets or sets the command line arguments used in launching Internet Explorer when the + Windows CreateProcess API is used. This property only has an effect when the + is . + + + + + Gets or sets a value indicating whether to use the supplied + settings on a per-process basis, not updating the system installed proxy setting. + This property is only valid when setting a , where the + property is either , + , or , and is + otherwise ignored. Defaults to . + + + + + Gets or sets a value indicating whether to clear the Internet Explorer cache + before launching the browser. When set to , clears the + system cache for all instances of Internet Explorer, even those already running + when the driven instance is launched. Defaults to . + + + + + Provides a means to add additional capabilities not yet added as type safe options + for the Internet Explorer driver. + + The name of the capability to add. + The value of the capability to add. + + thrown when attempting to add a capability for which there is already a type safe option, or + when is or the empty string. + + Calling + where has already been added will overwrite the + existing value with the new value in . + Also, by default, calling this method adds capabilities to the options object passed to + IEDriverServer.exe. + + + + Provides a means to add additional capabilities not yet added as type safe options + for the Internet Explorer driver. + + The name of the capability to add. + The value of the capability to add. + Indicates whether the capability is to be set as a global + capability for the driver instead of a IE-specific option. + + thrown when attempting to add a capability for which there is already a type safe option, or + when is or the empty string. + + Calling where + has already been added will overwrite the existing value with the new value in + + + + Returns DesiredCapabilities for IE with these options included as + capabilities. This copies the options. Further changes will not be + reflected in the returned capabilities. + + The DesiredCapabilities for IE with these options. + + + + InternetExplorerWebElement allows you to have access to specific items that are found on the page. + + + + + + [Test] + public void TestGoogle() + { + driver = new InternetExplorerDriver(); + InternetExplorerWebElement elem = driver.FindElement(By.Name("q")); + elem.SendKeys("Cheese please!"); + } + + + + + + Initializes a new instance of the class. + + Driver in use. + ID of the element. + + + + Defines an object responsible for detecting sequences of keystrokes + representing file paths and names. + + + + + Returns a value indicating whether a specified key sequence represents + a file name and path. + + The sequence to test for file existence. + + if the key sequence represents a file; otherwise, . + + + + Defines the interface through which the user can determine the capabilities of a driver. + + + + + Gets the object describing the driver's capabilities. + + + + + Provides access to input devices for advanced user interactions. + + + + + Gets an object for sending keystrokes to the browser. + + + + + Gets an object for sending mouse commands to the browser. + + + + + Interface implemented by each driver that allows access to touch screen capabilities. + + + + + Gets the device representing the touch screen. + + + + + Defines the interface through which the user can execute JavaScript. + + + + + Executes JavaScript in the context of the currently selected frame or window. + + The JavaScript code to execute. + The arguments to the script. + The value returned by the script. + + + The method executes JavaScript in the context of + the currently selected frame or window. This means that "document" will refer + to the current document. If the script has a return value, then the following + steps will be taken: + + + + + For an HTML element, this method returns a + + + For a number, a is returned + + + For a boolean, a is returned + + + For all other cases a is returned. + + + For an array,we check the first element, and attempt to return a + of that type, following the rules above. Nested lists are not + supported. + + + If the value is null or there is no return value, + is returned. + + + + + Arguments must be a number (which will be converted to a ), + a , a or a . + An exception will be thrown if the arguments do not meet these criteria. + The arguments will be made available to the JavaScript via the "arguments" magic + variable, as if the function were called via "Function.apply" + + + + + + Executes JavaScript asynchronously in the context of the currently selected frame or window. + + The JavaScript code to execute. + The arguments to the script. + The value returned by the script. + + + + Provides methods representing basic keyboard actions. + + + + + Sends a sequence of keystrokes to the target. + + A string representing the keystrokes to send. + + + + Presses a key. + + The key value representing the key to press. + The key value must be one of the values from the class. + + + + Releases a key. + + The key value representing the key to release. + The key value must be one of the values from the class. + + + + Defines the interface through which the user can discover where an element is on the screen. + + + + + Gets the location of an element on the screen, scrolling it into view + if it is not currently on the screen. + + + + + Gets the coordinates identifying the location of this element using + various frames of reference. + + + + + Interface allowing handling of driver logs. + + + + + Gets the list of available log types for this driver. + + + + + Gets the set of objects for a specified log. + + The log for which to retrieve the log entries. + Log types can be found in the class. + The list of objects for the specified log. + + + + Provides methods representing basic mouse actions. + + + + + Clicks at a set of coordinates using the primary mouse button. + + An describing where to click. + + + + Double-clicks at a set of coordinates. + + A describing where to double-click. + + + + Presses the primary mouse button at a set of coordinates. + + A describing where to press the mouse button down. + + + + Releases the primary mouse button at a set of coordinates. + + A describing where to release the mouse button. + + + + Moves the mouse to the specified set of coordinates. + + A describing where to move the mouse to. + + + + Moves the mouse to the specified set of coordinates. + + A describing where to click. + A horizontal offset from the coordinates specified in . + A vertical offset from the coordinates specified in . + + + + Clicks at a set of coordinates using the secondary mouse button. + + A describing where to click. + + + + Defines an interface allowing the user to access the browser's history and to + navigate to a given URL. + + + + + Move back a single entry in the browser's history. + + + + + Move a single "item" forward in the browser's history. + + Does nothing if we are on the latest page viewed. + + + + Load a new web page in the current browser window. + + The URL to load. It is best to use a fully qualified URL + + Calling the method will load a new web page in the current browser window. + This is done using an HTTP GET operation, and the method will block until the + load is complete. This will follow redirects issued either by the server or + as a meta-redirect from within the returned HTML. Should a meta-redirect "rest" + for any duration of time, it is best to wait until this timeout is over, since + should the underlying page change while your test is executing the results of + future calls against this interface will be against the freshly loaded page. + + + + + Load a new web page in the current browser window. + + The URL to load. + + Calling the method will load a new web page in the current browser window. + This is done using an HTTP GET operation, and the method will block until the + load is complete. This will follow redirects issued either by the server or + as a meta-redirect from within the returned HTML. Should a meta-redirect "rest" + for any duration of time, it is best to wait until this timeout is over, since + should the underlying page change while your test is executing the results of + future calls against this interface will be against the freshly loaded page. + + + + + Refreshes the current page. + + + + + Provides methods that allow the creation of action sequences to enable + advanced user interactions. + + + + + Adds an action to the built set of actions. Adding an action will + add a "tick" to the set of all actions to be executed. + + The action to add to the set of actions + A self reference. + + + + Adds an action to the built set of actions. Adding an action will + add a "tick" to the set of all actions to be executed. Only one action + for each input device may be added for a single tick. + + The set actions to add to the existing set of actions. + A self reference. + + + + Converts the set of actions in this to a . + + A suitable for transmission across the wire. + The collection returned is read-only. + + + + Returns a string that represents the current . + + A string that represents the current . + + + + Provides values that indicate from where element offsets for MoveToElement + are calculated. + + + + + Offsets are calculated from the top-left corner of the element. + + + + + Offsets are calcuated from the center of the element. + + + + + Provides a mechanism for building advanced interactions with the browser. + + + + + Initializes a new instance of the class. + + The object on which the actions built will be performed. + + + + Sends a modifier key down message to the browser. + + The key to be sent. + A self-reference to this . + If the key sent is not is not one + of , , , + , ,, + ,. + + + + Sends a modifier key down message to the specified element in the browser. + + The element to which to send the key command. + The key to be sent. + A self-reference to this . + If the key sent is not is not one + of , , , + , ,, + ,. + + + + Sends a modifier key up message to the browser. + + The key to be sent. + A self-reference to this . + If the key sent is not is not one + of , , , + , ,, + ,. + + + + Sends a modifier up down message to the specified element in the browser. + + The element to which to send the key command. + The key to be sent. + A self-reference to this . + If the key sent is not is not one + of , , , + , ,, + ,. + + + + Sends a sequence of keystrokes to the browser. + + The keystrokes to send to the browser. + A self-reference to this . + + + + Sends a sequence of keystrokes to the specified element in the browser. + + The element to which to send the keystrokes. + The keystrokes to send to the browser. + A self-reference to this . + + + + Clicks and holds the mouse button down on the specified element. + + The element on which to click and hold. + A self-reference to this . + + + + Clicks and holds the mouse button at the last known mouse coordinates. + + A self-reference to this . + + + + Releases the mouse button on the specified element. + + The element on which to release the button. + A self-reference to this . + + + + Releases the mouse button at the last known mouse coordinates. + + A self-reference to this . + + + + Clicks the mouse on the specified element. + + The element on which to click. + A self-reference to this . + + + + Clicks the mouse at the last known mouse coordinates. + + A self-reference to this . + + + + Double-clicks the mouse on the specified element. + + The element on which to double-click. + A self-reference to this . + + + + Double-clicks the mouse at the last known mouse coordinates. + + A self-reference to this . + + + + Moves the mouse to the specified element. + + The element to which to move the mouse. + A self-reference to this . + + + + Moves the mouse to the specified offset of the top-left corner of the specified element. + + The element to which to move the mouse. + The horizontal offset to which to move the mouse. + The vertical offset to which to move the mouse. + A self-reference to this . + + + + Moves the mouse to the specified offset of the top-left corner of the specified element. + + The element to which to move the mouse. + The horizontal offset to which to move the mouse. + The vertical offset to which to move the mouse. + The value from which to calculate the offset. + A self-reference to this . + + + + Moves the mouse to the specified offset of the last known mouse coordinates. + + The horizontal offset to which to move the mouse. + The vertical offset to which to move the mouse. + A self-reference to this . + + + + Right-clicks the mouse on the specified element. + + The element on which to right-click. + A self-reference to this . + + + + Right-clicks the mouse at the last known mouse coordinates. + + A self-reference to this . + + + + Performs a drag-and-drop operation from one element to another. + + The element on which the drag operation is started. + The element on which the drop is performed. + A self-reference to this . + + + + Performs a drag-and-drop operation on one element to a specified offset. + + The element on which the drag operation is started. + The horizontal offset to which to move the mouse. + The vertical offset to which to move the mouse. + A self-reference to this . + + + + Builds the sequence of actions. + + A composite which can be used to perform the actions. + + + + Performs the currently built action. + + + + + Gets the instance of the specified . + + The to get the location of. + The of the . + + + + Adds an action to current list of actions to be performed. + + The to be added. + + + + Represents a sequence of actions to be performed in the target browser. + + + + + Initializes a new instance of the class. + + The input device that executes this sequence of actions. + + + + Initializes a new instance of the class. + + The input device that executes this sequence of actions. + the initial size of the sequence. + + + + Gets the count of actions in the sequence. + + + + + Adds an action to the sequence. + + The action to add to the sequence. + A self-reference to this sequence of actions. + + + + Converts this action sequence into an object suitable for serializing across the wire. + + A containing the actions in this sequence. + + + + Returns a string that represents the current . + + A string that represents the current . + + + + Defines an action for releasing the currently held mouse button. + + + This action can be called for an element different than the one + ClickAndHoldAction was called for. However, if this action is + performed out of sequence (without holding down the mouse button, + for example) the results will be different. + + + + + Initializes a new instance of the class. + + The with which the action will be performed. + An describing an element at which to perform the action. + + + + Performs this action. + + + + + Defines an action for clicking on an element. + + + + + Initializes a new instance of the class. + + The with which the action will be performed. + An describing an element at which to perform the action. + + + + Performs this action. + + + + + Defines an action for clicking and holding the mouse button on an element. + + + + + Initializes a new instance of the class. + + The with which the action will be performed. + An describing an element at which to perform the action. + + + + Performs this action. + + + + + Defines an action that consists of a list of other actions to be performed in the browser. + + + + + Adds an action to the list of actions to be performed. + + An to be appended to the + list of actions to be performed. + A self reference. + + + + Performs the actions defined in this list of actions. + + + + + Defines an action for clicking the secondary mouse button on an element, displaying a context menu. + + + + + Initializes a new instance of the class. + + The with which the action will be performed. + An describing an element at which to perform the action. + + + + Performs this action. + + + + + Defines an action for double-clicking on an element. + + + + + Initializes a new instance of the class. + + The with which the action will be performed. + An describing an element at which to perform the action. + + + + Performs this action. + + + + + Creates a double tap gesture on a touch screen. + + + + + Initializes a new instance of the class. + + The with which the action will be performed. + An describing an element at which to perform the action. + + + + Performs the action. + + + + + Creates a flick gesture on a touch screen. + + + + + Initializes a new instance of the class. + + The with which the action will be performed. + The horizontal speed in pixels per second. + The vertical speed in pixels per second. + + + + Initializes a new instance of the class for use with the specified element. + + The with which the action will be performed. + An describing an element at which to perform the action. + The x offset relative to the viewport. + The y offset relative to the viewport. + The speed in pixels per second. + + + + Performs the action. + + + + + Provides methods by which an interaction with the browser can be performed. + + + + + Performs this action on the browser. + + + + + Provides location of the element using various frames of reference. + + + + + Gets the location of an element in absolute screen coordinates. + + + + + Gets the location of an element relative to the origin of the view port. + + + + + Gets the location of an element's position within the HTML DOM. + + + + + Gets a locator providing a user-defined location for this element. + + + + + Defines an action for keyboard interaction with the browser. + + + + + Initializes a new instance of the class. + + The to use in performing the action. + The to use in setting focus to the element on which to perform the action. + An object providing the element on which to perform the action. + + + + Gets the keyboard with which to perform the action. + + + + + Focuses on the element on which the action is to be performed. + + + + + Defines an action for mouse interaction with the browser. + + + + + Initializes a new instance of the class. + + The with which the action will be performed. + An describing an element at which to perform the action. + + + + Gets the coordinates at which to perform the mouse action. + + + + + Gets the mouse with which to perform the action. + + + + + Moves the mouse to the location at which to perform the action. + + + + + Defines an action for keyboard interaction with the browser using a single modifier key. + + + + + Initializes a new instance of the class. + + The to use in performing the action. + The to use in setting focus to the element on which to perform the action. + An object providing the element on which to perform the action. + The modifier key (, , ) to use in the action. + + + + Gets the key with which to perform the action. + + + + + Defines an action for keyboard interaction with the browser. + + + + + Initializes a new instance of the class. + + The to use in performing the action. + An object providing the element on which to perform the action. + + + + Gets the touch screen with which to perform the action. + + + + + Gets the location at which to perform the action. + + + + + Defines an action for keyboard and mouse interaction with the browser. + + + + + Initializes a new instance of the class for the given element. + + An object that provides coordinates for this action. + + + + Initializes a new instance of the class. + + This action will take place in the context of the previous action's coordinates. + + + + Gets the target of the action providing coordinates of the action. + + + + + Base class for all input devices for actions. + + + + + Initializes a new instance of the class. + + The unique name of the input device represented by this class. + + + + Gets the unique name of this input device. + + + + + Gets the kind of device for this input device. + + + + + Returns a value for this input device that can be transmitted across the wire to a remote end. + + A representing this action. + + + + Creates a pause action for synchronization with other action sequences. + + The representing the action. + + + + Creates a pause action for synchronization with other action sequences. + + A representing the duration + of the pause. Note that pauses to synchronize + with other action sequences for other devices. + The representing the action. + + + + Returns a hash code for the current . + + A hash code for the current . + + + + Returns a string that represents the current . + + A string that represents the current . + + + + Enumerated values for the kinds of devices available. + + + + + Represents the null device. + + + + + Represents a key-based device, primarily for entering text. + + + + + Represents a pointer-based device, such as a mouse, pen, or stylus. + + + + + Represents a single interaction for a given input device. + + + + + Initializes a new instance of the class. + + The input device which performs this action. + + + + Gets the device for which this action is intended. + + + + + Returns a value for this action that can be transmitted across the wire to a remote end. + + A representing this action. + + + + Gets a value indicating whether this action is valid for the specified type of input device. + + The type of device to check. + + if the action is valid for the specified type of input device; + otherwise, . + + + + Defines an action for pressing a modifier key (Shift, Alt, or Control) on the keyboard. + + + + + Initializes a new instance of the class. + + The to use in performing the action. + The to use in setting focus to the element on which to perform the action. + An object providing the element on which to perform the action. + The modifier key (, , , + , ,, + ,) to use in the action. + + + + Performs this action. + + + + + Represents a key input device, such as a keyboard. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class, given the device's name. + + The unique name of this input device. + + + + Gets the type of device for this input device. + + + + + Converts this input device into an object suitable for serializing across the wire. + + A representing this input device. + + + + Creates a key-down action for simulating a press of a key. + + The unicode character to be sent. + The representing the action. + + + + Creates a key-up action for simulating a release of a key. + + The unicode character to be sent. + The representing the action. + + + + Defines an action for releasing a modifier key (Shift, Alt, or Control) on the keyboard. + + + + + Initializes a new instance of the class. + + The to use in performing the action. + The to use in setting focus to the element on which to perform the action. + An object providing the element on which to perform the action. + The modifier key (, , , + , ,, + ,) to use in the action. + + + + Performs this action. + + + + + Creates a long press gesture on a touch screen. + + + + + Initializes a new instance of the class. + + The with which the action will be performed. + An describing an element at which to perform the action. + + + + Performs the action. + + + + + Defines an action for moving the mouse to a specified location. + + + + + Initializes a new instance of the class. + + The with which the action will be performed. + An describing an element at which to perform the action. + + + + Performs this action. + + + + + Defines an action for moving the mouse to a specified offset from its current location. + + + + + Initializes a new instance of the class. + + The with which the action will be performed. + An describing an element at which to perform the action. + The horizontal offset from the origin of the target to which to move the mouse. + The vertical offset from the origin of the target to which to move the mouse. + + + + Performs this action. + + + + + Represents a pause action. + + + + + Initializes a new instance of the class. + + The input device on which to execute the pause. + + + + Initializes a new instance of the class. + + The input device on which to execute the pause. + The length of time to pause for. + + + + Returns a value for this action that can be transmitted across the wire to a remote end. + + A representing this action. + + + + Gets a value indicating whether this action is valid for the specified type of input device. + + The type of device to check. + + if the action is valid for the specified type of input device; + otherwise, . + + + + Represents the origin of the coordinates for mouse movement. + + + + + The coordinate origin is the origin of the view port of the browser. + + + + + The origin of the movement is the most recent pointer location. + + + + + The origin of the movement is the center of the element specified. + + + + + Specifies the type of pointer a pointer device represents. + + + + + The pointer device is a mouse. + + + + + The pointer device is a pen or stylus. + + + + + The pointer device is a touch screen device. + + + + + Specifies the button used during a pointer down or up action. + + + + + The button used is the primary button. + + + + + The button used is the middle button or mouse wheel. + + + + + The button used is the secondary button. + + + + + Represents a pointer input device, such as a stylus, mouse, or finger on a touch screen. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The kind of pointer represented by this input device. + + + + Initializes a new instance of the class. + + The kind of pointer represented by this input device. + The unique name for this input device. + + + + Gets the type of device for this input device. + + + + + Returns a value for this input device that can be transmitted across the wire to a remote end. + + A representing this action. + + + + Creates a pointer down action. + + The button of the pointer that should be pressed. + The action representing the pointer down gesture. + + + + Creates a pointer up action. + + The button of the pointer that should be released. + The action representing the pointer up gesture. + + + + Creates a pointer move action to a specific element. + + The used as the target for the move. + The horizontal offset from the origin of the move. + The vertical offset from the origin of the move. + The length of time the move gesture takes to complete. + The action representing the pointer move gesture. + + + + Creates a pointer move action to an absolute coordinate. + + The origin of coordinates for the move. Values can be relative to + the view port origin, or the most recent pointer position. + The horizontal offset from the origin of the move. + The vertical offset from the origin of the move. + The length of time the move gesture takes to complete. + The action representing the pointer move gesture. + Thrown when passing CoordinateOrigin.Element into origin. + Users should us the other CreatePointerMove overload to move to a specific element. + + + + Creates a pointer cancel action. + + The action representing the pointer cancel gesture. + + + + Presses a touch screen at a given location. + + + + + Initializes a new instance of the class. + + The with which the action will be performed. + The x coordinate relative to the view port. + The y coordinate relative to the view port. + + + + Performs the action. + + + + + Presses a touch screen at a given location. + + + + + Initializes a new instance of the class. + + The with which the action will be performed. + The x coordinate relative to the view port. + The y coordinate relative to the view port. + + + + Performs the action. + + + + + Presses a touch screen at a given location. + + + + + Initializes a new instance of the class. + + The with which the action will be performed. + The x coordinate relative to the view port. + The y coordinate relative to the view port. + + + + Performs the action. + + + + + Creates a double tap gesture on a touch screen. + + + + + Initializes a new instance of the class. + + The with which the action will be performed. + The horizontal offset relative to the view port. + The vertical offset relative to the view port. + + + + Initializes a new instance of the class for use with the specified element. + + The with which the action will be performed. + An describing an element at which to perform the action. + The x coordinate relative to the view port. + The y coordinate relative to the view port. + + + + Performs the action. + + + + + Defines an action for sending a sequence of keystrokes to an element. + + + + + Initializes a new instance of the class. + + The to use in performing the action. + The to use in setting focus to the element on which to perform the action. + An object providing the element on which to perform the action. + The key sequence to send. + + + + Performs this action. + + + + + Creates a single tap gesture on a touch screen. + + + + + Initializes a new instance of the class. + + The with which the action will be performed. + An describing an element at which to perform the action. + + + + Performs the action. + + + + + Provides a mechanism for building advanced interactions with the browser. + + + + + Initializes a new instance of the class. + + The object on which the actions built will be performed. + + + + Taps the touch screen on the specified element. + + The element on which to tap. + A self-reference to this . + + + + Presses down at the specified location on the screen. + + The x coordinate relative to the view port. + The y coordinate relative to the view port. + A self-reference to this . + + + + Releases a press at the specified location on the screen. + + The x coordinate relative to the view port. + The y coordinate relative to the view port. + A self-reference to this . + + + + Moves to the specified location on the screen. + + The x coordinate relative to the view port. + The y coordinate relative to the view port. + A self-reference to this . + + + + Scrolls the touch screen beginning at the specified element. + + The element on which to begin scrolling. + The x coordinate relative to the view port. + The y coordinate relative to the view port. + A self-reference to this . + + + + Double-taps the touch screen on the specified element. + + The element on which to double-tap. + A self-reference to this . + + + + Presses and holds on the touch screen on the specified element. + + The element on which to press and hold + A self-reference to this . + + + + Scrolls the touch screen to the specified offset. + + The horizontal offset relative to the view port. + The vertical offset relative to the view port. + A self-reference to this . + + + + Flicks the current view. + + The horizontal speed in pixels per second. + The vertical speed in pixels per second. + A self-reference to this . + + + + Flicks the current view starting at a specific location. + + The element at which to start the flick. + The x offset relative to the viewport. + The y offset relative to the viewport. + The speed in pixels per second. + A self-reference to this . + + + + Utility class used to execute "asynchronous" scripts. This class should + only be used by browsers that do not natively support asynchronous + script execution. + Warning: this class is intended for internal use + only. This class will be removed without warning after all + native asynchronous implementations have been completed. + + + + + Initializes a new instance of the class. + + An object capable of executing JavaScript. + + + + Gets or sets the timeout for the script executor. + + + + + Executes a JavaScript script asynchronously. + + The script to execute. + An array of objects used as arguments in the script. + The object which is the return value of the script. + if the object executing the function doesn't support JavaScript. + if the page reloads during the JavaScript execution. + if the timeout expires during the JavaScript execution. + + + + Encapsulates methods for working with files. + + + + + Recursively copies a directory. + + The source directory to copy. + The destination directory. + + if the copy is completed; otherwise . + + + + Recursively deletes a directory, retrying on error until a timeout. + + The directory to delete. + This method does not throw an exception if the delete fails. + + + + Searches for a file with the specified name. + + The name of the file to find. + The full path to the directory where the file can be found, + or an empty string if the file does not exist in the locations searched. + + This method looks first in the directory of the currently executing + assembly. If the specified file is not there, the method then looks in + each directory on the PATH environment variable, in order. + + + + + Gets the directory of the currently executing assembly. + + The directory of the currently executing assembly. + + + + Generates the full path to a random directory name in the temporary directory, following a naming pattern.. + + The pattern to use in creating the directory name, following standard + .NET string replacement tokens. + The full path to the random directory name in the temporary directory. + + + + Interface allowing execution of W3C Specification-compliant actions. + + + + + Gets a value indicating whether this object is a valid action executor. + + + + + Performs the specified list of actions with this action executor. + + The list of action sequences to perform. + + + + Resets the input state of the action executor. + + + + + Defines the interface through which the user finds elements by their CSS class. + + + + + Finds the first element matching the specified CSS class. + + The CSS class to match. + The first matching the criteria. + + + + Finds all elements matching the specified CSS class. + + The CSS class to match. + A containing all + IWebElements matching the criteria. + + + + Defines the interface through which the user finds elements by their cascading style sheet (CSS) selector. + + + + + Finds the first element matching the specified CSS selector. + + The id to match. + The first matching the criteria. + + + + Finds all elements matching the specified CSS selector. + + The CSS selector to match. + A containing all + IWebElements matching the criteria. + + + + Defines the interface through which the user finds elements by their ID. + + + + + Finds the first element matching the specified id. + + The id to match. + The first matching the criteria. + + + + Finds all elements matching the specified id. + + The id to match. + A containing all + IWebElements matching the criteria. + + + + Defines the interface through which the user finds elements by their link text. + + + + + Finds the first element matching the specified link text. + + The link text to match. + The first matching the criteria. + + + + Finds all elements matching the specified link text. + + The link text to match. + A containing all + IWebElements matching the criteria. + + + + Defines the interface through which the user finds elements by their name. + + + + + Finds the first element matching the specified name. + + The name to match. + The first matching the criteria. + + + + Finds all elements matching the specified name. + + The name to match. + A containing all + IWebElements matching the criteria. + + + + Defines the interface through which the user finds elements by a partial match on their link text. + + + + + Finds the first element matching the specified partial link text. + + The partial link text to match. + The first matching the criteria. + + + + Finds all elements matching the specified partial link text. + + The partial link text to match. + A containing all + IWebElements matching the criteria. + + + + Defines the interface through which the user finds elements by their tag name. + + + + + Finds the first element matching the specified tag name. + + The tag name to match. + The first matching the criteria. + + + + Finds all elements matching the specified tag name. + + The tag name to match. + A containing all + IWebElements matching the criteria. + + + + Defines the interface through which the user finds elements by XPath. + + + + + Finds the first element matching the specified XPath query. + + The XPath query to match. + The first matching the criteria. + + + + Finds all elements matching the specified XPath query. + + The XPath query to match. + A containing all + IWebElements matching the criteria. + + + + Defines the interface through which the user can access the driver used to find an element. + + + + + Gets the underlying Dictionary for a given set of capabilities. + + + + + Defines the interface through which the framework can serialize an element to the wire protocol. + + + + + Gets the internal ID of the element. + + + + + Converts an object into an object that represents an element for the wire protocol. + + A that represents an element in the wire protocol. + + + + Defines the interface through which the user can access the driver used to find an element. + + + + + Gets the used to find this element. + + + + + Defines the interface through which the user can discover if there is an underlying element to be used. + + + + + Gets the wrapped by this object. + + + + + Encapsulates methods for working with ports. + + + + + Finds a random, free port to be listened on. + + A random, free port to be listened on. + + + + Encapsulates methods for finding and extracting WebDriver resources. + + + + + Gets a string representing the version of the Selenium assembly. + + + + + Gets a string representing the platform family on which the Selenium assembly is executing. + + + + + Gets a that contains the resource to use. + + A file name in the file system containing the resource to use. + A string representing the resource name embedded in the + executing assembly, if it is not found in the file system. + A Stream from which the resource can be read. + Thrown if neither the file nor the embedded resource can be found. + + The GetResourceStream method searches for the specified resource using the following + algorithm: + In the same directory as the calling assembly.In the full path specified by the argument.Inside the calling assembly as an embedded resource. + + + + Returns a value indicating whether a resource exists with the specified ID. + + ID of the embedded resource to check for. + + if the resource exists in the calling assembly; otherwise . + + + + Class to Create the capabilities of the browser you require for . + If you wish to use default values use the static methods + + + + + Initializes a new instance of the class + + + + + Initializes a new instance of the class + + Dictionary of items for the remote driver + + + + Gets the browser name + + + + + Gets the capability value with the specified name. + + The name of the capability to get. + The value of the capability. + + The specified capability name is not in the set of capabilities. + + + + + Gets the underlying Dictionary for a given set of capabilities. + + + + + Gets the internal capabilities dictionary. + + + + + Gets a value indicating whether the browser has a given capability. + + The capability to get. + Returns if the browser has the capability; otherwise, . + + + + Gets a capability of the browser. + + The capability to get. + An object associated with the capability, or + if the capability is not set on the browser. + + + + Converts the object to a . + + The containing the capabilities. + + + + Return a string of capabilities being used + + String of capabilities being used + + + + Represents a cookie returned to the driver by the browser. + + + + + Initializes a new instance of the class with a specific name, + value, domain, path and expiration date. + + The name of the cookie. + The value of the cookie. + The domain of the cookie. + The path of the cookie. + The expiration date of the cookie. + + if the cookie is secure; otherwise + + if the cookie is an HTTP-only cookie; otherwise + If the name is or an empty string, + or if it contains a semi-colon. + If the value or currentUrl is . + + + + Gets a value indicating whether the cookie is secure. + + + + + Gets a value indicating whether the cookie is an HTTP-only cookie. + + + + + Creates and returns a string representation of the current cookie. + + A string representation of the current cookie. + + + + Provides entry points into needed unmanaged APIs. + + + + + Values for flags for setting information about a native operating system handle. + + + + + No flags are to be set for the handle. + + + + + If this flag is set, a child process created with the bInheritHandles + parameter of CreateProcess set to TRUE will inherit the object handle. + + + + + If this flag is set, calling the CloseHandle function will not close the + object handle. + + + + + Sets the handle information for a Windows object. + + Handle to the object. + The handle information to set. + The flags for the handle. + + if the information is set; otherwise . + + + + The exception that is thrown when the users attempts to set a cookie with an invalid domain. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with + a specified error message. + + The message that describes the error. + + + + Initializes a new instance of the class with + a specified error message and a reference to the inner exception that is the + cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, + or if no inner exception is specified. + + + + Initializes a new instance of the class with serialized data. + + The that holds the serialized + object data about the exception being thrown. + The that contains contextual + information about the source or destination. + + + + The exception that is thrown when a reference to an element is no longer valid. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with + a specified error message. + + The message that describes the error. + + + + Initializes a new instance of the class with + a specified error message and a reference to the inner exception that is the + cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, + or if no inner exception is specified. + + + + Initializes a new instance of the class with serialized data. + + The that holds the serialized + object data about the exception being thrown. + The that contains contextual + information about the source or destination. + + + + The exception that is thrown when an element is not visible. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with + a specified error message. + + The message that describes the error. + + + + Initializes a new instance of the class with + a specified error message and a reference to the inner exception that is the + cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, + or if no inner exception is specified. + + + + Initializes a new instance of the class with serialized data. + + The that holds the serialized + object data about the exception being thrown. + The that contains contextual + information about the source or destination. + + + + Defines an interface allowing the user to set options on the browser. + + + + + Gets an object allowing the user to manipulate cookies on the page. + + + + + Gets an object allowing the user to manipulate the currently-focused browser window. + + "Currently-focused" is defined as the browser window having the window handle + returned when IWebDriver.CurrentWindowHandle is called. + + + + Gets an object allowing the user to examing the logs for this driver instance. + + + + + Provides access to the timeouts defined for this driver. + + An object implementing the interface. + + + + Represents rotation of the browser view for orientation-sensitive devices. + When using this with a real device, the device should not be moved so that + the built-in sensors do not interfere. + + + + + Gets or sets the screen orientation of the browser on the device. + + + + + Defines the interface used to search for elements. + + + + + Finds the first using the given method. + + The locating mechanism to use. + The first matching on the current context. + If no element matches the criteria. + + + + Finds all IWebElements within the current context + using the given mechanism. + + The locating mechanism to use. + A of all WebElements + matching the current criteria, or an empty list if nothing matches. + + + + Defines the interface used to take screen shot images of the screen. + + + + + Gets a object representing the image of the page on the screen. + + A object containing the image. + + + + Defines the interface through which the user can locate a given frame or window. + + + + + Select a frame by its (zero-based) index. + + The zero-based index of the frame to select. + An instance focused on the specified frame. + If the frame cannot be found. + + + + Select a frame by its name or ID. + + The name of the frame to select. + An instance focused on the specified frame. + If the frame cannot be found. + + + + Select a frame using its previously located + The frame element to switch to. + An instance focused on the specified frame. + If the element is neither a FRAME nor an IFRAME element. + If the element is no longer valid. + + + + Select the parent frame of the currently selected frame. + + An instance focused on the specified frame. + + + + Switches the focus of future commands for this driver to the window with the given name. + + The name of the window to select. + An instance focused on the given window. + If the window cannot be found. + + + + Selects either the first frame on the page or the main document when a page contains iFrames. + + An instance focused on the default frame. + + + + Switches to the element that currently has the focus, or the body element + if no element with focus can be detected. + + An instance representing the element + with the focus, or the body element if no element with focus can be detected. + + + + Switches to the currently active modal dialog for this particular driver instance. + + A handle to the dialog. + + + + Defines the interface through which the user can define timeouts. + + + + + Gets or sets the implicit wait timeout, which is the amount of time the + driver should wait when searching for an element if it is not immediately + present. + + + When searching for a single element, the driver should poll the page + until the element has been found, or this timeout expires before throwing + a . When searching for multiple elements, + the driver should poll the page until at least one element has been found + or this timeout has expired. + + Increasing the implicit wait timeout should be used judiciously as it + will have an adverse effect on test run time, especially when used with + slower location strategies like XPath. + + + + + Gets or sets the asynchronous script timeout, which is the amount + of time the driver should wait when executing JavaScript asynchronously. + This timeout only affects the + method. + + + + + Gets or sets the page load timeout, which is the amount of time the driver + should wait for a page to load when setting the + property. + + + + + Interface representing basic touch screen operations. + + + + + Allows the execution of single tap on the screen, analogous to click using a Mouse. + + The object representing the location on the screen, + usually an . + + + + Allows the execution of the gesture 'down' on the screen. It is typically the first of a + sequence of touch gestures. + + The x coordinate relative to the view port. + The y coordinate relative to the view port. + + + + Allows the execution of the gesture 'up' on the screen. It is typically the last of a + sequence of touch gestures. + + The x coordinate relative to the view port. + The y coordinate relative to the view port. + + + + Allows the execution of the gesture 'move' on the screen. + + The x coordinate relative to the view port. + The y coordinate relative to the view port. + + + + Creates a scroll gesture that starts on a particular screen location. + + The object representing the location on the screen + where the scroll starts, usually an . + The x coordinate relative to the view port. + The y coordinate relative to the view port. + + + + Creates a scroll gesture for a particular x and y offset. + + The horizontal offset relative to the view port. + The vertical offset relative to the view port. + + + + Allows the execution of double tap on the screen, analogous to click using a Mouse. + + The object representing the location on the screen, + usually an . + + + + Allows the execution of a long press gesture on the screen. + + The object representing the location on the screen, + usually an . + + + + Creates a flick gesture for the current view. + + The horizontal speed in pixels per second. + The vertical speed in pixels per second. + + + + Creates a flick gesture for the current view starting at a specific location. + + The object representing the location on the screen + where the scroll starts, usually an . + The x offset relative to the viewport. + The y offset relative to the viewport. + The speed in pixels per second. + + + + Defines the interface through which the user controls the browser. + + + The interface is the main interface to use for testing, which + represents an idealized web browser. The methods in this class fall into three categories: + Control of the browser itselfSelection of IWebElementsDebugging aids + Key properties and methods are , which is used to + load a new web page by setting the property, and the various methods similar + to , which is used to find IWebElements. + + You use the interface by instantiate drivers that implement of this interface. + You should write your tests against this interface so that you may "swap in" a + more fully featured browser when there is a requirement for one. + + + + + Gets or sets the URL the browser is currently displaying. + + + Setting the property will load a new web page in the current browser window. + This is done using an HTTP GET operation, and the method will block until the + load is complete. This will follow redirects issued either by the server or + as a meta-redirect from within the returned HTML. Should a meta-redirect "rest" + for any duration of time, it is best to wait until this timeout is over, since + should the underlying page change while your test is executing the results of + future calls against this interface will be against the freshly loaded page. + + + + + + + Gets the title of the current browser window. + + + + + Gets the source of the page last loaded by the browser. + + + If the page has been modified after loading (for example, by JavaScript) + there is no guarantee that the returned text is that of the modified page. + Please consult the documentation of the particular driver being used to + determine whether the returned text reflects the current state of the page + or the text last sent by the web server. The page source returned is a + representation of the underlying DOM: do not expect it to be formatted + or escaped in the same way as the response sent from the web server. + + + + + Gets the current window handle, which is an opaque handle to this + window that uniquely identifies it within this driver instance. + + + + + Gets the window handles of open browser windows. + + + + + Close the current window, quitting the browser if it is the last window currently open. + + + + + Quits this driver, closing every associated window. + + + + + Instructs the driver to change its settings. + + An object allowing the user to change + the settings of the driver. + + + + Instructs the driver to navigate the browser to another location. + + An object allowing the user to access + the browser's history and to navigate to a given URL. + + + + Instructs the driver to send future commands to a different frame or window. + + An object which can be used to select + a frame or window. + + + + Defines the interface through which the user controls elements on the page. + + The interface represents an HTML element. + Generally, all interesting operations to do with interacting with a page will + be performed through this interface. + + + + + Gets the tag name of this element. + + + The property returns the tag name of the + element, not the value of the name attribute. For example, it will return + "input" for an element specified by the HTML markup <input name="foo" />. + + Thrown when the target element is no longer valid in the document DOM. + + + + Gets the innerText of this element, without any leading or trailing whitespace, + and with other whitespace collapsed. + + Thrown when the target element is no longer valid in the document DOM. + + + + Gets a value indicating whether or not this element is enabled. + + The property will generally + return for everything except explicitly disabled input elements. + Thrown when the target element is no longer valid in the document DOM. + + + + Gets a value indicating whether or not this element is selected. + + This operation only applies to input elements such as checkboxes, + options in a select element and radio buttons. + Thrown when the target element is no longer valid in the document DOM. + + + + Gets a object containing the coordinates of the upper-left corner + of this element relative to the upper-left corner of the page. + + Thrown when the target element is no longer valid in the document DOM. + + + + Gets a object containing the height and width of this element. + + Thrown when the target element is no longer valid in the document DOM. + + + + Gets a value indicating whether or not this element is displayed. + + The property avoids the problem + of having to parse an element's "style" attribute to determine + visibility of an element. + Thrown when the target element is no longer valid in the document DOM. + + + + Clears the content of this element. + + If this element is a text entry element, the + method will clear the value. It has no effect on other elements. Text entry elements + are defined as elements with INPUT or TEXTAREA tags. + Thrown when the target element is no longer valid in the document DOM. + + + + Simulates typing text into the element. + + The text to type into the element. + The text to be typed may include special characters like arrow keys, + backspaces, function keys, and so on. Valid special keys are defined in + . + + Thrown when the target element is not enabled. + Thrown when the target element is not visible. + Thrown when the target element is no longer valid in the document DOM. + + + + Submits this element to the web server. + + If this current element is a form, or an element within a form, + then this will be submitted to the web server. If this causes the current + page to change, then this method will block until the new page is loaded. + Thrown when the target element is no longer valid in the document DOM. + + + + Clicks this element. + + + + Click this element. If the click causes a new page to load, the + method will attempt to block until the page has loaded. After calling the + method, you should discard all references to this + element unless you know that the element and the page will still be present. + Otherwise, any further operations performed on this element will have an undefined. + behavior. + + + If this element is not clickable, then this operation is ignored. This allows you to + simulate a users to accidentally missing the target when clicking. + + + Thrown when the target element is not visible. + Thrown when the target element is no longer valid in the document DOM. + + + + Gets the value of the specified attribute for this element. + + The name of the attribute. + The attribute's current value. Returns a if the + value is not set. + The method will return the current value + of the attribute, even if the value has been modified after the page has been + loaded. Note that the value of the following attributes will be returned even if + there is no explicit attribute on the element: + Attribute nameValue returned if not explicitly specifiedValid element typescheckedcheckedCheck BoxselectedselectedOptions in Select elementsdisableddisabledInput and other UI elements + Thrown when the target element is no longer valid in the document DOM. + + + + Gets the value of a JavaScript property of this element. + + The name JavaScript the JavaScript property to get the value of. + The JavaScript property's current value. Returns a if the + value is not set or the property does not exist. + Thrown when the target element is no longer valid in the document DOM. + + + + Gets the value of a CSS property of this element. + + The name of the CSS property to get the value of. + The value of the specified CSS property. + The value returned by the + method is likely to be unpredictable in a cross-browser environment. + Color values should be returned as hex strings. For example, a + "background-color" property set as "green" in the HTML source, will + return "#008000" for its value. + Thrown when the target element is no longer valid in the document DOM. + + + + Provides methods for getting and setting the size and position of the browser window. + + + + + Gets or sets the position of the browser window relative to the upper-left corner of the screen. + + When setting this property, it should act as the JavaScript window.moveTo() method. + + + + Gets or sets the size of the outer browser window, including title bars and window borders. + + When setting this property, it should act as the JavaScript window.resizeTo() method. + + + + Maximizes the current window if it is not already maximized. + + + + + Minimizes the current window if it is not already maximized. + + + + + Sets the current window to full screen if it is not already in that state. + + + + + Representations of keys able to be pressed that are not text keys for sending to the browser. + + + + + Represents the NUL keystroke. + + + + + Represents the Cancel keystroke. + + + + + Represents the Help keystroke. + + + + + Represents the Backspace key. + + + + + Represents the Tab key. + + + + + Represents the Clear keystroke. + + + + + Represents the Return key. + + + + + Represents the Enter key. + + + + + Represents the Shift key. + + + + + Represents the Shift key. + + + + + Represents the Control key. + + + + + Represents the Control key. + + + + + Represents the Alt key. + + + + + Represents the Alt key. + + + + + Represents the Pause key. + + + + + Represents the Escape key. + + + + + Represents the Spacebar key. + + + + + Represents the Page Up key. + + + + + Represents the Page Down key. + + + + + Represents the End key. + + + + + Represents the Home key. + + + + + Represents the left arrow key. + + + + + Represents the left arrow key. + + + + + Represents the up arrow key. + + + + + Represents the up arrow key. + + + + + Represents the right arrow key. + + + + + Represents the right arrow key. + + + + + Represents the Left arrow key. + + + + + Represents the Left arrow key. + + + + + Represents the Insert key. + + + + + Represents the Delete key. + + + + + Represents the semi-colon key. + + + + + Represents the equal sign key. + + + + + Represents the number pad 0 key. + + + + + Represents the number pad 1 key. + + + + + Represents the number pad 2 key. + + + + + Represents the number pad 3 key. + + + + + Represents the number pad 4 key. + + + + + Represents the number pad 5 key. + + + + + Represents the number pad 6 key. + + + + + Represents the number pad 7 key. + + + + + Represents the number pad 8 key. + + + + + Represents the number pad 9 key. + + + + + Represents the number pad multiplication key. + + + + + Represents the number pad addition key. + + + + + Represents the number pad thousands separator key. + + + + + Represents the number pad subtraction key. + + + + + Represents the number pad decimal separator key. + + + + + Represents the number pad division key. + + + + + Represents the function key F1. + + + + + Represents the function key F2. + + + + + Represents the function key F3. + + + + + Represents the function key F4. + + + + + Represents the function key F5. + + + + + Represents the function key F6. + + + + + Represents the function key F7. + + + + + Represents the function key F8. + + + + + Represents the function key F9. + + + + + Represents the function key F10. + + + + + Represents the function key F11. + + + + + Represents the function key F12. + + + + + Represents the function key META. + + + + + Represents the function key COMMAND. + + + + + Gets the description of a specific key. + + The key value for which to get the description. + The description of the key. + + + + Represents an entry in a log from a driver instance. + + + + + Initializes a new instance of the class. + + + + + Gets the timestamp value of the log entry. + + + + + Gets the logging level of the log entry. + + + + + Gets the message of the log entry. + + + + + Returns a string that represents the current . + + A string that represents the current . + + + + Creates a from a dictionary as deserialized from JSON. + + The from + which to create the . + A with the values in the dictionary. + + + + Represents the levels of logging available to driver instances. + + + + + Show all log messages. + + + + + Show messages with information useful for debugging. + + + + + Show informational messages. + + + + + Show messages corresponding to non-critical issues. + + + + + Show messages corresponding to critical issues. + + + + + Show no log messages. + + + + + Class containing names of common log types. + + + + + Log messages from the client language bindings. + + + + + Logs from the current WebDriver instance. + + + + + Logs from the browser. + + + + + Logs from the server. + + + + + Profiling logs. + + + + + The exception that is thrown when an alert is not found. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with + a specified error message. + + The message that describes the error. + + + + Initializes a new instance of the class with + a specified error message and a reference to the inner exception that is the + cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, + or if no inner exception is specified. + + + + Initializes a new instance of the class with serialized data. + + The that holds the serialized + object data about the exception being thrown. + The that contains contextual + information about the source or destination. + + + + The exception that is thrown when an element is not found. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with + a specified error message. + + The message that describes the error. + + + + Initializes a new instance of the class with + a specified error message and a reference to the inner exception that is the + cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, + or if no inner exception is specified. + + + + Initializes a new instance of the class with serialized data. + + The that holds the serialized + object data about the exception being thrown. + The that contains contextual + information about the source or destination. + + + + The exception that is thrown when a frame is not found. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with + a specified error message. + + The message that describes the error. + + + + Initializes a new instance of the class with + a specified error message and a reference to the inner exception that is the + cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, + or if no inner exception is specified. + + + + Initializes a new instance of the class with serialized data. + + The that holds the serialized + object data about the exception being thrown. + The that contains contextual + information about the source or destination. + + + + The exception that is thrown when a window is not found. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with + a specified error message. + + The message that describes the error. + + + + Initializes a new instance of the class with + a specified error message and a reference to the inner exception that is the + cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, + or if no inner exception is specified. + + + + Initializes a new instance of the class with serialized data. + + The that holds the serialized + object data about the exception being thrown. + The that contains contextual + information about the source or destination. + + + + The exception that is thrown when an item is not found. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with + a specified error message. + + The message that describes the error. + + + + Initializes a new instance of the class with + a specified error message and a reference to the inner exception that is the + cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, + or if no inner exception is specified. + + + + Initializes a new instance of the class with serialized data. + + The that holds the serialized + object data about the exception being thrown. + The that contains contextual + information about the source or destination. + + + + Provides a mechanism to write tests against Opera + + + + [TestFixture] + public class Testing + { + private IWebDriver driver; + + [SetUp] + public void SetUp() + { + driver = new OperaDriver(); + } + + [Test] + public void TestGoogle() + { + driver.Navigate().GoToUrl("http://www.google.co.uk"); + /* + * Rest of the test + */ + } + + [TearDown] + public void TearDown() + { + driver.Quit(); + } + } + + + + + + Accept untrusted SSL Certificates + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class using the specified options. + + The to be used with the Opera driver. + + + + Initializes a new instance of the class using the specified path + to the directory containing OperaDriver.exe. + + The full path to the directory containing OperaDriver.exe. + + + + Initializes a new instance of the class using the specified path + to the directory containing OperaDriver.exe and options. + + The full path to the directory containing OperaDriver.exe. + The to be used with the Opera driver. + + + + Initializes a new instance of the class using the specified path + to the directory containing OperaDriver.exe, options, and command timeout. + + The full path to the directory containing OperaDriver.exe. + The to be used with the Opera driver. + The maximum amount of time to wait for each command. + + + + Initializes a new instance of the class using the specified + and options. + + The to use. + The used to initialize the driver. + + + + Initializes a new instance of the class using the specified . + + The to use. + The to be used with the Opera driver. + The maximum amount of time to wait for each command. + + + + Gets or sets the responsible for detecting + sequences of keystrokes representing file paths and names. + + The Opera driver does not allow a file detector to be set, + as the server component of the Opera driver (OperaDriver.exe) only + allows uploads from the local computer environment. Attempting to set + this property has no effect, but does not throw an exception. If you + are attempting to run the Opera driver remotely, use + in conjunction with a standalone WebDriver server. + + + + Exposes the service provided by the native OperaDriver executable. + + + + + Initializes a new instance of the class. + + The full path to the OperaDriver executable. + The file name of the OperaDriver executable. + The port on which the OperaDriver executable should listen. + + + + Gets or sets the location of the log file written to by the OperaDriver executable. + + + + + Gets or sets the base URL path prefix for commands (e.g., "wd/url"). + + + + + Gets or sets the address of a server to contact for reserving a port. + + + + + Gets or sets the port on which the Android Debug Bridge is listening for commands. + + + + + Gets or sets a value indicating whether to enable verbose logging for the OperaDriver executable. + Defaults to . + + + + + Gets the command-line arguments for the driver service. + + + + + Creates a default instance of the OperaDriverService. + + A OperaDriverService that implements default settings. + + + + Creates a default instance of the OperaDriverService using a specified path to the OperaDriver executable. + + The directory containing the OperaDriver executable. + A OperaDriverService using a random port. + + + + Creates a default instance of the OperaDriverService using a specified path to the OperaDriver executable with the given name. + + The directory containing the OperaDriver executable. + The name of the OperaDriver executable file. + A OperaDriverService using a random port. + + + + Class to manage options specific to + + Used with OperaDriver.exe for Chromium v0.1.0 and higher. + + + + OperaOptions options = new OperaOptions(); + options.AddExtensions("\path\to\extension.crx"); + options.BinaryLocation = "\path\to\opera"; + + + For use with OperaDriver: + + + OperaDriver driver = new OperaDriver(options); + + + For use with RemoteWebDriver: + + + RemoteWebDriver driver = new RemoteWebDriver(new Uri("http://localhost:4444/wd/hub"), options.ToCapabilities()); + + + + + + Gets the name of the capability used to store Opera options in + a object. + + + + + Gets or sets the location of the Opera browser's binary executable file. + + + + + Gets or sets a value indicating whether Opera should be left running after the + OperaDriver instance is exited. Defaults to . + + + + + Gets the list of arguments appended to the Opera command line as a string array. + + + + + Gets the list of extensions to be installed as an array of base64-encoded strings. + + + + + Gets or sets the address of a Opera debugger server to connect to. + Should be of the form "{hostname|IP address}:port". + + + + + Gets or sets the directory in which to store minidump files. + + + + + Adds a single argument to the list of arguments to be appended to the Opera.exe command line. + + The argument to add. + + + + Adds arguments to be appended to the Opera.exe command line. + + An array of arguments to add. + + + + Adds arguments to be appended to the Opera.exe command line. + + An object of arguments to add. + + + + Adds a single argument to be excluded from the list of arguments passed by default + to the Opera.exe command line by operadriver.exe. + + The argument to exclude. + + + + Adds arguments to be excluded from the list of arguments passed by default + to the Opera.exe command line by operadriver.exe. + + An array of arguments to exclude. + + + + Adds arguments to be excluded from the list of arguments passed by default + to the Opera.exe command line by operadriver.exe. + + An object of arguments to exclude. + + + + Adds a path to a packed Opera extension (.crx file) to the list of extensions + to be installed in the instance of Opera. + + The full path to the extension to add. + + + + Adds a list of paths to packed Opera extensions (.crx files) to be installed + in the instance of Opera. + + An array of full paths to the extensions to add. + + + + Adds a list of paths to packed Opera extensions (.crx files) to be installed + in the instance of Opera. + + An of full paths to the extensions to add. + + + + Adds a base64-encoded string representing a Opera extension to the list of extensions + to be installed in the instance of Opera. + + A base64-encoded string representing the extension to add. + + + + Adds a list of base64-encoded strings representing Opera extensions to the list of extensions + to be installed in the instance of Opera. + + An array of base64-encoded strings representing the extensions to add. + + + + Adds a list of base64-encoded strings representing Opera extensions to be installed + in the instance of Opera. + + An of base64-encoded strings + representing the extensions to add. + + + + Adds a preference for the user-specific profile or "user data directory." + If the specified preference already exists, it will be overwritten. + + The name of the preference to set. + The value of the preference to set. + + + + Adds a preference for the local state file in the user's data directory for Opera. + If the specified preference already exists, it will be overwritten. + + The name of the preference to set. + The value of the preference to set. + + + + Provides a means to add additional capabilities not yet added as type safe options + for the Opera driver. + + The name of the capability to add. + The value of the capability to add. + + thrown when attempting to add a capability for which there is already a type safe option, or + when is or the empty string. + + Calling + where has already been added will overwrite the + existing value with the new value in . + Also, by default, calling this method adds capabilities to the options object passed to + operadriver.exe. + + + + Provides a means to add additional capabilities not yet added as type safe options + for the Opera driver. + + The name of the capability to add. + The value of the capability to add. + Indicates whether the capability is to be set as a global + capability for the driver instead of a Opera-specific option. + + thrown when attempting to add a capability for which there is already a type safe option, or + when is or the empty string. + + Calling + where has already been added will overwrite the + existing value with the new value in + + + + Returns DesiredCapabilities for Opera with these options included as + capabilities. This does not copy the options. Further changes will be + reflected in the returned capabilities. + + The DesiredCapabilities for Opera with these options. + + + + Provides a mechanism to get elements off the page for test + + + + + Initializes a new instance of the class + + Driver in use + Id of the element + + + + Represents the known and supported Platforms that WebDriver runs on. + + The class maps closely to the Operating System, + but differs slightly, because this class is used to extract information such as + program locations and line endings. + + + + Any platform. This value is never returned by a driver, but can be used to find + drivers with certain capabilities. + + + + + Any version of Microsoft Windows. This value is never returned by a driver, + but can be used to find drivers with certain capabilities. + + + + + Any Windows NT-based version of Microsoft Windows. This value is never returned + by a driver, but can be used to find drivers with certain capabilities. This value + is equivalent to PlatformType.Windows. + + + + + Versions of Microsoft Windows that are compatible with Windows XP. + + + + + Versions of Microsoft Windows that are compatible with Windows Vista. + + + + + Any version of the Macintosh OS + + + + + Any version of the Unix operating system. + + + + + Any version of the Linux operating system. + + + + + A version of the Android mobile operating system. + + + + + Represents the platform on which tests are to be run. + + + + + Initializes a new instance of the class for a specific platform type. + + The platform type. + + + + Gets the current platform. + + + + + Gets the major version of the platform operating system. + + + + + Gets the major version of the platform operating system. + + + + + Gets the type of the platform. + + + + + Gets the value of the platform type for transmission using the JSON Wire Protocol. + + + + + Compares the platform to the specified type. + + A value to compare to. + + if the platforms match; otherwise . + + + + Returns the string value for this platform type. + + The string value for this platform type. + + + + Creates a object from a string name of the platform. + + The name of the platform to create. + The Platform object represented by the string name. + + + + Describes the kind of proxy. + + + Keep these in sync with the Firefox preferences numbers: + http://kb.mozillazine.org/Network.proxy.type + + + + + Direct connection, no proxy (default on Windows). + + + + + Manual proxy settings (e.g., for httpProxy). + + + + + Proxy automatic configuration from URL. + + + + + Use proxy automatic detection. + + + + + Use the system values for proxy settings (default on Linux). + + + + + No proxy type is specified. + + + + + Describes proxy settings to be used with a driver instance. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with the given proxy settings. + + A dictionary of settings to use with the proxy. + + + + Gets or sets the type of proxy. + + + + + Gets the type of proxy as a string for JSON serialization. + + + + + Gets or sets a value indicating whether the proxy uses automatic detection. + + + + + Gets or sets the value of the proxy for the FTP protocol. + + + + + Gets or sets the value of the proxy for the HTTP protocol. + + + + + Gets or sets the value for bypass proxy addresses. + + + + + Gets the semicolon delimited list of address for which to bypass the proxy. + + + + + Gets or sets the URL used for proxy automatic configuration. + + + + + Gets or sets the value of the proxy for the SSL protocol. + + + + + Gets or sets the value of the proxy for the SOCKS protocol. + + + + + Gets or sets the value of username for the SOCKS proxy. + + + + + Gets or sets the value of password for the SOCKS proxy. + + + + + Adds a single address to the list of addresses against which the proxy will not be used. + + The address to add. + + + + Adds addresses to the list of addresses against which the proxy will not be used. + + An array of addresses to add. + + + + Adds addresses to the list of addresses against which the proxy will not be used. + + An object of arguments to add. + + + + Returns a dictionary suitable for serializing to the W3C Specification + dialect of the wire protocol. + + A dictionary suitable for serializing to the W3C Specification + dialect of the wire protocol. + + + + Returns a dictionary suitable for serializing to the OSS dialect of the + wire protocol. + + A dictionary suitable for serializing to the OSS dialect of the + wire protocol. + + + + Base class for managing options specific to a browser driver. + + + + + Creates a new instance of the class. + + + + + Creates a new instance of the class, + containing the specified to use in the remote + session. + + + A object that contains values that must be matched + by the remote end to create the remote session. + + + A list of objects that contain values that may be matched + by the remote end to create the remote session. + + + + + Gets a value indicating the options that must be matched by the remote end to create a session. + + + + + Gets a value indicating the number of options that may be matched by the remote end to create a session. + + + + + Gets the capability value with the specified name. + + The name of the capability to get. + The value of the capability. + + The specified capability name is not in the set of capabilities. + + + + + Add a metadata setting to this set of remote session settings. + + The name of the setting to set. + The value of the setting. + + The value to be set must be serializable to JSON for transmission + across the wire to the remote end. To be JSON-serializable, the value + must be a string, a numeric value, a boolean value, an object that + implmeents that contains JSON-serializable + objects, or a where the keys + are strings and the values are JSON-serializable. + + + Thrown if the setting name is null, the empty string, or one of the + reserved names of metadata settings; or if the setting value is not + JSON serializable. + + + + + Adds a object to the list of options containing values to be + "first matched" by the remote end. + + The to add to the list of "first matched" options. + + + + Adds a object containing values that must be matched + by the remote end to successfully create a session. + + The that must be matched by + the remote end to successfully create a session. + + + + Gets a value indicating whether the browser has a given capability. + + The capability to get. + Returns if this set of capabilities has the capability; + otherwise, . + + + + Gets a capability of the browser. + + The capability to get. + An object associated with the capability, or + if the capability is not set in this set of capabilities. + + + + Return a dictionary representation of this . + + A representation of this . + + + + Return a string representation of the remote session settings to be sent. + + String representation of the remote session settings to be sent. + + + + Provides a way to access Safari to run your tests by creating a SafariDriver instance + + + When the WebDriver object has been instantiated the browser will load. The test can then navigate to the URL under test and + start your test. + + + + [TestFixture] + public class Testing + { + private IWebDriver driver; + + [SetUp] + public void SetUp() + { + driver = new SafariDriver(); + } + + [Test] + public void TestGoogle() + { + driver.Navigate().GoToUrl("http://www.google.co.uk"); + /* + * Rest of the test + */ + } + + [TearDown] + public void TearDown() + { + driver.Quit(); + driver.Dispose(); + } + } + + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class using the specified . + + The to use for this instance. + + + + Initializes a new instance of the class using the specified driver service. + + The used to initialize the driver. + + + + Initializes a new instance of the class using the specified path + to the directory containing ChromeDriver.exe. + + The full path to the directory containing SafariDriver executable. + + + + Initializes a new instance of the class using the specified path + to the directory containing ChromeDriver.exe and options. + + The full path to the directory containing SafariDriver executable. + The to be used with the Safari driver. + + + + Initializes a new instance of the class using the specified path + to the directory containing ChromeDriver.exe, options, and command timeout. + + The full path to the directory containing SafariDriver executable. + The to be used with the Safari driver. + The maximum amount of time to wait for each command. + + + + Initializes a new instance of the class using the specified + and options. + + The to use. + The used to initialize the driver. + + + + Initializes a new instance of the class using the specified . + + The to use. + The to be used with the Safari driver. + The maximum amount of time to wait for each command. + + + + Gets or sets the responsible for detecting + sequences of keystrokes representing file paths and names. + + The Safari driver does not allow a file detector to be set, + as the server component of the Safari driver (the Safari extension) only + allows uploads from the local computer environment. Attempting to set + this property has no effect, but does not throw an exception. If you + are attempting to run the Safari driver remotely, use + in conjunction with a standalone WebDriver server. + + + + Exposes the service provided by the native SafariDriver executable. + + + + + Initializes a new instance of the class. + + The full path to the SafariDriver executable. + The file name of the SafariDriver executable. + The port on which the SafariDriver executable should listen. + + + + Gets or sets a value indicating whether to use the default open-source project + dialect of the protocol instead of the default dialect compliant with the + W3C WebDriver Specification. + + + This is only valid for versions of the driver for Safari that target Safari 12 + or later, and will result in an error if used with prior versions of the driver. + + + + + Gets the command-line arguments for the driver service. + + + + + Gets a value indicating the time to wait for the service to terminate before forcing it to terminate. + For the Safari driver, there is no time for termination + + + + + Gets a value indicating whether the service has a shutdown API that can be called to terminate + it gracefully before forcing a termination. + + + + + Gets a value indicating whether the service is responding to HTTP requests. + + + + + Creates a default instance of the SafariDriverService. + + A SafariDriverService that implements default settings. + + + + Creates a default instance of the SafariDriverService using a specified path to the ChromeDriver executable. + + The directory containing the ChromeDriver executable. + A ChromeDriverService using a random port. + + + + Creates a default instance of the SafariDriverService using a specified path to the ChromeDriver executable with the given name. + + The directory containing the ChromeDriver executable. + The name of the ChromeDriver executable file. + A ChromeDriverService using a random port. + + + + Class to manage options specific to + + + SafariOptions options = new SafariOptions(); + options.SkipExtensionInstallation = true; + + + For use with SafariDriver: + + + SafariDriver driver = new SafariDriver(options); + + + For use with RemoteWebDriver: + + + RemoteWebDriver driver = new RemoteWebDriver(new Uri("http://localhost:4444/wd/hub"), options.ToCapabilities()); + + + + + + Initializes a new instance of the class. + + + + + Gets or sets a value indicating whether to have the driver preload the + Web Inspector and JavaScript debugger in the background. + + + + + Gets or sets a value indicating whether to have the driver preload the + Web Inspector and start a timeline recording in the background. + + + + + Gets or sets a value indicating whether the browser is the technology preview. + + + + + Provides a means to add additional capabilities not yet added as type safe options + for the Safari driver. + + The name of the capability to add. + The value of the capability to add. + + thrown when attempting to add a capability for which there is already a type safe option, or + when is or the empty string. + + Calling where + has already been added will overwrite the existing value with the new value in + + + + Returns ICapabilities for Safari with these options included as + capabilities. This copies the options. Further changes will not be + reflected in the returned capabilities. + + The ICapabilities for Safari with these options. + + + + Represents possible screen orientations. + + + + + Represents a portrait mode, where the screen is vertical. + + + + + Represents Landscape mode, where the screen is horizontal. + + + + + File format for saving screenshots. + + + + + W3C Portable Network Graphics image format. + + + + + Joint Photgraphic Experts Group image format. + + + + + Graphics Interchange Format image format. + + + + + Tagged Image File Format image format. + + + + + Bitmap image format. + + + + + Represents an image of the page currently loaded in the browser. + + + + + Initializes a new instance of the class. + + The image of the page as a Base64-encoded string. + + + + Gets the value of the screenshot image as a Base64-encoded string. + + + + + Gets the value of the screenshot image as an array of bytes. + + + + + Saves the screenshot to a Portable Network Graphics (PNG) file, overwriting the + file if it already exists. + + The full path and file name to save the screenshot to. + + + + Saves the screenshot to a file, overwriting the file if it already exists. + + The full path and file name to save the screenshot to. + A value indicating the format + to save the image to. + + + + Returns a String that represents the current Object. + + A String that represents the current Object. + + + + The exception that is thrown when a reference to an element is no longer valid. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with + a specified error message. + + The message that describes the error. + + + + Initializes a new instance of the class with + a specified error message and a reference to the inner exception that is the + cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, + or if no inner exception is specified. + + + + Initializes a new instance of the class with serialized data. + + The that holds the serialized + object data about the exception being thrown. + The that contains contextual + information about the source or destination. + + + + An implementation of the interface that may have its timeout and polling interval + configured on the fly. + + The type of object on which the wait it to be applied. + + + + Initializes a new instance of the class. + + The input value to pass to the evaluated conditions. + + + + Initializes a new instance of the class. + + The input value to pass to the evaluated conditions. + The clock to use when measuring the timeout. + + + + Gets or sets how long to wait for the evaluated condition to be true. The default timeout is 500 milliseconds. + + + + + Gets or sets how often the condition should be evaluated. The default timeout is 500 milliseconds. + + + + + Gets or sets the message to be displayed when time expires. + + + + + Configures this instance to ignore specific types of exceptions while waiting for a condition. + Any exceptions not whitelisted will be allowed to propagate, terminating the wait. + + The types of exceptions to ignore. + + + + Repeatedly applies this instance's input value to the given function until one of the following + occurs: + the function returns neither null nor falsethe function throws an exception that is not in the list of ignored exception typesthe timeout expires + The delegate's expected return type. + A delegate taking an object of type T as its parameter, and returning a TResult. + The delegate's return value. + + + + Throws a with the given message. + + The message of the exception. + The last exception thrown by the condition. + This method may be overridden to throw an exception that is + idiomatic for a particular test infrastructure. + + + + An interface describing time handling functions for timeouts. + + + + + Gets the current date and time values. + + + + + Gets the at a specified offset in the future. + + The offset to use. + The at the specified offset in the future. + + + + Gets a value indicating whether the current date and time is before the specified date and time. + + The date and time values to compare the current date and time values to. + + if the current date and time is before the specified date and time; otherwise, . + + + + Interface describing a class designed to wait for a condition. + + The type of object used to detect the condition. + + + + Gets or sets how long to wait for the evaluated condition to be true. + + + + + Gets or sets how often the condition should be evaluated. + + + + + Gets or sets the message to be displayed when time expires. + + + + + Configures this instance to ignore specific types of exceptions while waiting for a condition. + Any exceptions not whitelisted will be allowed to propagate, terminating the wait. + + The types of exceptions to ignore. + + + + Waits until a condition is true or times out. + + The type of result to expect from the condition. + A delegate taking a TSource as its parameter, and returning a TResult. + If TResult is a boolean, the method returns when the condition is true, and otherwise. + If TResult is an object, the method returns the object when the condition evaluates to a value other than . + Thrown when TResult is not boolean or an object type. + + + + Uses the system clock to calculate time for timeouts. + + + + + Gets the current date and time values. + + + + + Calculates the date and time values after a specific delay. + + The delay after to calculate. + The future date and time values. + + + + Gets a value indicating whether the current date and time is before the specified date and time. + + The date and time values to compare the current date and time values to. + + if the current date and time is before the specified date and time; otherwise, . + + + + Provides the ability to wait for an arbitrary condition during test execution. + + + + IWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(3)) + IWebElement element = wait.Until(driver => driver.FindElement(By.Name("q"))); + + + + + + Initializes a new instance of the class. + + The WebDriver instance used to wait. + The timeout value indicating how long to wait for the condition. + + + + Initializes a new instance of the class. + + An object implementing the interface used to determine when time has passed. + The WebDriver instance used to wait. + The timeout value indicating how long to wait for the condition. + A value indicating how often to check for the condition to be true. + + + + The exception that is thrown when the user is unable to set a cookie. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with + a specified error message. + + The message that describes the error. + + + + Initializes a new instance of the class with + a specified error message and a reference to the inner exception that is the + cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, + or if no inner exception is specified. + + + + Initializes a new instance of the class with serialized data. + + The that holds the serialized + object data about the exception being thrown. + The that contains contextual + information about the source or destination. + + + + The exception that is thrown when an unhandled alert is present. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with + a specified error message. + + The message that describes the error. + + + + Initializes a new instance of the class with + a specified error message and alert text. + + The message that describes the error. + The text of the unhandled alert. + + + + Initializes a new instance of the class with + a specified error message and a reference to the inner exception that is the + cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, + or if no inner exception is specified. + + + + Initializes a new instance of the class with serialized data. + + The that holds the serialized + object data about the exception being thrown. + The that contains contextual + information about the source or destination. + + + + Gets the text of the unhandled alert. + + + + + Populates a SerializationInfo with the data needed to serialize the target object. + + The that holds the serialized + object data about the exception being thrown. + The that contains contextual + information about the source or destination. + + + + Represents exceptions that are thrown when an error occurs during actions. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with + a specified error message. + + The message that describes the error. + + + + Initializes a new instance of the class with + a specified error message and a reference to the inner exception that is the + cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, + or if no inner exception is specified. + + + + Initializes a new instance of the class with serialized data. + + The that holds the serialized + object data about the exception being thrown. + The that contains contextual + information about the source or destination. + + + + Specifies return values for actions in the driver. + + + + + The action was successful. + + + + + The index specified for the action was out of the acceptable range. + + + + + No collection was specified. + + + + + No string was specified. + + + + + No string length was specified. + + + + + No string wrapper was specified. + + + + + No driver matching the criteria exists. + + + + + No element matching the criteria exists. + + + + + No frame matching the criteria exists. + + + + + The functionality is not supported. + + + + + The specified element is no longer valid. + + + + + The specified element is not displayed. + + + + + The specified element is not enabled. + + + + + An unhandled error occurred. + + + + + An error occurred, but it was expected. + + + + + The specified element is not selected. + + + + + No document matching the criteria exists. + + + + + An unexpected JavaScript error occurred. + + + + + No result is available from the JavaScript execution. + + + + + The result from the JavaScript execution is not recognized. + + + + + No collection matching the criteria exists. + + + + + A timeout occurred. + + + + + A null pointer was received. + + + + + No window matching the criteria exists. + + + + + An illegal attempt was made to set a cookie under a different domain than the current page. + + + + + A request to set a cookie's value could not be satisfied. + + + + + An alert was found open unexpectedly. + + + + + A request was made to switch to an alert, but no alert is currently open. + + + + + An asynchronous JavaScript execution timed out. + + + + + The coordinates of the element are invalid. + + + + + The selector used (CSS/XPath) was invalid. + + + + + A session was not created by the driver + + + + + The requested move was outside the active view port + + + + + The XPath selector was invalid. + + + + + An insecure SSl certificate was specified. + + + + + The element was not interactable + + + + + An invalid argument was passed to the command. + + + + + No cookie was found matching the name requested. + + + + + The driver was unable to capture the screen. + + + + + The click on the element was intercepted by a different element. + + + + + Represents exceptions that are thrown when an error occurs during actions. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with + a specified error message. + + The message that describes the error. + + + + Initializes a new instance of the class with + a specified error message and a reference to the inner exception that is the + cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, + or if no inner exception is specified. + + + + Initializes a new instance of the class with serialized data. + + The that holds the serialized + object data about the exception being thrown. + The that contains contextual + information about the source or destination. + + + + The exception that is thrown when an error occurs during an XPath lookup. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with + a specified error message. + + The message that describes the error. + + + + Initializes a new instance of the class with + a specified error message and a reference to the inner exception that is the + cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, + or if no inner exception is specified. + + + + Initializes a new instance of the class with serialized data. + + The that holds the serialized + object data about the exception being thrown. + The that contains contextual + information about the source or destination. + + + + Unique class for compression/decompression file. Represents a Zip file. + + + + + Compression method enumeration. + + + + Uncompressed storage. + + + Deflate compression method. + + + + Gets a value indicating whether file names and comments should be encoded using UTF-8. + + + + + Gets a value indicating whether to force using the deflate algorithm, + even if doing so inflates the stored file. + + + + + Create a new zip storage in a stream. + + The stream to use to create the Zip file. + General comment for Zip file. + A valid ZipStorer object. + + + + Open the existing Zip storage in a stream. + + Already opened stream with zip contents. + File access mode for stream operations. + A valid ZipStorer object. + + + + Add full contents of a file into the Zip storage. + + Compression method used to store the file. + Full path of file to add to Zip storage. + File name and path as desired in Zip directory. + Comment for stored file. + + + + Add full contents of a stream into the Zip storage. + + Compression method used to store the stream. + Stream object containing the data to store in Zip. + File name and path as desired in Zip directory. + Modification time of the data to store. + Comment for stored file. + + + + Updates central directory (if needed) and close the Zip storage. + + This is a required step, unless automatic dispose is used. + + + + Read all the file records in the central directory. + + List of all entries in directory. + + + + Copy the contents of a stored file into a physical file. + + Entry information of file to extract. + Name of file to store uncompressed data. + + if the file is successfully extracted; otherwise, . + Unique compression methods are Store and Deflate. + + + + Copy the contents of a stored file into an open stream. + + Entry information of file to extract. + Stream to store the uncompressed data. + + if the file is successfully extracted; otherwise, . + Unique compression methods are Store and Deflate. + + + + Closes the Zip file stream. + + + + + Represents an entry in Zip file directory + + + + Compression method + + + Full path and filename as stored in Zip + + + Original file size + + + Compressed file size + + + Offset of header information inside Zip storage + + + Offset of file inside Zip storage + + + Size of header information + + + 32-bit checksum of entire file + + + Last modification time of file + + + User comment for file + + + True if UTF8 encoding for filename and comments, false if default (CP 437) + + + Overriden method + Filename in Zip + + + \ No newline at end of file diff --git a/src/lib/WebDriver/netstandard2.0/WebDriver.Support.dll b/src/lib/WebDriver/netstandard2.0/WebDriver.Support.dll new file mode 100644 index 0000000..ee34a4a Binary files /dev/null and b/src/lib/WebDriver/netstandard2.0/WebDriver.Support.dll differ diff --git a/src/lib/WebDriver/netstandard2.0/WebDriver.Support.xml b/src/lib/WebDriver/netstandard2.0/WebDriver.Support.xml new file mode 100644 index 0000000..e46560c --- /dev/null +++ b/src/lib/WebDriver/netstandard2.0/WebDriver.Support.xml @@ -0,0 +1,1876 @@ + + + + WebDriver.Support + + + + + A wrapper around an arbitrary WebDriver instance which supports registering for + events, e.g. for logging purposes. + + + + + Initializes a new instance of the class. + + The driver to register events for. + + + + Fires before the driver begins navigation. + + + + + Fires after the driver completes navigation + + + + + Fires before the driver begins navigation back one entry in the browser history list. + + + + + Fires after the driver completes navigation back one entry in the browser history list. + + + + + Fires before the driver begins navigation forward one entry in the browser history list. + + + + + Fires after the driver completes navigation forward one entry in the browser history list. + + + + + Fires before the driver clicks on an element. + + + + + Fires after the driver has clicked on an element. + + + + + Fires before the driver changes the value of an element via Clear(), SendKeys() or Toggle(). + + + + + Fires after the driver has changed the value of an element via Clear(), SendKeys() or Toggle(). + + + + + Fires before the driver starts to find an element. + + + + + Fires after the driver completes finding an element. + + + + + Fires before a script is executed. + + + + + Fires after a script is executed. + + + + + Fires when an exception is thrown. + + + + + Gets the wrapped by this EventsFiringWebDriver instance. + + + + + Gets or sets the URL the browser is currently displaying. + + + Setting the property will load a new web page in the current browser window. + This is done using an HTTP GET operation, and the method will block until the + load is complete. This will follow redirects issued either by the server or + as a meta-redirect from within the returned HTML. Should a meta-redirect "rest" + for any duration of time, it is best to wait until this timeout is over, since + should the underlying page change while your test is executing the results of + future calls against this interface will be against the freshly loaded page. + + + + + + + Gets the title of the current browser window. + + + + + Gets the source of the page last loaded by the browser. + + + If the page has been modified after loading (for example, by JavaScript) + there is no guarantee that the returned text is that of the modified page. + Please consult the documentation of the particular driver being used to + determine whether the returned text reflects the current state of the page + or the text last sent by the web server. The page source returned is a + representation of the underlying DOM: do not expect it to be formatted + or escaped in the same way as the response sent from the web server. + + + + + Gets the current window handle, which is an opaque handle to this + window that uniquely identifies it within this driver instance. + + + + + Gets the window handles of open browser windows. + + + + + Close the current window, quitting the browser if it is the last window currently open. + + + + + Quits this driver, closing every associated window. + + + + + Instructs the driver to change its settings. + + An object allowing the user to change + the settings of the driver. + + + + Instructs the driver to navigate the browser to another location. + + An object allowing the user to access + the browser's history and to navigate to a given URL. + + + + Instructs the driver to send future commands to a different frame or window. + + An object which can be used to select + a frame or window. + + + + Find the first using the given method. + + The locating mechanism to use. + The first matching on the current context. + If no element matches the criteria. + + + + Find all IWebElements within the current context + using the given mechanism. + + The locating mechanism to use. + A of all WebElements + matching the current criteria, or an empty list if nothing matches. + + + + Frees all managed and unmanaged resources used by this instance. + + + + + Executes JavaScript in the context of the currently selected frame or window. + + The JavaScript code to execute. + The arguments to the script. + The value returned by the script. + + + The method executes JavaScript in the context of + the currently selected frame or window. This means that "document" will refer + to the current document. If the script has a return value, then the following + steps will be taken: + + + + For an HTML element, this method returns a + For a number, a is returned + For a boolean, a is returned + For all other cases a is returned. + For an array,we check the first element, and attempt to return a + of that type, following the rules above. Nested lists are not + supported. + If the value is null or there is no return value, + is returned. + + + + Arguments must be a number (which will be converted to a ), + a , a or a . + An exception will be thrown if the arguments do not meet these criteria. + The arguments will be made available to the JavaScript via the "arguments" magic + variable, as if the function were called via "Function.apply" + + + + + + Executes JavaScript asynchronously in the context of the currently selected frame or window. + + The JavaScript code to execute. + The arguments to the script. + The value returned by the script. + + + + Gets a object representing the image of the page on the screen. + + A object containing the image. + + + + Frees all managed and, optionally, unmanaged resources used by this instance. + + to dispose of only managed resources; + to dispose of managed and unmanaged resources. + + + + Raises the event. + + A that contains the event data. + + + + Raises the event. + + A that contains the event data. + + + + Raises the event. + + A that contains the event data. + + + + Raises the event. + + A that contains the event data. + + + + Raises the event. + + A that contains the event data. + + + + Raises the event. + + A that contains the event data. + + + + Raises the event. + + A that contains the event data. + + + + Raises the event. + + A that contains the event data. + + + + Raises the event. + + A that contains the event data. + + + + Raises the event. + + A that contains the event data. + + + + Raises the event. + + A that contains the event data. + + + + Raises the event. + + A that contains the event data. + + + + Raises the event. + + A that contains the event data. + + + + Raises the event. + + A that contains the event data. + + + + Raises the event. + + A that contains the event data. + + + + Provides a mechanism for Navigating with the driver. + + + + + Initializes a new instance of the class + + Driver in use + + + + Move the browser back + + + + + Move the browser forward + + + + + Navigate to a url for your test + + String of where you want the browser to go to + + + + Navigate to a url for your test + + Uri object of where you want the browser to go to + + + + Refresh the browser + + + + + Provides a mechanism for setting options needed for the driver during the test. + + + + + Initializes a new instance of the class + + Instance of the driver currently in use + + + + Gets an object allowing the user to manipulate cookies on the page. + + + + + Gets an object allowing the user to manipulate the currently-focused browser window. + + "Currently-focused" is defined as the browser window having the window handle + returned when IWebDriver.CurrentWindowHandle is called. + + + + Provides access to the timeouts defined for this driver. + + An object implementing the interface. + + + + Provides a mechanism for finding elements on the page with locators. + + + + + Initializes a new instance of the class + + The driver that is currently in use + + + + Move to a different frame using its index + + The index of the + A WebDriver instance that is currently in use + + + + Move to different frame using its name + + name of the frame + A WebDriver instance that is currently in use + + + + Move to a frame element. + + a previously found FRAME or IFRAME element. + A WebDriver instance that is currently in use. + + + + Select the parent frame of the currently selected frame. + + An instance focused on the specified frame. + + + + Change to the Window by passing in the name + + name of the window that you wish to move to + A WebDriver instance that is currently in use + + + + Change the active frame to the default + + Element of the default + + + + Finds the active element on the page and returns it + + Element that is active + + + + Switches to the currently active modal dialog for this particular driver instance. + + A handle to the dialog. + + + + Defines the interface through which the user can define timeouts. + + + + + Initializes a new instance of the class + + The object to wrap. + + + + Gets or sets the implicit wait timeout, which is the amount of time the + driver should wait when searching for an element if it is not immediately + present. + + + When searching for a single element, the driver should poll the page + until the element has been found, or this timeout expires before throwing + a . When searching for multiple elements, + the driver should poll the page until at least one element has been found + or this timeout has expired. + + Increasing the implicit wait timeout should be used judiciously as it + will have an adverse effect on test run time, especially when used with + slower location strategies like XPath. + + + + + + Gets or sets the asynchronous script timeout, which is the amount + of time the driver should wait when executing JavaScript asynchronously. + This timeout only affects the + method. + + + + + Gets or sets the page load timeout, which is the amount of time the driver + should wait for a page to load when setting the + property. + + + + + EventFiringWebElement allows you to have access to specific items that are found on the page + + + + + Initializes a new instance of the class. + + The instance hosting this element. + The to wrap for event firing. + + + + Gets the underlying wrapped . + + + + + Gets the DOM Tag of element + + + + + Gets the text from the element + + + + + Gets a value indicating whether an element is currently enabled + + + + + Gets a value indicating whether this element is selected or not. This operation only applies to input elements such as checkboxes, options in a select and radio buttons. + + + + + Gets the Location of an element and returns a Point object + + + + + Gets the of the element on the page + + + + + Gets a value indicating whether the element is currently being displayed + + + + + Gets the underlying EventFiringWebDriver for this element. + + + + + Method to clear the text out of an Input element + + + + + Method for sending native key strokes to the browser + + String containing what you would like to type onto the screen + + + + If this current element is a form, or an element within a form, then this will be submitted to the remote server. + If this causes the current page to change, then this method will block until the new page is loaded. + + + + + Click this element. If this causes a new page to load, this method will block until + the page has loaded. At this point, you should discard all references to this element + and any further operations performed on this element will have undefined behavior unless + you know that the element and the page will still be present. If this element is not + clickable, then this operation is a no-op since it's pretty common for someone to + accidentally miss the target when clicking in Real Life + + + + + If this current element is a form, or an element within a form, then this will be submitted to the remote server. If this causes the current page to change, then this method will block until the new page is loaded. + + Attribute you wish to get details of + The attribute's current value or null if the value is not set. + + + + Gets the value of a JavaScript property of this element. + + The name JavaScript the JavaScript property to get the value of. + The JavaScript property's current value. Returns a if the + value is not set or the property does not exist. + + + + Method to return the value of a CSS Property + + CSS property key + string value of the CSS property + + + + Finds the first element in the page that matches the object + + By mechanism to find the element + IWebElement object so that you can interaction that object + + + + Finds the elements on the page by using the object and returns a ReadOnlyCollection of the Elements on the page + + By mechanism to find the element + ReadOnlyCollection of IWebElement + + + + Provides data for events related to finding elements. + + + + + Initializes a new instance of the class. + + The WebDriver instance used in finding elements. + The object containing the method used to find elements + + + + Initializes a new instance of the class. + + The WebDriver instance used in finding elements. + The parent element used as the context for the search. + The object containing the method used to find elements. + + + + Gets the WebDriver instance used in finding elements. + + + + + Gets the parent element used as the context for the search. + + + + + Gets the object containing the method used to find elements. + + + + + Provides data for events relating to exception handling. + + + + + Initializes a new instance of the class. + + The WebDriver instance throwing the exception. + The exception thrown by the driver. + + + + Gets the exception thrown by the driver. + + + + + Gets the WebDriver instance . + + + + + Provides data for events relating to navigation. + + + + + Initializes a new instance of the class. + + The WebDriver instance used in navigation. + + + + Initializes a new instance of the class. + + The WebDriver instance used in navigation. + The URL navigated to by the driver. + + + + Gets the URL navigated to by the driver. + + + + + Gets the WebDriver instance used in navigation. + + + + + Provides data for events relating to executing JavaScript. + + + + + Initializes a new instance of the class. + + The WebDriver instance used to execute the script. + The script executed by the driver. + + + + Gets the WebDriver instance used to execute the script. + + + + + Gets the script executed by the driver. + + + + + Provides data for events relating to elements. + + + + + Initializes a new instance of the class. + + The WebDriver instance used for the action. + The element used for the action. + + + + Gets the WebDriver instance used for the action. + + + + + Gets the element used for the action. + + + + + Provides data for events related to finding elements. + + + + + Initializes a new instance of the class. + + The WebDriver instance used for the action. + The element used for the action. + The new value for the element. + + + + Gets the Value that is written to the element + + + + + Provides extension methods for convenience in using WebDriver. + + + + + Gets a object representing the image of the page on the screen. + + The driver instance to extend. + A object containing the image. + Thrown if this instance + does not implement , or the capabilities of the driver + indicate that it cannot take screenshots. + + + + Executes JavaScript in the context of the currently selected frame or window + + The driver instance to extend. + The JavaScript code to execute. + The arguments to the script. + Thrown if this instance + does not implement + + + + Executes JavaScript in the context of the currently selected frame or window + + Expected return type of the JavaScript execution. + The driver instance to extend. + The JavaScript code to execute. + The arguments to the script. + The value returned by the script. + Thrown if this instance + does not implement , or if the actual return type + of the JavaScript execution does not match the expected type. + + + + Mechanism used to locate elements within a document using a series of lookups. This class will + find all DOM elements that matches all of the locators in sequence, e.g. + + + The following code will find all elements that match by1 and then all elements that also match by2. + + driver.findElements(new ByAll(by1, by2)) + + This means that the list of elements returned may not be in document order. + > + + + + Initializes a new instance of the class with one or more objects. + + One or more references + + + + Find a single element. + + Context used to find the element. + The element that matches + + + + Finds many elements + + Context used to find the element. + A readonly collection of elements that match. + + + + Writes out a comma separated list of the objects used in the chain. + + Converts the value of this instance to a + + + + Mechanism used to locate elements within a document using a series of other lookups. This class + will find all DOM elements that matches each of the locators in sequence + + + The following code will will find all elements that match by2 and appear under an element that matches + by1. + + driver.findElements(new ByChained(by1, by2)) + + + + + + Initializes a new instance of the class with one or more objects. + + One or more references + + + + Find a single element. + + Context used to find the element. + The element that matches + + + + Finds many elements + + Context used to find the element. + A readonly collection of elements that match. + + + + Writes out a comma separated list of the objects used in the chain. + + Converts the value of this instance to a + + + + Provides instances of the object to the attributes. + + + + + Gets an instance of the class based on the specified attribute. + + The describing how to find the element. + An instance of the class. + + + + Finds element when the id or the name attribute has the specified value. + + + + + Initializes a new instance of the class. + + The ID or Name to use in finding the element. + + + + Find a single element. + + Context used to find the element. + The element that matches + + + + Finds many elements + + Context used to find the element. + A readonly collection of elements that match. + + + + Writes out a description of this By object. + + Converts the value of this instance to a + + + + Marks the element so that lookups to the browser page are cached. This class cannot be inherited. + + + + + Marks elements to indicate that found elements should match the criteria of + all on the field or property. + + + + When used with a set of , all criteria must be + matched to be returned. The criteria are used in sequence according to the + Priority property. Note that the behavior when setting multiple + Priority properties to the same value, or not + specifying a Priority value, is undefined. + + + + // Will find the element with the tag name "input" that also has an ID + // attribute matching "elementId". + [FindsByAll] + [FindsBy(How = How.TagName, Using = "input", Priority = 0)] + [FindsBy(How = How.Id, Using = "elementId", Priority = 1)] + public IWebElement thisElement; + + + + + + + Marks program elements with methods by which to find a corresponding element on the page. Used + in conjunction with the , it allows you to quickly create Page Objects. + + + + You can use this attribute by specifying the and properties + to indicate how to find the elements. This attribute can be used to decorate fields and properties + in your Page Object classes. The of the field or property must be either + or IList{IWebElement}. Any other type will throw an + when is called. + + + + [FindsBy(How = How.Name, Using = "myElementName")] + public IWebElement foundElement; + + [FindsBy(How = How.TagName, Using = "a")] + public IList{IWebElement} allLinks; + + + + You can also use multiple instances of this attribute to find an element that may meet + one of multiple criteria. When using multiple instances, you can specify the order in + which the criteria is matched by using the property. + + + + // Will find the element with the name attribute matching the first of "anElementName" + // or "differentElementName". + [FindsBy(How = How.Name, Using = "anElementName", Priority = 0)] + [FindsBy(How = How.Name, Using = "differentElementName", Priority = 1)] + public IWebElement thisElement; + + + + + + + Gets or sets the method used to look up the element + + + + + Gets or sets the value to lookup by (i.e. for How.Name, the actual name to look up) + + + + + Gets or sets a value indicating where this attribute should be evaluated relative to other instances + of this attribute decorating the same class member. + + + + + Gets or sets a value indicating the of the custom finder. The custom finder must + descend from the class, and expose a public constructor that takes a + argument. + + + + + Gets or sets an explicit object to find by. + Setting this property takes precedence over setting the How or Using properties. + + + + + Determines if two instances are equal. + + One instance to compare. + The other instance to compare. + if the two instances are equal; otherwise, . + + + + Determines if two instances are unequal. + s + One instance to compare. + The other instance to compare. + if the two instances are not equal; otherwise, . + + + + Determines if one instance is greater than another. + + One instance to compare. + The other instance to compare. + if the first instance is greater than the second; otherwise, . + + + + Determines if one instance is less than another. + + One instance to compare. + The other instance to compare. + if the first instance is less than the second; otherwise, . + + + + Compares the current instance with another object of the same type and returns an + integer that indicates whether the current instance precedes, follows, or occurs + in the same position in the sort order as the other object. + + An object to compare with this instance. + A value that indicates the relative order of the objects being compared. The return value has these meanings: + + ValueMeaning + Less than zeroThis instance precedes in the sort order. + ZeroThis instance occurs in the same position in the sort order as . + Greater than zeroThis instance follows in the sort order. + + + + + + Determines whether the specified Object is equal + to the current Object. + + The Object to compare with the + current Object. + if the specified Object + is equal to the current Object; otherwise, + . + + + + Serves as a hash function for a particular type. + + A hash code for the current Object. + + + + Marks elements to indicate that each on the field or + property should be used in sequence to find the appropriate element. + + + + When used with a set of , the criteria are used + in sequence according to the Priority property to find child elements. Note that + the behavior when setting multiple Priority + properties to the same value, or not specifying a Priority value, is undefined. + + + + // Will find the element with the ID attribute matching "elementId", then will find + // a child element with the ID attribute matching "childElementId". + [FindsBySequence] + [FindsBy(How = How.Id, Using = "elementId", Priority = 0)] + [FindsBy(How = How.Id, Using = "childElementId", Priority = 1)] + public IWebElement thisElement; + + + + + + + Provides the lookup methods for the FindsBy attribute (for using in PageObjects) + + + + + Finds by + + + + + Finds by + + + + + Finds by + + + + + Finds by + + + + + Finds by + + + + + Finds by + + + + + Finds by + + + + + Finds by + + + + + Finds by a custom implementation. + + + + + Interface describing how elements are to be located by a . + + + A locator must always contain a way to retrieve the to + use in locating elements. In practice, this will usually be implemented by passing + the context in via a constructor. + + + + + Gets the to be used in locating elements. + + + + + Locates an element using the given list of criteria. + + The list of methods by which to search for the element. + An which is the first match under the desired criteria. + + + + Locates a list of elements using the given list of criteria. + + The list of methods by which to search for the elements. + A list of all elements which match the desired criteria. + + + + Interface describing how members of a class which represent elements in a Page Object + are detected. + + + + + Locates an element or list of elements for a Page Object member, and returns a + proxy object for the element or list of elements. + + The containing information about + a class's member. + The used to locate elements. + A transparent proxy to the WebDriver element object. + + + + Supplies a set of common conditions that can be waited for using . + + + + IWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(3)) + IWebElement element = wait.Until(ExpectedConditions.ElementExists(By.Id("foo"))); + + + + + + Prevents a default instance of the class from being created. + + + + + An expectation for checking the title of a page. + + The expected title, which must be an exact match. + when the title matches; otherwise, . + + + + An expectation for checking that the title of a page contains a case-sensitive substring. + + The fragment of title expected. + when the title matches; otherwise, . + + + + An expectation for the URL of the current page to be a specific URL. + + The URL that the page should be on + when the URL is what it should be; otherwise, . + + + + An expectation for the URL of the current page to be a specific URL. + + The fraction of the url that the page should be on + when the URL contains the text; otherwise, . + + + + An expectation for the URL of the current page to be a specific URL. + + The regular expression that the URL should match + if the URL matches the specified regular expression; otherwise, . + + + + An expectation for checking that an element is present on the DOM of a + page. This does not necessarily mean that the element is visible. + + The locator used to find the element. + The once it is located. + + + + An expectation for checking that an element is present on the DOM of a page + and visible. Visibility means that the element is not only displayed but + also has a height and width that is greater than 0. + + The locator used to find the element. + The once it is located and visible. + + + + An expectation for checking that all elements present on the web page that + match the locator are visible. Visibility means that the elements are not + only displayed but also have a height and width that is greater than 0. + + The locator used to find the element. + The list of once it is located and visible. + + + + An expectation for checking that all elements present on the web page that + match the locator are visible. Visibility means that the elements are not + only displayed but also have a height and width that is greater than 0. + + list of WebElements + The list of once it is located and visible. + + + + An expectation for checking that all elements present on the web page that + match the locator. + + The locator used to find the element. + The list of once it is located. + + + + An expectation for checking if the given text is present in the specified element. + + The WebElement + Text to be present in the element + once the element contains the given text; otherwise, . + + + + An expectation for checking if the given text is present in the element that matches the given locator. + + The locator used to find the element. + Text to be present in the element + once the element contains the given text; otherwise, . + + + + An expectation for checking if the given text is present in the specified elements value attribute. + + The WebElement + Text to be present in the element + once the element contains the given text; otherwise, . + + + + An expectation for checking if the given text is present in the specified elements value attribute. + + The locator used to find the element. + Text to be present in the element + once the element contains the given text; otherwise, . + + + + An expectation for checking whether the given frame is available to switch + to. If the frame is available it switches the given driver to the + specified frame. + + Used to find the frame (id or name) + + + + + An expectation for checking whether the given frame is available to switch + to. If the frame is available it switches the given driver to the + specified frame. + + Locator for the Frame + + + + + An expectation for checking that an element is either invisible or not present on the DOM. + + The locator used to find the element. + if the element is not displayed; otherwise, . + + + + An expectation for checking that an element with text is either invisible or not present on the DOM. + + The locator used to find the element. + Text of the element + if the element is not displayed; otherwise, . + + + + An expectation for checking an element is visible and enabled such that you + can click it. + + The locator used to find the element. + The once it is located and clickable (visible and enabled). + + + + An expectation for checking an element is visible and enabled such that you + can click it. + + The element. + The once it is clickable (visible and enabled). + + + + Wait until an element is no longer attached to the DOM. + + The element. + is the element is still attached to the DOM; otherwise, . + + + + An expectation for checking if the given element is selected. + + The element. + given element is selected.; otherwise, . + + + + An expectation for checking if the given element is in correct state. + + The element. + selected or not selected + given element is in correct state.; otherwise, . + + + + An expectation for checking if the given element is in correct state. + + The element. + selected or not selected + given element is in correct state.; otherwise, . + + + + An expectation for checking if the given element is selected. + + The locator used to find the element. + given element is selected.; otherwise, . + + + + An expectation for checking if the given element is in correct state. + + The locator used to find the element. + selected or not selected + given element is in correct state.; otherwise, . + + + + An expectation for checking the AlterIsPresent + + Alert + + + + An expectation for checking the Alert State + + A value indicating whether or not an alert should be displayed in order to meet this condition. + alert is in correct state present or not present; otherwise, . + + + + Interface allows for the component to be used in Nested Component scenarios such that the + child component class does not have to declare the generic type of the parent explicitly. + + + public class HypotheticalLoadableComponent : LoadableComponent<T> { + ILoadableComponent parent; + public HypotheticalLoadableComponent(ILoadableComponent parent) { + this.parent = parent; + } + protected void EvaluateLoadedStatus() { //code to determine loaded state } + protected void ExecuteLoad() { + parent.Load(); //loads the parent + //code to load this component + } + } + + + + + Loads the component. + + A reference to this . + + + + This exception is thrown by to indicate that + the component was not successfully loaded. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with + a specified error message. + + The message of the exception + + + + Initializes a new instance of the class with + a specified error message and a reference to the inner exception that is the + cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, + or if no inner exception is specified. + + + + Initializes a new instance of the class with serialized data. + + The that holds the serialized + object data about the exception being thrown. + The that contains contextual + information about the source or destination. + + + + Represents any abstraction of something that can be loaded. This may be an entire web page, or + simply a component within that page (such as a login box or menu) or even a service. + + The type to be returned (normally the subclass' type) + + The expected usage is: + + + new HypotheticalComponent().Load(); + + + + + After the method is called, the component will be loaded and + ready for use. Overload the protected Load and IsLoaded members to both load a component and determine + if the component is already loaded. + + + + + Gets or sets the message for the exception thrown when a component cannot be loaded + + + + + Gets a value indicating whether the component is fully loaded. + + + When the component is loaded, this property will return true or false depending on + the execution of to indicate the not loaded state. + + + + + Ensure that the component is currently loaded. + + The loaded component. + This is equivalent to the Get() method in Java version. + + + + Ensure that the component is currently loaded. + + The loaded instance. + + + + HandleLoadError gives a subclass the opportunity to handle a that occurred + during the execution of . + + The exception which occurs on load. + + + + When this method returns, the component modeled by the subclass should be fully loaded. This + subclass is expected to navigate to an appropriate page or trigger loading the correct HTML + should this be necessary. + + + + + Determine whether or not the component is loaded. Subclasses are expected to provide the details + to determine if the page or component is loaded. + + A boolean value indicating if the component is loaded. + + + + Attempts to load this component, providing an opportunity for the user to handle any errors encountered + during the load process. + + A self-reference to this + + + + Provides a mechanism by which the window handle of an invoked + popup browser window may be determined. + + + + // Store the current window handle so you can switch back to the + // original window when you close the popup. + string current = driver.CurrentWindowHandle; + PopupWindowFinder finder = new PopupWindowFinder(driver); + string newHandle = finder.Click(driver.FindElement(By.LinkText("Open new window"))); + driver.SwitchTo.Window(newHandle); + + + + + + Initializes a new instance of the class. + + The instance that is used + to manipulate the popup window. + When using this constructor overload, the timeout will be 5 seconds, + and the check for a new window will be performed every 250 milliseconds. + + + + Initializes a new instance of the class + with the specified timeout. + + The instance that is used + to manipulate the popup window. + The representing the amount of + time to wait for the popup window to appear. + When using this constructor overload, the check for a new window + will be performed every 250 milliseconds. + + + + Initializes a new instance of the class + with the specified timeout and using the specified interval to check for + the existence of the new window. + + The instance that is used + to manipulate the popup window. + The representing the amount of + time to wait for the popup window to appear. + The representing the + amount of time to wait between checks of the available window handles. + + + + Clicks on an element that is expected to trigger a popup browser window. + + The that, when clicked, invokes + the popup browser window. + The window handle of the popup browser window. + Thrown if no popup window appears within the specified timeout. + Thrown if the element to click is . + + + + Invokes a method that is expected to trigger a popup browser window. + + An that, when run, invokes + the popup browser window. + The window handle of the popup browser window. + Thrown if no popup window appears within the specified timeout. + Thrown if the action to invoke is . + + + + Provides a convenience method for manipulating selections of options in an HTML select element. + + + + + Initializes a new instance of the class. + + The element to be wrapped + Thrown when the object is + Thrown when the element wrapped is not a <select> element. + + + + Gets the wrapped by this object. + + + + + Gets a value indicating whether the parent element supports multiple selections. + + + + + Gets the list of options for the select element. + + + + + Gets the selected item within the select element. + + If more than one item is selected this will return the first item. + Thrown if no option is selected. + + + + Gets all of the selected options within the select element. + + + + + Select all options by the text displayed. + + The text of the option to be selected. + Default value is false. If true a partial match on the Options list will be performed, otherwise exact match. + When given "Bar" this method would select an option like: + + <option value="foo">Bar</option> + + + Thrown if there is no element with the given text present. + + + + Select an option by the value. + + The value of the option to be selected. + When given "foo" this method will select an option like: + + <option value="foo">Bar</option> + + + Thrown when no element with the specified value is found. + + + + Select the option by the index, as determined by the "index" attribute of the element. + + The value of the index attribute of the option to be selected. + Thrown when no element exists with the specified index attribute. + + + + Clear all selected entries. This is only valid when the SELECT supports multiple selections. + + Thrown when attempting to deselect all options from a SELECT + that does not support multiple selections. + + + + Deselect the option by the text displayed. + + Thrown when attempting to deselect option from a SELECT + that does not support multiple selections. + Thrown when no element exists with the specified test attribute. + The text of the option to be deselected. + When given "Bar" this method would deselect an option like: + + <option value="foo">Bar</option> + + + + + + Deselect the option having value matching the specified text. + + Thrown when attempting to deselect option from a SELECT + that does not support multiple selections. + Thrown when no element exists with the specified value attribute. + The value of the option to deselect. + When given "foo" this method will deselect an option like: + + <option value="foo">Bar</option> + + + + + + Deselect the option by the index, as determined by the "index" attribute of the element. + + Thrown when attempting to deselect option from a SELECT + that does not support multiple selections. + Thrown when no element exists with the specified index attribute. + The value of the index attribute of the option to deselect. + + + + A which might not have finished loading when Load() returns. After a + call to Load(), the IsLoaded property should continue to return false until the component has fully + loaded. Use the HandleErrors() method to check for error conditions which caused the Load() to fail. + +
+            new SlowHypotheticalComponent().Load();
+            
+
+
+ The type to be returned (normally the subclass' type) +
+ + + Initializes a new instance of the class. + + The within which the component should be loaded. + + + + Initializes a new instance of the class. + + The within which the component should be loaded. + The to use when measuring the timeout. + + + + Gets or sets the time to sleep between each check of the load status of the component. + + + + + Ensures that the component is currently loaded. + + The loaded component. + This is equivalent to the Get() method in Java version. + + + + Checks for well known error cases, which would mean that loading has finished, but an error + condition was seen. + + + This method should be overridden so that expected errors can be automatically handled. + + + + + The exception thrown when using the Select class on a tag that + does not support the HTML select element's selection semantics. + + + + + Initializes a new instance of the class with + the expected tag name and the actual tag name. + + The tag name that was expected. + The actual tag name of the element. + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with + a specified error message. + + The message of the exception + + + + Initializes a new instance of the class with + a specified error message and a reference to the inner exception that is the + cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, + or if no inner exception is specified. + + + + Initializes a new instance of the class with serialized data. + + The that holds the serialized + object data about the exception being thrown. + The that contains contextual + information about the source or destination. + +
+
diff --git a/src/lib/WebDriver/netstandard2.0/WebDriver.dll b/src/lib/WebDriver/netstandard2.0/WebDriver.dll new file mode 100644 index 0000000..fc4069f Binary files /dev/null and b/src/lib/WebDriver/netstandard2.0/WebDriver.dll differ diff --git a/src/lib/WebDriver/netstandard2.0/WebDriver.xml b/src/lib/WebDriver/netstandard2.0/WebDriver.xml new file mode 100644 index 0000000..a9e8f14 --- /dev/null +++ b/src/lib/WebDriver/netstandard2.0/WebDriver.xml @@ -0,0 +1,12083 @@ + + + + WebDriver + + + + + Provides a mechanism by which to find elements within a document. + + It is possible to create your own locating mechanisms for finding documents. + In order to do this,subclass this class and override the protected methods. However, + it is expected that that all subclasses rely on the basic finding mechanisms provided + through static methods of this class. An example of this can be found in OpenQA.Support.ByIdOrName + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class using the given functions to find elements. + + A function that takes an object implementing + and returns the found . + A function that takes an object implementing + and returns a of the foundIWebElements. + IWebElements/>. + + + + Gets or sets the value of the description for this class instance. + + + + + Gets or sets the method used to find a single element matching specified criteria. + + + + + Gets or sets the method used to find all elements matching specified criteria. + + + + + Determines if two instances are equal. + + One instance to compare. + The other instance to compare. + if the two instances are equal; otherwise, . + + + + Determines if two instances are unequal. + s + One instance to compare. + The other instance to compare. + if the two instances are not equal; otherwise, . + + + + Gets a mechanism to find elements by their ID. + + The ID to find. + A object the driver can use to find the elements. + + + + Gets a mechanism to find elements by their link text. + + The link text to find. + A object the driver can use to find the elements. + + + + Gets a mechanism to find elements by their name. + + The name to find. + A object the driver can use to find the elements. + + + + Gets a mechanism to find elements by an XPath query. + When searching within a WebElement using xpath be aware that WebDriver follows standard conventions: + a search prefixed with "//" will search the entire document, not just the children of this current node. + Use ".//" to limit your search to the children of this WebElement. + + The XPath query to use. + A object the driver can use to find the elements. + + + + Gets a mechanism to find elements by their CSS class. + + The CSS class to find. + A object the driver can use to find the elements. + If an element has many classes then this will match against each of them. + For example if the value is "one two onone", then the following values for the + className parameter will match: "one" and "two". + + + + Gets a mechanism to find elements by a partial match on their link text. + + The partial link text to find. + A object the driver can use to find the elements. + + + + Gets a mechanism to find elements by their tag name. + + The tag name to find. + A object the driver can use to find the elements. + + + + Gets a mechanism to find elements by their cascading style sheet (CSS) selector. + + The CSS selector to find. + A object the driver can use to find the elements. + + + + Finds the first element matching the criteria. + + An object to use to search for the elements. + The first matching on the current context. + + + + Finds all elements matching the criteria. + + An object to use to search for the elements. + A of all WebElements + matching the current criteria, or an empty list if nothing matches. + + + + Gets a string representation of the finder. + + The string displaying the finder content. + + + + Determines whether the specified Object is equal + to the current Object. + + The Object to compare with the + current Object. + if the specified Object + is equal to the current Object; otherwise, + . + + + + Serves as a hash function for a particular type. + + A hash code for the current Object. + + + + Provides a mechanism to write tests against Chrome + + + + [TestFixture] + public class Testing + { + private IWebDriver driver; + + [SetUp] + public void SetUp() + { + driver = new ChromeDriver(); + } + + [Test] + public void TestGoogle() + { + driver.Navigate().GoToUrl("http://www.google.co.uk"); + /* + * Rest of the test + */ + } + + [TearDown] + public void TearDown() + { + driver.Quit(); + } + } + + + + + + Accept untrusted SSL Certificates + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class using the specified options. + + The to be used with the Chrome driver. + + + + Initializes a new instance of the class using the specified driver service. + + The used to initialize the driver. + + + + Initializes a new instance of the class using the specified path + to the directory containing ChromeDriver.exe. + + The full path to the directory containing ChromeDriver.exe. + + + + Initializes a new instance of the class using the specified path + to the directory containing ChromeDriver.exe and options. + + The full path to the directory containing ChromeDriver.exe. + The to be used with the Chrome driver. + + + + Initializes a new instance of the class using the specified path + to the directory containing ChromeDriver.exe, options, and command timeout. + + The full path to the directory containing ChromeDriver.exe. + The to be used with the Chrome driver. + The maximum amount of time to wait for each command. + + + + Initializes a new instance of the class using the specified + and options. + + The to use. + The used to initialize the driver. + + + + Initializes a new instance of the class using the specified . + + The to use. + The to be used with the Chrome driver. + The maximum amount of time to wait for each command. + + + + Gets or sets the responsible for detecting + sequences of keystrokes representing file paths and names. + + The Chrome driver does not allow a file detector to be set, + as the server component of the Chrome driver (ChromeDriver.exe) only + allows uploads from the local computer environment. Attempting to set + this property has no effect, but does not throw an exception. If you + are attempting to run the Chrome driver remotely, use + in conjunction with a standalone WebDriver server. + + + + Gets or sets the network condition emulation for Chrome. + + + + + Executes a custom Chrome command. + + Name of the command to execute. + Parameters of the command to execute. + + + + Exposes the service provided by the native ChromeDriver executable. + + + + + Initializes a new instance of the class. + + The full path to the ChromeDriver executable. + The file name of the ChromeDriver executable. + The port on which the ChromeDriver executable should listen. + + + + Gets or sets the location of the log file written to by the ChromeDriver executable. + + + + + Gets or sets the base URL path prefix for commands (e.g., "wd/url"). + + + + + Gets or sets the address of a server to contact for reserving a port. + + + + + Gets or sets the port on which the Android Debug Bridge is listening for commands. + + + + + Gets or sets a value indicating whether to enable verbose logging for the ChromeDriver executable. + Defaults to . + + + + + Gets or sets the comma-delimited list of IP addresses that are approved to + connect to this instance of the Chrome driver. Defaults to an empty string, + which means only the local loopback address can connect. + + + + + Gets the command-line arguments for the driver service. + + + + + Creates a default instance of the ChromeDriverService. + + A ChromeDriverService that implements default settings. + + + + Creates a default instance of the ChromeDriverService using a specified path to the ChromeDriver executable. + + The directory containing the ChromeDriver executable. + A ChromeDriverService using a random port. + + + + Creates a default instance of the ChromeDriverService using a specified path to the ChromeDriver executable with the given name. + + The directory containing the ChromeDriver executable. + The name of the ChromeDriver executable file. + A ChromeDriverService using a random port. + + + + Returns the Chrome driver filename for the currently running platform + + The file name of the Chrome driver service executable. + + + + Represents the type-safe options for setting settings for emulating a + mobile device in the Chrome browser. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The user agent string to be used by the browser when emulating + a mobile device. + + + + Gets or sets the user agent string to be used by the browser when emulating + a mobile device. + + + + + Gets or sets the width in pixels to be used by the browser when emulating + a mobile device. + + + + + Gets or sets the height in pixels to be used by the browser when emulating + a mobile device. + + + + + Gets or sets the pixel ratio to be used by the browser when emulating + a mobile device. + + + + + Gets or sets a value indicating whether touch events should be enabled by + the browser when emulating a mobile device. Defaults to . + + + + + Provides manipulation of getting and setting network conditions from Chrome. + + + + + Gets or sets a value indicating whether the network is offline. Defaults to . + + + + + Gets or sets the simulated latency of the connection. Typically given in milliseconds. + + + + + Gets or sets the throughput of the network connection in kb/second for downloading. + + + + + Gets or sets the throughput of the network connection in kb/second for uploading. + + + + + Class to manage options specific to + + + Used with ChromeDriver.exe v17.0.963.0 and higher. + + + + ChromeOptions options = new ChromeOptions(); + options.AddExtensions("\path\to\extension.crx"); + options.BinaryLocation = "\path\to\chrome"; + + + For use with ChromeDriver: + + + ChromeDriver driver = new ChromeDriver(options); + + + For use with RemoteWebDriver: + + + RemoteWebDriver driver = new RemoteWebDriver(new Uri("http://localhost:4444/wd/hub"), options.ToCapabilities()); + + + + + + Gets the name of the capability used to store Chrome options in + a object. + + + + + Gets or sets the location of the Chrome browser's binary executable file. + + + + + Gets or sets a value indicating whether Chrome should be left running after the + ChromeDriver instance is exited. Defaults to . + + + + + Gets the list of arguments appended to the Chrome command line as a string array. + + + + + Gets the list of extensions to be installed as an array of base64-encoded strings. + + + + + Gets or sets the address of a Chrome debugger server to connect to. + Should be of the form "{hostname|IP address}:port". + + + + + Gets or sets the directory in which to store minidump files. + + + + + Gets or sets the performance logging preferences for the driver. + + + + + Gets or sets a value indicating whether the instance + should use the legacy OSS protocol dialect or a dialect compliant with the W3C + WebDriver Specification. + + + + + Adds a single argument to the list of arguments to be appended to the Chrome.exe command line. + + The argument to add. + + + + Adds arguments to be appended to the Chrome.exe command line. + + An array of arguments to add. + + + + Adds arguments to be appended to the Chrome.exe command line. + + An object of arguments to add. + + + + Adds a single argument to be excluded from the list of arguments passed by default + to the Chrome.exe command line by chromedriver.exe. + + The argument to exclude. + + + + Adds arguments to be excluded from the list of arguments passed by default + to the Chrome.exe command line by chromedriver.exe. + + An array of arguments to exclude. + + + + Adds arguments to be excluded from the list of arguments passed by default + to the Chrome.exe command line by chromedriver.exe. + + An object of arguments to exclude. + + + + Adds a path to a packed Chrome extension (.crx file) to the list of extensions + to be installed in the instance of Chrome. + + The full path to the extension to add. + + + + Adds a list of paths to packed Chrome extensions (.crx files) to be installed + in the instance of Chrome. + + An array of full paths to the extensions to add. + + + + Adds a list of paths to packed Chrome extensions (.crx files) to be installed + in the instance of Chrome. + + An of full paths to the extensions to add. + + + + Adds a base64-encoded string representing a Chrome extension to the list of extensions + to be installed in the instance of Chrome. + + A base64-encoded string representing the extension to add. + + + + Adds a list of base64-encoded strings representing Chrome extensions to the list of extensions + to be installed in the instance of Chrome. + + An array of base64-encoded strings representing the extensions to add. + + + + Adds a list of base64-encoded strings representing Chrome extensions to be installed + in the instance of Chrome. + + An of base64-encoded strings + representing the extensions to add. + + + + Adds a preference for the user-specific profile or "user data directory." + If the specified preference already exists, it will be overwritten. + + The name of the preference to set. + The value of the preference to set. + + + + Adds a preference for the local state file in the user's data directory for Chrome. + If the specified preference already exists, it will be overwritten. + + The name of the preference to set. + The value of the preference to set. + + + + Allows the Chrome browser to emulate a mobile device. + + The name of the device to emulate. The device name must be a + valid device name from the Chrome DevTools Emulation panel. + Specifying an invalid device name will not throw an exeption, but + will generate an error in Chrome when the driver starts. To unset mobile + emulation, call this method with as the argument. + + + + Allows the Chrome browser to emulate a mobile device. + + The + object containing the settings of the device to emulate. + Thrown if the device settings option does + not have a user agent string set. + Specifying an invalid device name will not throw an exeption, but + will generate an error in Chrome when the driver starts. To unset mobile + emulation, call this method with as the argument. + + + + Adds a type of window that will be listed in the list of window handles + returned by the Chrome driver. + + The name of the window type to add. + This method can be used to allow the driver to access {webview} + elements by adding "webview" as a window type. + + + + Adds a list of window types that will be listed in the list of window handles + returned by the Chrome driver. + + An array of window types to add. + + + + Adds a list of window types that will be listed in the list of window handles + returned by the Chrome driver. + + An of window types to add. + + + + Provides a means to add additional capabilities not yet added as type safe options + for the Chrome driver. + + The name of the capability to add. + The value of the capability to add. + + thrown when attempting to add a capability for which there is already a type safe option, or + when is or the empty string. + + Calling + where has already been added will overwrite the + existing value with the new value in . + Also, by default, calling this method adds capabilities to the options object passed to + chromedriver.exe. + + + + Provides a means to add additional capabilities not yet added as type safe options + for the Chrome driver. + + The name of the capability to add. + The value of the capability to add. + Indicates whether the capability is to be set as a global + capability for the driver instead of a Chrome-specific option. + + thrown when attempting to add a capability for which there is already a type safe option, or + when is or the empty string. + + Calling + where has already been added will overwrite the + existing value with the new value in + + + + Returns DesiredCapabilities for Chrome with these options included as + capabilities. This does not copy the options. Further changes will be + reflected in the returned capabilities. + + The DesiredCapabilities for Chrome with these options. + + + + Represents the type-safe options for setting preferences for performance + logging in the Chrome browser. + + + + + Gets or sets a value indicating whether Chrome will collect events from the Network domain. + Defaults to . + + + + + Gets or sets a value indicating whether Chrome will collect events from the Page domain. + Defaults to . + + + + + Gets or sets the interval between Chrome DevTools trace buffer usage events. + Defaults to 1000 milliseconds. + + Thrown when an attempt is made to set + the value to a time span of less tnan or equal to zero milliseconds. + + + + Gets a comma-separated list of the categories for which tracing is enabled. + + + + + Adds a single category to the list of Chrome tracing categories for which events should be collected. + + The category to add. + + + + Adds categories to the list of Chrome tracing categories for which events should be collected. + + An array of categories to add. + + + + Adds categories to the list of Chrome tracing categories for which events should be collected. + + An object of categories to add. + + + + Provides a mechanism to get elements off the page for test + + + + + Initializes a new instance of the class. + + Driver in use + Id of the element + + + + Represents a cookie in the browser. + + + + + Initializes a new instance of the class with a specific name, + value, domain, path and expiration date. + + The name of the cookie. + The value of the cookie. + The domain of the cookie. + The path of the cookie. + The expiration date of the cookie. + If the name is or an empty string, + or if it contains a semi-colon. + If the value is . + + + + Initializes a new instance of the class with a specific name, + value, path and expiration date. + + The name of the cookie. + The value of the cookie. + The path of the cookie. + The expiration date of the cookie. + If the name is or an empty string, + or if it contains a semi-colon. + If the value is . + + + + Initializes a new instance of the class with a specific name, + value, and path. + + The name of the cookie. + The value of the cookie. + The path of the cookie. + If the name is or an empty string, + or if it contains a semi-colon. + If the value is . + + + + Initializes a new instance of the class with a specific name and value. + + The name of the cookie. + The value of the cookie. + If the name is or an empty string, + or if it contains a semi-colon. + If the value is . + + + + Gets the name of the cookie. + + + + + Gets the value of the cookie. + + + + + Gets the domain of the cookie. + + + + + Gets the path of the cookie. + + + + + Gets a value indicating whether the cookie is secure. + + + + + Gets a value indicating whether the cookie is an HTTP-only cookie. + + + + + Gets the expiration date of the cookie. + + + + + Gets the cookie expiration date in seconds from the defined zero date (01 January 1970 00:00:00 UTC). + + This property only exists so that the JSON serializer can serialize a + cookie without resorting to a custom converter. + + + + Converts a Dictionary to a Cookie. + + The Dictionary object containing the cookie parameters. + A object with the proper parameters set. + + + + Creates and returns a string representation of the cookie. + + A string representation of the cookie. + + + + Determines whether the specified Object is equal + to the current Object. + + The Object to compare with the + current Object. + if the specified Object + is equal to the current Object; otherwise, + . + + + + Serves as a hash function for a particular type. + + A hash code for the current Object. + + + + Represents the default file detector for determining whether a file + must be uploaded to a remote server. + + + + + Returns a value indicating whether a specified key sequence represents + a file name and path. + + The sequence to test for file existence. + This method always returns in this implementation. + + + + Specifies the behavior of handling unexpected alerts in the IE driver. + + + + + Indicates the behavior is not set. + + + + + Ignore unexpected alerts, such that the user must handle them. + + + + + Accept unexpected alerts. + + + + + Dismiss unexpected alerts. + + + + + Accepts unexpected alerts and notifies the user that the alert has + been accepted by throwing an + + + + + Dismisses unexpected alerts and notifies the user that the alert has + been dismissed by throwing an + + + + + Specifies the behavior of waiting for page loads in the driver. + + + + + Indicates the behavior is not set. + + + + + Waits for pages to load and ready state to be 'complete'. + + + + + Waits for pages to load and for ready state to be 'interactive' or 'complete'. + + + + + Does not wait for pages to load, returning immediately. + + + + + Base class for managing options specific to a browser driver. + + + + + Gets or sets the name of the browser. + + + + + Gets or sets the version of the browser. + + + + + Gets or sets the name of the platform on which the browser is running. + + + + + Gets or sets a value indicating whether the browser should accept self-signed + SSL certificates. + + + + + Gets or sets the value for describing how unexpected alerts are to be handled in the browser. + Defaults to . + + + + + Gets or sets the value for describing how the browser is to wait for pages to load in the browser. + Defaults to . + + + + + Gets or sets the to be used with this browser. + + + + + Provides a means to add additional capabilities not yet added as type safe options + for the specific browser driver. + + The name of the capability to add. + The value of the capability to add. + + thrown when attempting to add a capability for which there is already a type safe option, or + when is or the empty string. + + Calling + where has already been added will overwrite the + existing value with the new value in . + + + + + Returns the for the specific browser driver with these + options included as capabilities. This does not copy the options. Further + changes will be reflected in the returned capabilities. + + The for browser driver with these options. + + + + Compares this object with another to see if there + are merge conflicts between them. + + The object to compare with. + A object containing the status of the attempted merge. + + + + Sets the logging preferences for this driver. + + The type of log for which to set the preference. + Known log types can be found in the class. + The value to which to set the log level. + + + + Returns a string representation of this . + + A string representation of this . + + + + Returns the current options as a . + + The current options as a . + + + + Adds a known capability to the list of known capabilities and associates it + with the type-safe property name of the options class to be used instead. + + The name of the capability. + The name of the option property or method to be used instead. + + + + Gets a value indicating whether the specified capability name is a known capability name which has a type-safe option. + + The name of the capability to check. + if the capability name is known; otherwise . + + + + Gets the name of the type-safe option for a given capability name. + + The name of the capability to check. + The name of the type-safe option for the given capability name. + + + + Generates the logging preferences dictionary for transmission as a desired capability. + + The dictionary containing the logging preferences. + + + + Generates the current options as a capabilities object for further processing. + + A value indicating whether to generate capabilities compliant with the W3C WebDriver Specification. + A object representing the current options for further processing. + + + + Gets or sets a value indicating whether the DriverOptions would conflict when merged with another option + + + + + Gets or sets the name of the name of the option that is in conflict. + + + + + Provides types of capabilities for the DesiredCapabilities object. + + + + + Capability name used for the browser name. + + + + + Capability name used for the browser version. + + + + + Capability name used for the platform name. + + + + + Capability name used for the browser platform. + + + + + Capability name used for the browser version. + + + + + Capability name used to indicate whether JavaScript is enabled for the browser. + + + + + Capability name used to indicate whether the browser can take screenshots. + + + + + Capability name used to indicate whether the browser can handle alerts. + + + + + Capability name used to indicate whether the browser can find elements via CSS selectors. + + + + + Capability name used for the browser proxy. + + + + + Capability name used to indicate whether the browser supports rotation. + + + + + Capability name used to indicate whether the browser accepts SSL certificates. + + + + + Capability name used to indicate whether the browser accepts SSL certificates on W3C Endpoints + + + + + Capability name used to indicate whether the browser uses native events. + + + + + Capability name used to indicate how the browser handles unexpected alerts. + + + + + Capability name used to indicate how the browser handles unhandled user prompts. + + + + + Capability name used to indicate the page load strategy for the browser. + + + + + Capability name used to indicate the logging preferences for the session. + + + + + Capability name used to disable the check for overlapping elements. + + + + + Capability name used to enable the profiling log for the session. + + + + + Capability name used to indicate whether the driver supports geolocation context. + + + + + Capability name used to indicate whether the driver supports application cache. + + + + + Capability name used to indicate whether the driver supports web storage. + + + + + Capability name used to indicate whether the driver supports setting the browser window's size and position. + + + + + Capability name used to get or set timeout values when creating a session. + + + + + Provides a way to send commands to the remote server + + + + + Initializes a new instance of the class using a command name and a JSON-encoded string for the parameters. + + Name of the command + Parameters for the command as a JSON-encoded string. + + + + Initializes a new instance of the class for a Session + + Session ID the driver is using + Name of the command + Parameters for that command + + + + Gets the SessionID of the command + + + + + Gets the command name + + + + + Gets the parameters of the command + + + + + Gets the parameters of the command as a JSON-encoded string. + + + + + Returns a string of the Command object + + A string representation of the Command Object + + + + Gets the command parameters as a , with a string key, and an object value. + + The JSON-encoded string representing the command parameters. + A with a string keys, and an object value. + + + + Provides the execution information for a . + + + + + POST verb for the command info + + + + + GET verb for the command info + + + + + DELETE verb for the command info + + + + + Initializes a new instance of the class + + Method of the Command + Relative URL path to the resource used to execute the command + + + + Gets the URL representing the path to the resource. + + + + + Gets the HTTP method associated with the command. + + + + + Creates the full URI associated with this command, substituting command + parameters for tokens in the URI template. + + The base URI associated with the command. + The command containing the parameters with which + to substitute the tokens in the template. + The full URI for the command, with the parameters of the command + substituted for the tokens in the template. + + + + Holds the information about all commands specified by the JSON wire protocol. + This class cannot be inherited, as it is intended to be a singleton, and + allowing subclasses introduces the possibility of multiple instances. + + + + + Initializes a new instance of the class. + Protected accessibility prevents a default instance from being created. + + + + + Gets the level of the W3C WebDriver specification that this repository supports. + + + + + Gets the for a . + + The for which to get the information. + The for the specified command. + + + + Tries to add a command to the list of known commands. + + Name of the command. + The command information. + if the new command has been added successfully; otherwise, . + + This method is used by WebDriver implementations to add additional custom driver-specific commands. + This method will not overwrite existing commands for a specific name, and will return + in that case. + + + + + Initializes the dictionary of commands for the CommandInfoRepository + + + + + Class to Create the capabilities of the browser you require for . + If you wish to use default values use the static methods + + + + + Initializes a new instance of the class + + Name of the browser e.g. firefox, internet explorer, safari + Version of the browser + The platform it works on + + + + Initializes a new instance of the class + + + + + Initializes a new instance of the class + + Dictionary of items for the remote driver + + + DesiredCapabilities capabilities = new DesiredCapabilities(new Dictionary]]>(){["browserName","firefox"],["version",string.Empty],["javaScript",true]}); + + + + + + Initializes a new instance of the class + + Name of the browser e.g. firefox, internet explorer, safari + Version of the browser + The platform it works on + Sets a value indicating whether the capabilities are + compliant with the W3C WebDriver specification. + + + + Gets the browser name + + + + + Gets or sets the platform + + + + + Gets the browser version + + + + + Gets or sets a value indicating whether the browser accepts SSL certificates. + + + + + Gets the underlying Dictionary for a given set of capabilities. + + + + + Gets the underlying Dictionary for a given set of capabilities. + + + + + Gets the capability value with the specified name. + + The name of the capability to get. + The value of the capability. + + The specified capability name is not in the set of capabilities. + + + + + Gets a value indicating whether the browser has a given capability. + + The capability to get. + Returns if the browser has the capability; otherwise, . + + + + Gets a capability of the browser. + + The capability to get. + An object associated with the capability, or + if the capability is not set on the browser. + + + + Sets a capability of the browser. + + The capability to get. + The value for the capability. + + + + Return HashCode for the DesiredCapabilities that has been created + + Integer of HashCode generated + + + + Return a string of capabilities being used + + String of capabilities being used + + + + Compare two DesiredCapabilities and will return either true or false + + DesiredCapabilities you wish to compare + true if they are the same or false if they are not + + + + Returns a read-only version of this capabilities object. + + A read-only version of this capabilities object. + + + + Values describing the list of commands understood by a remote server using the JSON wire protocol. + + + + + Represents the Define Driver Mapping command + + + + + Represents the Status command. + + + + + Represents a New Session command + + + + + Represents the Get Session List command + + + + + Represents the Get Session Capabilities command + + + + + Represents a Browser close command + + + + + Represents a browser quit command + + + + + Represents a GET command + + + + + Represents a Browser going back command + + + + + Represents a Browser going forward command + + + + + Represents a Browser refreshing command + + + + + Represents adding a cookie command + + + + + Represents getting all cookies command + + + + + Represents getting cookie command + + + + + Represents deleting a cookie command + + + + + Represents Deleting all cookies command + + + + + Represents FindElement command + + + + + Represents FindElements command + + + + + Represents FindChildElement command + + + + + Represents FindChildElements command + + + + + Describes an element + + + + + Represents ClearElement command + + + + + Represents ClickElement command + + + + + Represents SendKeysToElements command + + + + + Represents TapElement command + + + + + Represents SubmitElement command + + + + + Represents GetCurrentWindowHandle command + + + + + Represents GetWindowHandles command + + + + + Represents SwitchToWindow command + + + + + Represents SwitchToFrame command + + + + + Represents SwitchToParentFrame command + + + + + Represents GetActiveElement command + + + + + Represents GetCurrentUrl command + + + + + Represents GetPageSource command + + + + + Represents GetTitle command + + + + + Represents ExecuteScript command + + + + + Represents ExecuteAsyncScript command + + + + + Represents GetElementText command + + + + + Represents GetElementTagName command + + + + + Represents IsElementSelected command + + + + + Represents IsElementEnabled command + + + + + Represents IsElementDisplayed command + + + + + Represents GetElementLocation command + + + + + Represents GetElementLocationOnceScrolledIntoView command + + + + + Represents GetElementSize command + + + + + Represents GetElementRect command + + + + + Represents GetElementAttribute command + + + + + Represents GetElementProperty command + + + + + Represents GetElementValueOfCSSProperty command + + + + + Represents ElementEquals command + + + + + Represents Screenshot command + + + + + Represents the ElementScreenshot command + + + + + Represents GetOrientation command + + + + + Represents SetOrientation command + + + + + Represents GetWindowSize command + + + + + Represents SetWindowSize command + + + + + Represents GetWindowPosition command + + + + + Represents SetWindowPosition command + + + + + Represents GetWindowRect command + + + + + Represents SetWindowRect command + + + + + Represents MaximizeWindow command + + + + + Represents MinimizeWindow command + + + + + Represents FullScreenWindow command + + + + + Represents the DismissAlert command + + + + + Represents the AcceptAlert command + + + + + Represents the GetAlertText command + + + + + Represents the SetAlertValue command + + + + + Represents the Authenticate command + + + + + Represents the ImplicitlyWait command + + + + + Represents the SetAsyncScriptTimeout command + + + + + Represents the SetTimeout command + + + + + Represents the SetTimeout command + + + + + Represents the Actions command. + + + + + Represents the CancelActions command. + + + + + Represents the MouseClick command. + + + + + Represents the MouseDoubleClick command. + + + + + Represents the MouseDown command. + + + + + Represents the MouseUp command. + + + + + Represents the MouseMoveTo command. + + + + + Represents the SendKeysToActiveElement command. + + + + + Represents the UploadFile command. + + + + + Represents the TouchSingleTap command. + + + + + Represents the TouchPress command. + + + + + Represents the TouchRelease command. + + + + + Represents the TouchMove command. + + + + + Represents the TouchScroll command. + + + + + Represents the TouchDoubleTap command. + + + + + Represents the TouchLongPress command. + + + + + Represents the TouchFlick command. + + + + + Represents the GetLocation command. + + + + + Represents the SetLocation command. + + + + + Represents the GetAppCache command. + + + + + Represents the application cache GetStatus command. + + + + + Represents the ClearAppCache command. + + + + + Represents the GetLocalStorageItem command. + + + + + Represents the GetLocalStorageKeys command. + + + + + Represents the SetLocalStorageItem command. + + + + + Represents the RemoveLocalStorageItem command. + + + + + Represents the ClearLocalStorage command. + + + + + Represents the GetLocalStorageSize command. + + + + + Represents the GetSessionStorageItem command. + + + + + Represents the GetSessionStorageKeys command. + + + + + Represents the SetSessionStorageItem command. + + + + + Represents the RemoveSessionStorageItem command. + + + + + Represents the ClearSessionStorage command. + + + + + Represents the GetSessionStorageSize command. + + + + + Represents the GetAvailableLogTypes command. + + + + + Represents the GetLog command. + + + + + Provides a mechanism to execute commands on the browser + + + + + Initializes a new instance of the class. + + The that drives the browser. + The maximum amount of time to wait for each command. + + + + Initializes a new instance of the class. + + The that drives the browser. + The maximum amount of time to wait for each command. + if the KeepAlive header should be sent + with HTTP requests; otherwise, . + + + + Gets the object associated with this executor. + + + + + Gets the that sends commands to the remote + end WebDriver implementation. + + + + + Executes a command + + The command you wish to execute + A response from the browser + + + + Releases all resources used by the . + + + + + Releases the unmanaged resources used by the and + optionally releases the managed resources. + + to release managed and resources; + to only release unmanaged resources. + + + + Provides a way to store errors from a response + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class using the specified values. + + A containing names and values of + the properties of this . + + + + Gets or sets the message from the response + + + + + Gets or sets the class name that threw the error + + + + + Gets or sets the screenshot of the error + + + + + Gets or sets the stack trace of the error + + + + + Provides a way of executing Commands over HTTP + + + + + Initializes a new instance of the class + + Address of the WebDriver Server + The timeout within which the server must respond. + + + + Initializes a new instance of the class + + Address of the WebDriver Server + The timeout within which the server must respond. + if the KeepAlive header should be sent + with HTTP requests; otherwise, . + + + + Gets the repository of objects containin information about commands. + + + + + Gets or sets an object to be used to proxy requests + between this and the remote end WebDriver + implementation. + + + + + Gets or sets a value indicating whether keep-alive is enabled for HTTP + communication between this and the + remote end WebDriver implementation. + + + + + Executes a command + + The command you wish to execute + A response from the browser + + + + Raises the event. + + A that contains the event data. + + + + Releases all resources used by the . + + + + + Releases the unmanaged resources used by the and + optionally releases the managed resources. + + to release managed and resources; + to only release unmanaged resources. + + + + Provides a way to send commands to the remote server + + + + + Gets the repository of objects containin information about commands. + + + + + Executes a command + + The command you wish to execute + A response from the browser + + + + Provides a way to start a server that understands remote commands + + + + + Starts the server. + + + + + Interface indicating the driver has a Session ID. + + + + + Gets the session ID of the current session. + + + + + Provides a way to convert a Char array to JSON + + + + + Checks if the object can be converted + + Type of the object to see if can be converted + True if can be converted else false + + + + Writes the Object to JSON + + A JSON Writer object + Object to be converted + JSON Serializer object instance + + + + Method not implemented + + JSON Reader instance + Object type being read + Existing Value to be read + JSON Serializer instance + Object from JSON + + + + Converts the response to JSON + + + + + Checks if the object can be converted + + The object to be converted + True if it can be converted or false if can't be + + + + Process the reader to return an object from JSON + + A JSON reader + Type of the object + The existing value of the object + JSON Serializer + Object created from JSON + + + + Writes objects to JSON. Currently not implemented + + JSON Writer Object + Value to be written + JSON Serializer + + + + Represents a file detector for determining whether a file + must be uploaded to a remote server. + + + + + Returns a value indicating whether a specified key sequence represents + a file name and path. + + The sequence to test for file existence. + if the key sequence represents a file; otherwise, . + + + + Class to Create the capabilities of the browser you require for . + If you wish to use default values use the static methods + + + + + Prevents a default instance of the class. + + + + + Gets the browser name + + + + + Gets or sets the platform + + + + + Gets the browser version + + + + + Gets or sets a value indicating whether the browser accepts SSL certificates. + + + + + Gets the underlying Dictionary for a given set of capabilities. + + + + + Gets the underlying Dictionary for a given set of capabilities. + + + + + Gets the capability value with the specified name. + + The name of the capability to get. + The value of the capability. + + The specified capability name is not in the set of capabilities. + + + + + Gets a value indicating whether the browser has a given capability. + + The capability to get. + Returns if the browser has the capability; otherwise, . + + + + Gets a capability of the browser. + + The capability to get. + An object associated with the capability, or + if the capability is not set on the browser. + + + + Converts the object to a . + + The containing the capabilities. + + + + Return HashCode for the DesiredCapabilities that has been created + + Integer of HashCode generated + + + + Return a string of capabilities being used + + String of capabilities being used + + + + Compare two DesiredCapabilities and will return either true or false + + DesiredCapabilities you wish to compare + true if they are the same or false if they are not + + + + Defines the interface through which the user can manipulate JavaScript alerts. + + + + + Initializes a new instance of the class. + + The for which the alerts will be managed. + + + + Gets the text of the alert. + + + + + Dismisses the alert. + + + + + Accepts the alert. + + + + + Sends keys to the alert. + + The keystrokes to send. + + + + Sets the user name and password in an alert prompting for credentials. + + The user name to set. + The password to set. + + + + Defines the interface through which the user can manipulate application cache. + + + + + Initializes a new instance of the class. + + The for which the application cache will be managed. + + + + Gets the current state of the application cache. + + + + + Defines an interface allowing the user to manipulate cookies on the current page. + + + + + Initializes a new instance of the class. + + The driver that is currently in use + + + + Gets all cookies defined for the current page. + + + + + Method for creating a cookie in the browser + + that represents a cookie in the browser + + + + Delete the cookie by passing in the name of the cookie + + The name of the cookie that is in the browser + + + + Delete a cookie in the browser by passing in a copy of a cookie + + An object that represents a copy of the cookie that needs to be deleted + + + + Delete All Cookies that are present in the browser + + + + + Method for returning a getting a cookie by name + + name of the cookie that needs to be returned + A Cookie from the name + + + + Method for getting a Collection of Cookies that are present in the browser + + ReadOnlyCollection of Cookies in the browser + + + + Defines the interface through which the user can discover where an element is on the screen. + + + + + Initializes a new instance of the class. + + The to be located. + + + + Gets the location of an element in absolute screen coordinates. + + + + + Gets the location of an element relative to the origin of the view port. + + + + + Gets the location of an element's position within the HTML DOM. + + + + + Gets a locator providing a user-defined location for this element. + + + + + Defines the interface through which the user can execute advanced keyboard interactions. + + + + + Initializes a new instance of the class. + + The for which the keyboard will be managed. + + + + Sends a sequence of keystrokes to the target. + + A string representing the keystrokes to send. + + + + Presses a key. + + The key value representing the key to press. + The key value must be one of the values from the class. + + + + Releases a key. + + The key value representing the key to release. + The key value must be one of the values from the class. + + + + Defines the interface through which the user can manipulate local storage. + + + + + Initializes a new instance of the class. + + The for which the application cache will be managed. + + + + Gets the number of items in local storage. + + + + + Returns local storage value given a key. + + The key value for the item in storage. + A local storage value given a key, if present, otherwise returns null. + + + + Returns a read-only list of local storage keys. + + A read-only list of local storage keys. + + + + Sets local storage entry using given key/value pair. + + local storage key + local storage value + + + + Removes local storage entry for the given key. + + key to be removed from the list + Response value for the given key. + + + + Removes all entries from the local storage. + + + + + Defines the interface through which the user can manipulate browser location. + + + + + Initializes a new instance of the class. + + The for which the application cache will be managed. + + + + Gets or sets a value indicating the physical location of the browser. + + + + + Provides a mechanism for examining logs for the driver during the test. + + + + + Initializes a new instance of the class. + + Instance of the driver currently in use + + + + Gets the list of available log types for this driver. + + + + + Gets the set of objects for a specified log. + + The log for which to retrieve the log entries. + Log types can be found in the class. + The list of objects for the specified log. + + + + Defines the interface through which the user can execute advanced mouse interactions. + + + + + Initializes a new instance of the class. + + The for which the mouse will be managed. + + + + Clicks at a set of coordinates using the primary mouse button. + + An describing where to click. + + + + Double-clicks at a set of coordinates. + + A describing where to double-click. + + + + Presses the primary mouse button at a set of coordinates. + + A describing where to press the mouse button down. + + + + Releases the primary mouse button at a set of coordinates. + + A describing where to release the mouse button. + + + + Moves the mouse to the specified set of coordinates. + + A describing where to move the mouse to. + + + + Moves the mouse to the specified set of coordinates. + + A describing where to click. + A horizontal offset from the coordinates specified in . + A vertical offset from the coordinates specified in . + + + + Clicks at a set of coordinates using the secondary mouse button. + + A describing where to click. + + + + Provides a mechanism for Navigating with the driver. + + + + + Initializes a new instance of the class + + Driver in use + + + + Move the browser back + + + + + Move the browser forward + + + + + Navigate to a url for your test + + String of where you want the browser to go to + + + + Navigate to a url for your test + + Uri object of where you want the browser to go to + + + + Refresh the browser + + + + + Provides a mechanism for setting options needed for the driver during the test. + + + + + Initializes a new instance of the class + + Instance of the driver currently in use + + + + Gets an object allowing the user to manipulate cookies on the page. + + + + + Gets an object allowing the user to manipulate the currently-focused browser window. + + "Currently-focused" is defined as the browser window having the window handle + returned when IWebDriver.CurrentWindowHandle is called. + + + + Gets an object allowing the user to examine the logs of the current driver instance. + + + + + Provides access to the timeouts defined for this driver. + + An object implementing the interface. + + + + Defines the interface through which the user can manipulate session storage. + + + + + Initializes a new instance of the class. + + The driver instance. + + + + Gets the number of items in session storage. + + + + + Returns session storage value given a key. + + The key of the item in storage. + A session storage value given a key, if present, otherwise return null. + + + + Returns a read-only list of session storage keys. + + A read-only list of session storage keys. + + + + Sets session storage entry using given key/value pair. + + Session storage key + Session storage value + + + + Removes session storage entry for the given key. + + key to be removed from the list + Response value for the given key. + + + + Removes all entries from the session storage. + + + + + Provides a mechanism for finding elements on the page with locators. + + + + + Initializes a new instance of the class + + The driver that is currently in use + + + + Move to a different frame using its index + + The index of the + A WebDriver instance that is currently in use + + + + Move to different frame using its name + + name of the frame + A WebDriver instance that is currently in use + + + + Move to a frame element. + + a previously found FRAME or IFRAME element. + A WebDriver instance that is currently in use. + + + + Select the parent frame of the currently selected frame. + + An instance focused on the specified frame. + + + + Change to the Window by passing in the name + + Window handle or name of the window that you wish to move to + A WebDriver instance that is currently in use + + + + Change the active frame to the default + + Element of the default + + + + Finds the active element on the page and returns it + + Element that is active + + + + Switches to the currently active modal dialog for this particular driver instance. + + A handle to the dialog. + + + + Defines the interface through which the user can define timeouts. + + + + + Initializes a new instance of the class + + The driver that is currently in use + + + + Gets or sets the implicit wait timeout, which is the amount of time the + driver should wait when searching for an element if it is not immediately + present. + + + When searching for a single element, the driver should poll the page + until the element has been found, or this timeout expires before throwing + a . When searching for multiple elements, + the driver should poll the page until at least one element has been found + or this timeout has expired. + + Increasing the implicit wait timeout should be used judiciously as it + will have an adverse effect on test run time, especially when used with + slower location strategies like XPath. + + + + + + Gets or sets the asynchronous script timeout, which is the amount + of time the driver should wait when executing JavaScript asynchronously. + This timeout only affects the + method. + + + + + Gets or sets the page load timeout, which is the amount of time the driver + should wait for a page to load when setting the + property. + + + + + Defines the interface through which the user can execute advanced touch screen interactions. + + + + + Initializes a new instance of the class. + + The for which the touch screen will be managed. + + + + Allows the execution of single tap on the screen, analogous to click using a Mouse. + + The object representing the location on the screen, + usually an . + + + + Allows the execution of the gesture 'down' on the screen. It is typically the first of a + sequence of touch gestures. + + The x coordinate relative to the view port. + The y coordinate relative to the view port. + + + + Allows the execution of the gesture 'up' on the screen. It is typically the last of a + sequence of touch gestures. + + The x coordinate relative to the view port. + The y coordinate relative to the view port. + + + + Allows the execution of the gesture 'move' on the screen. + + The x coordinate relative to the view port. + The y coordinate relative to the view port. + + + + Creates a scroll gesture that starts on a particular screen location. + + The object representing the location on the screen + where the scroll starts, usually an . + The x coordinate relative to the view port. + The y coordinate relative to the view port. + + + + Creates a scroll gesture for a particular x and y offset. + + The horizontal offset relative to the view port. + The vertical offset relative to the view port. + + + + Allows the execution of double tap on the screen, analogous to click using a Mouse. + + The object representing the location on the screen, + usually an . + + + + Allows the execution of a long press gesture on the screen. + + The object representing the location on the screen, + usually an . + + + + Creates a flick gesture for the current view. + + The horizontal speed in pixels per second. + The vertical speed in pixels per second. + + + + Creates a flick gesture for the current view starting at a specific location. + + The object representing the location on the screen + where the scroll starts, usually an . + The x offset relative to the viewport. + The y offset relative to the viewport. + The speed in pixels per second. + + + + Provides a way to use the driver through + + /// + + [TestFixture] + public class Testing + { + private IWebDriver driver; + + [SetUp] + public void SetUp() + { + driver = new RemoteWebDriver(new Uri("http://127.0.0.1:4444/wd/hub"),DesiredCapabilities.InternetExplorer()); + } + + [Test] + public void TestGoogle() + { + driver.Navigate().GoToUrl("http://www.google.co.uk"); + /* + * Rest of the test + */ + } + + [TearDown] + public void TearDown() + { + driver.Quit(); + } + } + + + + + + The default command timeout for HTTP requests in a RemoteWebDriver instance. + + + + + Initializes a new instance of the class. This constructor defaults proxy to http://127.0.0.1:4444/wd/hub + + An object containing the desired capabilities of the browser. + + + + Initializes a new instance of the class. This constructor defaults proxy to http://127.0.0.1:4444/wd/hub + + An object containing the desired capabilities of the browser. + + + + Initializes a new instance of the class. This constructor defaults proxy to http://127.0.0.1:4444/wd/hub + + URI containing the address of the WebDriver remote server (e.g. http://127.0.0.1:4444/wd/hub). + An object containing the desired capabilities of the browser. + + + + Initializes a new instance of the class + + URI containing the address of the WebDriver remote server (e.g. http://127.0.0.1:4444/wd/hub). + An object containing the desired capabilities of the browser. + + + + Initializes a new instance of the class using the specified remote address, desired capabilities, and command timeout. + + URI containing the address of the WebDriver remote server (e.g. http://127.0.0.1:4444/wd/hub). + An object containing the desired capabilities of the browser. + The maximum amount of time to wait for each command. + + + + Initializes a new instance of the class + + An object which executes commands for the driver. + An object containing the desired capabilities of the browser. + + + + Gets or sets the URL the browser is currently displaying. + + + + + + + + Gets the title of the current browser window. + + + + + Gets the source of the page last loaded by the browser. + + + + + Gets the current window handle, which is an opaque handle to this + window that uniquely identifies it within this driver instance. + + + + + Gets the window handles of open browser windows. + + + + + Gets an object for sending keystrokes to the browser. + + + + + Gets an object for sending mouse commands to the browser. + + + + + Gets a value indicating whether web storage is supported for this driver. + + + + + Gets an object for managing web storage. + + + + + Gets a value indicating whether manipulating the application cache is supported for this driver. + + + + + Gets an object for managing application cache. + + + + + Gets a value indicating whether manipulating geolocation is supported for this driver. + + + + + Gets an object for managing browser location. + + + + + Gets the capabilities that the RemoteWebDriver instance is currently using + + + + + Gets or sets the responsible for detecting + sequences of keystrokes representing file paths and names. + + + + + Gets the for the current session of this driver. + + + + + Gets a value indicating whether this object is a valid action executor. + + + + + Gets a value indicating whether or not the driver is compliant with the W3C WebDriver specification. + + + + + Gets the which executes commands for this driver. + + + + + Gets or sets the factory object used to create instances of + or its subclasses. + + + + + Finds the first element in the page that matches the object + + By mechanism to find the object + IWebElement object so that you can interact with that object + + + IWebDriver driver = new InternetExplorerDriver(); + IWebElement elem = driver.FindElement(By.Name("q")); + + + + + + Finds the elements on the page by using the object and returns a ReadOnlyCollection of the Elements on the page + + By mechanism to find the element + ReadOnlyCollection of IWebElement + + + IWebDriver driver = new InternetExplorerDriver(); + ReadOnlyCollection]]> classList = driver.FindElements(By.ClassName("class")); + + + + + + Closes the Browser + + + + + Close the Browser and Dispose of WebDriver + + + + + Method For getting an object to set the Speed + + Returns an IOptions object that allows the driver to set the speed and cookies and getting cookies + + + + IWebDriver driver = new InternetExplorerDriver(); + driver.Manage().GetCookies(); + + + + + + Method to allow you to Navigate with WebDriver + + Returns an INavigation Object that allows the driver to navigate in the browser + + + IWebDriver driver = new InternetExplorerDriver(); + driver.Navigate().GoToUrl("http://www.google.co.uk"); + + + + + + Method to give you access to switch frames and windows + + Returns an Object that allows you to Switch Frames and Windows + + + IWebDriver driver = new InternetExplorerDriver(); + driver.SwitchTo().Frame("FrameName"); + + + + + + Executes JavaScript in the context of the currently selected frame or window + + The JavaScript code to execute. + The arguments to the script. + The value returned by the script. + + + + Executes JavaScript asynchronously in the context of the currently selected frame or window. + + The JavaScript code to execute. + The arguments to the script. + The value returned by the script. + + + + Finds the first element in the page that matches the ID supplied + + ID of the element + IWebElement object so that you can interact with that object + + + IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox()); + IWebElement elem = driver.FindElementById("id") + + + + + + Finds the first element in the page that matches the ID supplied + + ID of the Element + ReadOnlyCollection of Elements that match the object so that you can interact that object + + + IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox()); + ReadOnlyCollection]]> elem = driver.FindElementsById("id") + + + + + + Finds the first element in the page that matches the CSS Class supplied + + className of the + IWebElement object so that you can interact that object + + + IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox()); + IWebElement elem = driver.FindElementByClassName("classname") + + + + + + Finds a list of elements that match the class name supplied + + CSS class Name on the element + ReadOnlyCollection of IWebElement object so that you can interact with those objects + + + IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox()); + ReadOnlyCollection]]> elem = driver.FindElementsByClassName("classname") + + + + + + Finds the first of elements that match the link text supplied + + Link text of element + IWebElement object so that you can interact that object + + + IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox()); + IWebElement elem = driver.FindElementsByLinkText("linktext") + + + + + + Finds a list of elements that match the link text supplied + + Link text of element + ReadOnlyCollection]]> object so that you can interact with those objects + + + IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox()); + ReadOnlyCollection]]> elem = driver.FindElementsByClassName("classname") + + + + + + Finds the first of elements that match the part of the link text supplied + + part of the link text + IWebElement object so that you can interact that object + + + IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox()); + IWebElement elem = driver.FindElementsByPartialLinkText("partOfLink") + + + + + + Finds a list of elements that match the class name supplied + + part of the link text + ReadOnlyCollection]]> objects so that you can interact that object + + + IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox()); + ReadOnlyCollection]]> elem = driver.FindElementsByPartialLinkText("partOfTheLink") + + + + + + Finds the first of elements that match the name supplied + + Name of the element on the page + IWebElement object so that you can interact that object + + + IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox()); + elem = driver.FindElementsByName("name") + + + + + + Finds a list of elements that match the name supplied + + Name of element + ReadOnlyCollect of IWebElement objects so that you can interact that object + + + IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox()); + ReadOnlyCollection]]> elem = driver.FindElementsByName("name") + + + + + + Finds the first of elements that match the DOM Tag supplied + + DOM tag Name of the element being searched + IWebElement object so that you can interact that object + + + IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox()); + IWebElement elem = driver.FindElementsByTagName("tag") + + + + + + Finds a list of elements that match the DOM Tag supplied + + DOM tag Name of element being searched + IWebElement object so that you can interact that object + + + IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox()); + ReadOnlyCollection]]> elem = driver.FindElementsByTagName("tag") + + + + + + Finds the first of elements that match the XPath supplied + + xpath to the element + IWebElement object so that you can interact that object + + + IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox()); + IWebElement elem = driver.FindElementsByXPath("//table/tbody/tr/td/a"); + + + + + + Finds a list of elements that match the XPath supplied + + xpath to the element + ReadOnlyCollection of IWebElement objects so that you can interact that object + + + IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox()); + ReadOnlyCollection]]> elem = driver.FindElementsByXpath("//tr/td/a") + + + + + + Finds the first element matching the specified CSS selector. + + The CSS selector to match. + The first matching the criteria. + + + + Finds all elements matching the specified CSS selector. + + The CSS selector to match. + A containing all + IWebElements matching the criteria. + + + + Gets a object representing the image of the page on the screen. + + A object containing the image. + + + + Dispose the RemoteWebDriver Instance + + + + + Performs the specified list of actions with this action executor. + + The list of action sequences to perform. + + + + Resets the input state of the action executor. + + + + + Escapes invalid characters in a CSS selector. + + The selector to escape. + The selector with invalid characters escaped. + + + + Executes commands with the driver + + Command that needs executing + Parameters needed for the command + WebDriver Response + + + + Find the element in the response + + Response from the browser + Element from the page + + + + Finds the elements that are in the response + + Response from the browser + Collection of elements + + + + Stops the client from running + + if its in the process of disposing + + + + Starts a session with the driver + + Capabilities of the browser + + + + Gets the capabilities as a dictionary supporting legacy drivers. + + The dictionary to return. + A Dictionary consisting of the capabilities requested. + This method is only transitional. Do not rely on it. It will be removed + once browser driver capability formats stabilize. + + + + Gets the capabilities as a dictionary. + + The dictionary to return. + A Dictionary consisting of the capabilities requested. + This method is only transitional. Do not rely on it. It will be removed + once browser driver capability formats stabilize. + + + + Executes a command with this driver . + + A value representing the command to execute. + A containing the names and values of the parameters of the command. + A containing information about the success or failure of the command and any data returned by the command. + + + + Starts the command executor, enabling communication with the browser. + + + + + Stops the command executor, ending further communication with the browser. + + + + + Finds an element matching the given mechanism and value. + + The mechanism by which to find the element. + The value to use to search for the element. + The first matching the given criteria. + + + + Finds all elements matching the given mechanism and value. + + The mechanism by which to find the elements. + The value to use to search for the elements. + A collection of all of the IWebElements matching the given criteria. + + + + Executes JavaScript in the context of the currently selected frame or window using a specific command. + + The JavaScript code to execute. + The name of the command to execute. + The arguments to the script. + The value returned by the script. + + + + Converts the arguments to JavaScript objects. + + The arguments. + The list of the arguments converted to JavaScript objects. + + + + RemoteWebElement allows you to have access to specific items that are found on the page + + + + + + + The property name that represents a web element in the wire protocol. + + + + + The property name that represents a web element in the legacy dialect of the wire protocol. + + + + + Initializes a new instance of the class. + + The instance hosting this element. + The ID assigned to the element. + + + + Gets the used to find this element. + + + + + Gets the tag name of this element. + + + The property returns the tag name of the + element, not the value of the name attribute. For example, it will return + "input" for an element specified by the HTML markup <input name="foo" />. + + Thrown when the target element is no longer valid in the document DOM. + + + + Gets the innerText of this element, without any leading or trailing whitespace, + and with other whitespace collapsed. + + Thrown when the target element is no longer valid in the document DOM. + + + + Gets a value indicating whether or not this element is enabled. + + The property will generally + return for everything except explicitly disabled input elements. + Thrown when the target element is no longer valid in the document DOM. + + + + Gets a value indicating whether or not this element is selected. + + This operation only applies to input elements such as checkboxes, + options in a select element and radio buttons. + Thrown when the target element is no longer valid in the document DOM. + + + + Gets a object containing the coordinates of the upper-left corner + of this element relative to the upper-left corner of the page. + + Thrown when the target element is no longer valid in the document DOM. + + + + Gets a object containing the height and width of this element. + + Thrown when the target element is no longer valid in the document DOM. + + + + Gets a value indicating whether or not this element is displayed. + + The property avoids the problem + of having to parse an element's "style" attribute to determine + visibility of an element. + Thrown when the target element is no longer valid in the document DOM. + + + + Gets the point where the element would be when scrolled into view. + + + + + Gets the coordinates identifying the location of this element using + various frames of reference. + + + + + Gets the internal ID of the element. + + + + + Gets the ID of the element + + This property is internal to the WebDriver instance, and is + not intended to be used in your code. The element's ID has no meaning + outside of internal WebDriver usage, so it would be improper to scope + it as public. However, both subclasses of + and the parent driver hosting the element have a need to access the + internal element ID. Therefore, we have two properties returning the + same value, one scoped as internal, the other as protected. + + + + Clears the content of this element. + + If this element is a text entry element, the + method will clear the value. It has no effect on other elements. Text entry elements + are defined as elements with INPUT or TEXTAREA tags. + Thrown when the target element is no longer valid in the document DOM. + + + + Simulates typing text into the element. + + The text to type into the element. + The text to be typed may include special characters like arrow keys, + backspaces, function keys, and so on. Valid special keys are defined in + . + + Thrown when the target element is not enabled. + Thrown when the target element is not visible. + Thrown when the target element is no longer valid in the document DOM. + + + + Submits this element to the web server. + + If this current element is a form, or an element within a form, + then this will be submitted to the web server. If this causes the current + page to change, then this method will attempt to block until the new page + is loaded. + Thrown when the target element is no longer valid in the document DOM. + + + + Clicks this element. + + + Click this element. If the click causes a new page to load, the + method will attempt to block until the page has loaded. After calling the + method, you should discard all references to this + element unless you know that the element and the page will still be present. + Otherwise, any further operations performed on this element will have an undefined + behavior. + + Thrown when the target element is not enabled. + Thrown when the target element is not visible. + Thrown when the target element is no longer valid in the document DOM. + + + + Gets the value of the specified attribute for this element. + + The name of the attribute. + The attribute's current value. Returns a if the + value is not set. + The method will return the current value + of the attribute, even if the value has been modified after the page has been + loaded. Note that the value of the following attributes will be returned even if + there is no explicit attribute on the element: + + + Attribute name + Value returned if not explicitly specified + Valid element types + + + checked + checked + Check Box + + + selected + selected + Options in Select elements + + + disabled + disabled + Input and other UI elements + + + + Thrown when the target element is no longer valid in the document DOM. + + + + Gets the value of a JavaScript property of this element. + + The name JavaScript the JavaScript property to get the value of. + The JavaScript property's current value. Returns a if the + value is not set or the property does not exist. + Thrown when the target element is no longer valid in the document DOM. + + + + Gets the value of a CSS property of this element. + + The name of the CSS property to get the value of. + The value of the specified CSS property. + The value returned by the + method is likely to be unpredictable in a cross-browser environment. + Color values should be returned as hex strings. For example, a + "background-color" property set as "green" in the HTML source, will + return "#008000" for its value. + Thrown when the target element is no longer valid in the document DOM. + + + + Finds all IWebElements within the current context + using the given mechanism. + + The locating mechanism to use. + A of all WebElements + matching the current criteria, or an empty list if nothing matches. + + + + Finds the first using the given method. + + The locating mechanism to use. + The first matching on the current context. + If no element matches the criteria. + + + + Finds the first of elements that match the link text supplied + + Link text of element + IWebElement object so that you can interact that object + + + IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox()); + IWebElement elem = driver.FindElementByLinkText("linktext") + + + + + + Finds the first of elements that match the link text supplied + + Link text of element + IWebElement object so that you can interact that object + + + IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox()); + ReadOnlyCollection]]> elem = driver.FindElementsByLinkText("linktext") + + + + + + Finds the first element in the page that matches the ID supplied + + ID of the element + IWebElement object so that you can interact with that object + + + IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox()); + IWebElement elem = driver.FindElementById("id") + + + + + + Finds the first element in the page that matches the ID supplied + + ID of the Element + ReadOnlyCollection of Elements that match the object so that you can interact that object + + + IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox()); + ReadOnlyCollection]]> elem = driver.FindElementsById("id") + + + + + + Finds the first of elements that match the name supplied + + Name of the element + IWebElement object so that you can interact that object + + + IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox()); + elem = driver.FindElementsByName("name") + + + + + + Finds a list of elements that match the name supplied + + Name of element + ReadOnlyCollect of IWebElement objects so that you can interact that object + + + IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox()); + ReadOnlyCollection]]> elem = driver.FindElementsByName("name") + + + + + + Finds the first of elements that match the DOM Tag supplied + + tag name of the element + IWebElement object so that you can interact that object + + + IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox()); + IWebElement elem = driver.FindElementsByTagName("tag") + + + + + + Finds a list of elements that match the DOM Tag supplied + + DOM Tag of the element on the page + IWebElement object so that you can interact that object + + + IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox()); + ReadOnlyCollection]]> elem = driver.FindElementsByTagName("tag") + + + + + + Finds the first element in the page that matches the CSS Class supplied + + CSS class name of the element on the page + IWebElement object so that you can interact that object + + + IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox()); + IWebElement elem = driver.FindElementByClassName("classname") + + + + + + Finds a list of elements that match the class name supplied + + CSS class name of the elements on the page + ReadOnlyCollection of IWebElement object so that you can interact with those objects + + + IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox()); + ReadOnlyCollection]]> elem = driver.FindElementsByClassName("classname") + + + + + + Finds the first of elements that match the XPath supplied + + xpath to the element + IWebElement object so that you can interact that object + + + IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox()); + IWebElement elem = driver.FindElementsByXPath("//table/tbody/tr/td/a"); + + + + + + Finds a list of elements that match the XPath supplied + + xpath to element on the page + ReadOnlyCollection of IWebElement objects so that you can interact that object + + + IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox()); + ReadOnlyCollection]]> elem = driver.FindElementsByXpath("//tr/td/a") + + + + + + Finds the first of elements that match the part of the link text supplied + + part of the link text + IWebElement object so that you can interact that object + + + IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox()); + IWebElement elem = driver.FindElementsByPartialLinkText("partOfLink") + + + + + + Finds a list of elements that match the link text supplied + + part of the link text + ReadOnlyCollection]]> objects so that you can interact that object + + + IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.Firefox()); + ReadOnlyCollection]]> elem = driver.FindElementsByPartialLinkText("partOfTheLink") + + + + + + Finds the first element matching the specified CSS selector. + + The id to match. + The first matching the criteria. + + + + Finds all elements matching the specified CSS selector. + + The CSS selector to match. + A containing all + IWebElements matching the criteria. + + + + Gets a object representing the image of this element on the screen. + + A object containing the image. + + + + Returns a string that represents the current . + + A string that represents the current . + + + + Method to get the hash code of the element + + Integer of the hash code for the element + + + + Compares if two elements are equal + + Object to compare against + A boolean if it is equal or not + + + + Converts an object into an object that represents an element for the wire protocol. + + A that represents an element in the wire protocol. + + + + Finds a child element matching the given mechanism and value. + + The mechanism by which to find the element. + The value to use to search for the element. + The first matching the given criteria. + + + + Finds all child elements matching the given mechanism and value. + + The mechanism by which to find the elements. + The value to use to search for the elements. + A collection of all of the IWebElements matching the given criteria. + + + + Executes a command on this element using the specified parameters. + + The to execute against this element. + A containing names and values of the parameters for the command. + The object containing the result of the command execution. + + + + Creates a from a dictionary containing a reference to an element. + + The dictionary containing the element reference. + A containing the information from the specified dictionary. + + + + Gets a value indicating wether the specified dictionary represents a reference to a web element. + + The dictionary to check. + if the dictionary contains an element reference; otherwise, . + + + + Provides remote access to the API. + + + + + Initializes a new instance of the class. + + The driver instance. + + + + Gets the local storage for the site currently opened in the browser. + + + + + Gets the session storage for the site currently opened in the browser. + + + + + Defines the interface through which the user can manipulate the browser window. + + + + + Initializes a new instance of the class. + + Instance of the driver currently in use + + + + Gets or sets the position of the browser window relative to the upper-left corner of the screen. + + When setting this property, it should act as the JavaScript window.moveTo() method. + + + + Gets or sets the size of the outer browser window, including title bars and window borders. + + When setting this property, it should act as the JavaScript window.resizeTo() method. + + + + Maximizes the current window if it is not already maximized. + + + + + Minimizes the current window if it is not already maximized. + + + + + Sets the current window to full screen if it is not already in that state. + + + + + Handles reponses from the browser + + + + + Initializes a new instance of the class + + + + + Initializes a new instance of the class + + Session ID in use + + + + Gets or sets the value from JSON. + + + + + Gets or sets the session ID. + + + + + Gets or sets the status value of the response. + + + + + Gets a value indicating whether this response is compliant with the WebDriver specification. + + + + + Returns a new from a JSON-encoded string. + + The JSON string to deserialize into a . + A object described by the JSON string. + + + + Returns this object as a JSON-encoded string. + + A JSON-encoded string representing this object. + + + + Returns the object as a string. + + A string with the Session ID, status value, and the value from JSON. + + + + Provides a mechanism for maintaining a session for a test + + + + + Initializes a new instance of the class + + Key for the session in use + + + + Get the value of the key + + The key in use + + + + Get the hash code of the key + + The hash code of the key + + + + Compares two Sessions + + Session to compare + True if they are equal or False if they are not + + + + Gives properties to get a stack trace + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class using the given property values. + + A containing the names and values for the properties of this . + + + + Gets or sets the value of the filename in the stack + + + + + Gets or sets the value of the Class name in the stack trace + + + + + Gets or sets the line number + + + + + Gets or sets the Method name in the stack trace + + + + + Gets a string representation of the object. + + A string representation of the object. + + + + Holds the information about all commands specified by the JSON wire protocol. + This class cannot be inherited, as it is intended to be a singleton, and + allowing subclasses introduces the possibility of multiple instances. + + + + + Initializes a new instance of the class. + + + + + Gets the level of the W3C WebDriver specification that this repository supports. + + + + + Initializes the dictionary of commands for the CommandInfoRepository + + + + + Represents an error condition from a remote end using the W3C specification + dialect of the wire protocol. + + + + + Represents the element click intercepted error. + + + + + Represents the element not selectable error. + + + + + Represents the element not interactable error. + + + + + Represents the element not visible error. + + TODO: Remove this string; it is no longer valid in the specification. + + + + Represents the insecure certificate error. + + + + + Represents the invalid argument error. + + + + + Represents the invalid cookie domain error. + + + + + Represents the invalid coordinates error. + + + + + Represents the invalid element coordinates error. + + TODO: Remove this string; it is no longer valid in the specification. + + + + Represents the invalid element state error. + + + + + Represents the invalid selector error. + + + + + Represents the invalid session ID error. + + + + + Represents the unhandled JavaScript error. + + + + + Represents the move target out of bounds error. + + + + + Represents the no such alert error. + + + + + Represents the no such cookie error. + + + + + Represents the no such element error. + + + + + Represents the no such alert frame. + + + + + Represents the no such alert window. + + + + + Represents the script timeout error. + + + + + Represents the session not created error. + + + + + Represents the stale element reference error. + + + + + Represents the timeout error. + + + + + Represents the unable to set cookie error. + + + + + Represents the unable to capture screen error. + + + + + Represents the unexpected alert open error. + + + + + Represents the unknown command error. + + + + + Represents an unknown error. + + + + + Represents the unknown method error. + + + + + Represents the unsupported operation error. + + + + + Converts a string error to a value. + + The error string to convert. + The converted value. + + + + Holds the information about all commands specified by the JSON wire protocol. + This class cannot be inherited, as it is intended to be a singleton, and + allowing subclasses introduces the possibility of multiple instances. + + + + + Initializes a new instance of the class. + + + + + Gets the level of the W3C WebDriver specification that this repository supports. + + + + + Initializes the dictionary of commands for the CommandInfoRepository + + + + + Exposes the service provided by a native WebDriver server executable. + + + + + Initializes a new instance of the class. + + The full path to the directory containing the executable providing the service to drive the browser. + The port on which the driver executable should listen. + The file name of the driver service executable. + A URL at which the driver service executable may be downloaded. + + If the path specified is or an empty string. + + + If the specified driver service executable does not exist in the specified directory. + + + + + Gets the Uri of the service. + + + + + Gets or sets the host name of the service. Defaults to "localhost." + + + Most driver service executables do not allow connections from remote + (non-local) machines. This property can be used as a workaround so + that an IP address (like "127.0.0.1" or "::1") can be used instead. + + + + + Gets or sets the port of the service. + + + + + Gets or sets a value indicating whether the initial diagnostic information is suppressed + when starting the driver server executable. Defaults to , meaning + diagnostic information should be shown by the driver server executable. + + + + + Gets a value indicating whether the service is running. + + + + + Gets or sets a value indicating whether the command prompt window of the service should be hidden. + + + + + Gets the process ID of the running driver service executable. Returns 0 if the process is not running. + + + + + Gets the executable file name of the driver service. + + + + + Gets the command-line arguments for the driver service. + + + + + Gets a value indicating the time to wait for an initial connection before timing out. + + + + + Gets a value indicating the time to wait for the service to terminate before forcing it to terminate. + + + + + Gets a value indicating whether the service has a shutdown API that can be called to terminate + it gracefully before forcing a termination. + + + + + Gets a value indicating whether the service is responding to HTTP requests. + + + + + Releases all resources associated with this . + + + + + Starts the DriverService. + + + + + Finds the specified driver service executable. + + The file name of the executable to find. + A URL at which the driver service executable may be downloaded. + The directory containing the driver service executable. + + If the specified driver service executable does not exist in the current directory or in a directory on the system path. + + + + + Releases all resources associated with this . + + if the Dispose method was explicitly called; otherwise, . + + + + Stops the DriverService. + + + + + Waits until a the service is initialized, or the timeout set + by the property is reached. + + if the service is properly started and receiving HTTP requests; + otherwise; . + + + + The exception that is thrown when an element is not visible. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with + a specified error message. + + The message that describes the error. + + + + Initializes a new instance of the class with + a specified error message and a reference to the inner exception that is the + cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, + or if no inner exception is specified. + + + + Initializes a new instance of the class with serialized data. + + The that holds the serialized + object data about the exception being thrown. + The that contains contextual + information about the source or destination. + + + + Provides a mechanism to write tests against Edge + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class using the specified options. + + The to be used with the Edge driver. + + + + Initializes a new instance of the class using the specified driver service. + + The used to initialize the driver. + + + + Initializes a new instance of the class using the specified path + to the directory containing EdgeDriver.exe. + + The full path to the directory containing EdgeDriver.exe. + + + + Initializes a new instance of the class using the specified path + to the directory containing EdgeDriver.exe and options. + + The full path to the directory containing EdgeDriver.exe. + The to be used with the Edge driver. + + + + Initializes a new instance of the class using the specified path + to the directory containing EdgeDriver.exe, options, and command timeout. + + The full path to the directory containing EdgeDriver.exe. + The to be used with the Edge driver. + The maximum amount of time to wait for each command. + + + + Initializes a new instance of the class using the specified + and options. + + The to use. + The used to initialize the driver. + + + + Initializes a new instance of the class using the specified . + + The to use. + The to be used with the Edge driver. + The maximum amount of time to wait for each command. + + + + Exposes the service provided by the native MicrosoftWebDriver executable. + + + + + Initializes a new instance of the class. + + The full path to the EdgeDriver executable. + The file name of the EdgeDriver executable. + The port on which the EdgeDriver executable should listen. + + + + Gets or sets the value of the host adapter on which the Edge driver service should listen for connections. + + + + + Gets or sets the value of the package the Edge driver service will launch and automate. + + + + + Gets or sets a value indicating whether the service should use verbose logging. + + + + + Gets or sets a value indicating whether the instance + should use the a protocol dialect compliant with the W3C WebDriver Specification. + + + Setting this property to a non- value for driver + executables matched to versions of Windows before the 2018 Fall Creators + Update will result in a the driver executable shutting down without + execution, and all commands will fail. Do not set this property unless + you are certain your version of the MicrosoftWebDriver.exe supports the + --w3c and --jwp command-line arguments. + + + + + Gets a value indicating whether the service has a shutdown API that can be called to terminate + it gracefully before forcing a termination. + + + + + Gets a value indicating the time to wait for the service to terminate before forcing it to terminate. + + + + + Gets the command-line arguments for the driver service. + + + + + Creates a default instance of the EdgeDriverService. + + A EdgeDriverService that implements default settings. + + + + Creates a default instance of the EdgeDriverService using a specified path to the EdgeDriver executable. + + The directory containing the EdgeDriver executable. + A EdgeDriverService using a random port. + + + + Creates a default instance of the EdgeDriverService using a specified path to the EdgeDriver executable with the given name. + + The directory containing the EdgeDriver executable. + The name of the EdgeDriver executable file. + A EdgeDriverService using a random port. + + + + Creates a default instance of the EdgeDriverService using a specified path to the EdgeDriver executable with the given name and listening port. + + The directory containing the EdgeDriver executable. + The name of the EdgeDriver executable file + The port number on which the driver will listen + A EdgeDriverService using the specified port. + + + + Specifies the behavior of waiting for page loads in the Edge driver. + + + + + Indicates the behavior is not set. + + + + + Waits for pages to load and ready state to be 'complete'. + + + + + Waits for pages to load and for ready state to be 'interactive' or 'complete'. + + + + + Does not wait for pages to load, returning immediately. + + + + + Class to manage options specific to + + + + EdgeOptions options = new EdgeOptions(); + + + For use with EdgeDriver: + + + EdgeDriver driver = new EdgeDriver(options); + + + For use with RemoteWebDriver: + + + RemoteWebDriver driver = new RemoteWebDriver(new Uri("http://localhost:4444/wd/hub"), options.ToCapabilities()); + + + + + + Gets or sets a value indicating whether the browser should be launched using + InPrivate browsing. + + + + + Gets or sets the URL of the page with which the browser will be navigated to on launch. + + + + + Adds a path to an extension that is to be used with the Edge driver. + + The full path and file name of the extension. + + + + Adds a list of paths to an extensions that are to be used with the Edge driver. + + An array of full paths with file names of extensions to add. + + + + Adds a list of paths to an extensions that are to be used with the Edge driver. + + An of full paths with file names of extensions to add. + + + + Provides a means to add additional capabilities not yet added as type safe options + for the Edge driver. + + The name of the capability to add. + The value of the capability to add. + + thrown when attempting to add a capability for which there is already a type safe option, or + when is or the empty string. + + Calling where + has already been added will overwrite the existing value with the new value in + + + + Returns DesiredCapabilities for Edge with these options included as + capabilities. This copies the options. Further changes will not be + reflected in the returned capabilities. + + The DesiredCapabilities for Edge with these options. + + + + Provides a mechanism to get elements off the page for test + + + + + Initializes a new instance of the class + + Driver in use + Id of the element + + + + The exception that is thrown when an element is not visible. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with + a specified error message. + + The message that describes the error. + + + + Initializes a new instance of the class with + a specified error message and a reference to the inner exception that is the + cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, + or if no inner exception is specified. + + + + Initializes a new instance of the class with serialized data. + + The that holds the serialized + object data about the exception being thrown. + The that contains contextual + information about the source or destination. + + + + The exception that is thrown when an element is not visible. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with + a specified error message. + + The message that describes the error. + + + + Initializes a new instance of the class with + a specified error message and a reference to the inner exception that is the + cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, + or if no inner exception is specified. + + + + Initializes a new instance of the class with serialized data. + + The that holds the serialized + object data about the exception being thrown. + The that contains contextual + information about the source or destination. + + + + The exception that is thrown when an element is not visible. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with + a specified error message. + + The message that describes the error. + + + + Initializes a new instance of the class with + a specified error message and a reference to the inner exception that is the + cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, + or if no inner exception is specified. + + + + Initializes a new instance of the class with serialized data. + + The that holds the serialized + object data about the exception being thrown. + The that contains contextual + information about the source or destination. + + + + The exception that is thrown when an element is not visible. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with + a specified error message. + + The message that describes the error. + + + + Initializes a new instance of the class with + a specified error message and a reference to the inner exception that is the + cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, + or if no inner exception is specified. + + + + Initializes a new instance of the class with serialized data. + + The that holds the serialized + object data about the exception being thrown. + The that contains contextual + information about the source or destination. + + + + Represents the binary associated with Firefox. + + The class is responsible for instantiating the + Firefox process, and the operating system environment in which it runs. + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class located at a specific file location. + + Full path and file name to the Firefox executable. + + + + Gets or sets the timeout to wait for Firefox to be available for command execution. + + + + + Gets the associated with this . + + + + + Gets a value indicating whether the current operating system is Linux. + + + + + Gets a containing string key-value pairs + representing any operating system environment variables beyond the defaults. + + + + + Starts Firefox using the specified profile and command-line arguments. + + The to use with this instance of Firefox. + The command-line arguments to use in starting Firefox. + + + + Sets a variable to be used in the Firefox execution environment. + + The name of the environment variable to set. + The value of the environment variable to set. + + + + Waits for the process to complete execution. + + + + + Releases all resources used by the . + + + + + Returns a String that represents the current Object. + + A String that represents the current Object. + + + + Starts the Firefox process. + + + + + Releases the unmanaged resources used by the and optionally + releases the managed resources. + + to release managed and resources; + to only release unmanaged resources. + + + + Provides a way to access Firefox to run tests. + + + When the FirefoxDriver object has been instantiated the browser will load. The test can then navigate to the URL under test and + start your test. + + In the case of the FirefoxDriver, you can specify a named profile to be used, or you can let the + driver create a temporary, anonymous profile. A custom extension allowing the driver to communicate + to the browser will be installed into the profile. + + + + + [TestFixture] + public class Testing + { + private IWebDriver driver; + + [SetUp] + public void SetUp() + { + driver = new FirefoxDriver(); + } + + [Test] + public void TestGoogle() + { + driver.Navigate().GoToUrl("http://www.google.co.uk"); + /* + * Rest of the test + */ + } + + [TearDown] + public void TearDown() + { + driver.Quit(); + } + } + + + + + + The name of the ICapabilities setting to use to define a custom Firefox profile. + + + + + The name of the ICapabilities setting to use to define a custom location for the + Firefox executable. + + + + + The default port on which to communicate with the Firefox extension. + + + + + Indicates whether native events is enabled by default for this platform. + + + + + Indicates whether the driver will accept untrusted SSL certificates. + + + + + Indicates whether the driver assume the issuer of untrusted certificates is untrusted. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class using the specified options. Uses the Mozilla-provided Marionette driver implementation. + + The to be used with the Firefox driver. + + + + Initializes a new instance of the class using the specified driver service. Uses the Mozilla-provided Marionette driver implementation. + + The used to initialize the driver. + + + + Initializes a new instance of the class using the specified path + to the directory containing geckodriver.exe. + + The full path to the directory containing geckodriver.exe. + + + + Initializes a new instance of the class using the specified path + to the directory containing geckodriver.exe and options. + + The full path to the directory containing geckodriver.exe. + The to be used with the Firefox driver. + + + + Initializes a new instance of the class using the specified path + to the directory containing geckodriver.exe, options, and command timeout. + + The full path to the directory containing geckodriver.exe. + The to be used with the Firefox driver. + The maximum amount of time to wait for each command. + + + + Initializes a new instance of the class using the specified options, driver service, and timeout. Uses the Mozilla-provided Marionette driver implementation. + + The to use. + The to be used with the Firefox driver. + + + + Initializes a new instance of the class using the specified options, driver service, and timeout. Uses the Mozilla-provided Marionette driver implementation. + + The to use. + The to be used with the Firefox driver. + The maximum amount of time to wait for each command. + + + + Gets or sets the responsible for detecting + sequences of keystrokes representing file paths and names. + + The Firefox driver does not allow a file detector to be set, + as the server component of the Firefox driver only allows uploads from + the local computer environment. Attempting to set this property has no + effect, but does not throw an exception. If you are attempting to run + the Firefox driver remotely, use in + conjunction with a standalone WebDriver server. + + + + Gets a value indicating whether the Firefox driver instance uses + Mozilla's Marionette implementation. This is a temporary property + and will be removed when Marionette is available for the release + channel of Firefox. + + + + + In derived classes, the method prepares the environment for test execution. + + + + + Provides a way of executing Commands using the FirefoxDriver. + + + + + Initializes a new instance of the class. + + The on which to make the connection. + The creating the connection. + The name of the host on which to connect to the Firefox extension (usually "localhost"). + The maximum amount of time to wait for each command. + + + + Gets the repository of objects containin information about commands. + + + + + Executes a command + + The command you wish to execute + A response from the browser + + + + Releases all resources used by the . + + + + + Releases the unmanaged resources used by the and + optionally releases the managed resources. + + to release managed and resources; + to only release unmanaged resources. + + + + Represents the valid values of logging levels available with the Firefox driver (geckodriver.exe). + + + + + Represents the Trace value, the most detailed logging level available. + + + + + Represents the Debug value + + + + + Represents the Config value + + + + + Represents the Info value + + + + + Represents the Warn value + + + + + Represents the Error value + + + + + Represents the Fatal value, the least detailed logging level available. + + + + + Represents that the logging value is unspecified, and should be the default level. + + + + + Provides methods for launching Firefox with the WebDriver extension installed. + + + + + Initializes a new instance of the class. + + The on which to make the connection. + The creating the connection. + The name of the host on which to connect to the Firefox extension (usually "localhost"). + + + + Gets the for communicating with this server. + + + + + Starts the server. + + + + + Releases all resources used by the . + + + + + Releases the unmanaged resources used by the and optionally + releases the managed resources. + + to release managed and resources; + to only release unmanaged resources. + + + + Exposes the service provided by the native FirefoxDriver executable. + + + + + Initializes a new instance of the class. + + The full path to the Firefox driver executable. + The file name of the Firefox driver executable. + The port on which the Firefox driver executable should listen. + + + + Gets or sets the location of the Firefox binary executable. + + + + + Gets or sets the port used by the driver executable to communicate with the browser. + + + + + Gets or sets the value of the IP address of the host adapter on which the + service should listen for connections. + + + + + Gets or sets a value indicating whether to connect to an already-running + instance of Firefox. + + + + + Gets or sets a value indicating whether to open the Firefox Browser Toolbox + when Firefox is launched. + + + + + Gets a value indicating the time to wait for an initial connection before timing out. + + + + + Gets a value indicating the time to wait for the service to terminate before forcing it to terminate. + + + + + Gets a value indicating whether the service has a shutdown API that can be called to terminate + it gracefully before forcing a termination. + + + + + Gets the command-line arguments for the driver service. + + + + + Creates a default instance of the FirefoxDriverService. + + A FirefoxDriverService that implements default settings. + + + + Creates a default instance of the FirefoxDriverService using a specified path to the Firefox driver executable. + + The directory containing the Firefox driver executable. + A FirefoxDriverService using a random port. + + + + Creates a default instance of the FirefoxDriverService using a specified path to the Firefox driver executable with the given name. + + The directory containing the Firefox driver executable. + The name of the Firefox driver executable file. + A FirefoxDriverService using a random port. + + + + Returns the Firefox driver filename for the currently running platform + + The file name of the Firefox driver service executable. + + + + Provides the ability to install extensions into a . + + + + + Initializes a new instance of the class. + + The name of the file containing the Firefox extension. + WebDriver attempts to resolve the parameter + by looking first for the specified file in the directory of the calling assembly, + then using the full path to the file, if a full path is provided. + + + + Initializes a new instance of the class. + + The name of the file containing the Firefox extension. + The ID of the resource within the assembly containing the extension + if the file is not present in the file system. + WebDriver attempts to resolve the parameter + by looking first for the specified file in the directory of the calling assembly, + then using the full path to the file, if a full path is provided. If the file is + not found in the file system, WebDriver attempts to locate a resource in the + executing assembly with the name specified by the + parameter. + + + + Installs the extension into a profile directory. + + The Firefox profile directory into which to install the extension. + + + + Class to manage options specific to + + + Used with the marionette executable wires.exe. + + + + FirefoxOptions options = new FirefoxOptions(); + + + For use with FirefoxDriver: + + + FirefoxDriver driver = new FirefoxDriver(options); + + + For use with RemoteWebDriver: + + + RemoteWebDriver driver = new RemoteWebDriver(new Uri("http://localhost:4444/wd/hub"), options.ToCapabilities()); + + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class for the given profile and binary. + + The to use in the options. + The to use in the options. + The to copy into the options. + + + + Gets or sets a value indicating whether to use the legacy driver implementation. + + + + + Gets or sets the object to be used with this instance. + + + + + Gets or sets the path and file name of the Firefox browser executable. + + + + + Gets or sets the logging level of the Firefox driver. + + + + + Adds an argument to be used in launching the Firefox browser. + + The argument to add. + Arguments must be preceeded by two dashes ("--"). + + + + Adds a list arguments to be used in launching the Firefox browser. + + An array of arguments to add. + Each argument must be preceeded by two dashes ("--"). + + + + Adds a list arguments to be used in launching the Firefox browser. + + An array of arguments to add. + Each argument must be preceeded by two dashes ("--"). + + + + Sets a preference in the profile used by Firefox. + + Name of the preference to set. + Value of the preference to set. + + + + Sets a preference in the profile used by Firefox. + + Name of the preference to set. + Value of the preference to set. + + + + Sets a preference in the profile used by Firefox. + + Name of the preference to set. + Value of the preference to set. + + + + Sets a preference in the profile used by Firefox. + + Name of the preference to set. + Value of the preference to set. + + + + Sets a preference in the profile used by Firefox. + + Name of the preference to set. + Value of the preference to set. + + + + Provides a means to add additional capabilities not yet added as type safe options + for the Firefox driver. + + The name of the capability to add. + The value of the capability to add. + + thrown when attempting to add a capability for which there is already a type safe option, or + when is or the empty string. + + Calling + where has already been added will overwrite the + existing value with the new value in . + Also, by default, calling this method adds capabilities to the options object passed to + geckodriver.exe. + + + + Provides a means to add additional capabilities not yet added as type safe options + for the Firefox driver. + + The name of the capability to add. + The value of the capability to add. + Indicates whether the capability is to be set as a global + capability for the driver instead of a Firefox-specific option. + + thrown when attempting to add a capability for which there is already a type safe option, or + when is or the empty string. + + Calling + where has already been added will overwrite the + existing value with the new value in + + + + Returns DesiredCapabilities for Firefox with these options included as + capabilities. This does not copy the options. Further changes will be + reflected in the returned capabilities. + + The DesiredCapabilities for Firefox with these options. + + + + Provides the ability to edit the preferences associated with a Firefox profile. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class using a + specific profile directory. + + The directory containing the profile. + + + + Initializes a new instance of the class using a + specific profile directory. + + The directory containing the profile. + Delete the source directory of the profile upon cleaning. + + + + Gets or sets the port on which the profile connects to the WebDriver extension. + + + + + Gets the directory containing the profile. + + + + + Gets or sets a value indicating whether to delete this profile after use with + the . + + + + + Gets or sets a value indicating whether native events are enabled. + + + + + Gets or sets a value indicating whether to always load the library for allowing Firefox + to execute commands without its window having focus. + + The property is only used on Linux. + + + + Gets or sets a value indicating whether Firefox should accept SSL certificates which have + expired, signed by an unknown authority or are generally untrusted. Set to true + by default. + + + + + Gets or sets a value indicating whether Firefox assume untrusted SSL certificates + come from an untrusted issuer or are self-signed. Set to true by default. + + + + Due to limitations within Firefox, it is easy to find out if a certificate has expired + or does not match the host it was served for, but hard to find out if the issuer of the + certificate is untrusted. By default, it is assumed that the certificates were not + issued from a trusted certificate authority. + + + If you receive an "untrusted site" prompt it Firefox when using a certificate that was + issued by valid issuer, but the certificate has expired or is being served served for + a different host (e.g. production certificate served in a testing environment) set this + to false. + + + + + + Converts a base64-encoded string into a . + + The base64-encoded string containing the profile contents. + The constructed . + + + + Adds a Firefox Extension to this profile + + The path to the new extension + + + + Sets a preference in the profile. + + The name of the preference to add. + A value to add to the profile. + + + + Sets a preference in the profile. + + The name of the preference to add. + A value to add to the profile. + + + + Sets a preference in the profile. + + The name of the preference to add. + A value to add to the profile. + + + + Set proxy preferences for this profile. + + The object defining the proxy + preferences for the profile. + + + + Writes this in-memory representation of a profile to disk. + + + + + Cleans this Firefox profile. + + If this profile is a named profile that existed prior to + launching Firefox, the method removes the WebDriver + Firefox extension. If the profile is an anonymous profile, the profile + is deleted. + + + + Converts the profile into a base64-encoded string. + + A base64-encoded string containing the contents of the profile. + + + + Adds the WebDriver extension for Firefox to the profile. + + + + + Removes the WebDriver extension for Firefox to the profile, for use with non-legacy + FirefoxDriver instances that use geckodriver. + + + + + Internal implementation to set proxy preferences for this profile. + + The object defining the proxy + preferences for the profile. + + + + Generates a random directory name for the profile. + + A random directory name for the profile. + + + + Deletes the lock files for a profile. + + + + + Installs all extensions in the profile in the directory on disk. + + + + + Deletes the cache of extensions for this profile, if the cache exists. + + If the extensions cache does not exist for this profile, the + method performs no operations, but + succeeds. + + + + Writes the user preferences to the profile. + + + + + Reads the existing preferences from the profile. + + A containing key-value pairs representing the preferences. + Assumes that we only really care about the preferences, not the comments + + + + Sets a preference for a manually specified proxy. + + The protocol for which to set the proxy. + The setting for the proxy. + + + + Allows the user to enumerate and access existing named Firefox profiles. + + + + + Initializes a new instance of the class. + + + + + Gets a containing FirefoxProfiles + representing the existing named profiles for Firefox. + + + + + Gets a with a given name. + + The name of the profile to get. + A with a given name. + Returns if no profile with the given name exists. + + + + Allows the user to control elements on a page in Firefox. + + + + + Initializes a new instance of the class. + + The instance hosting this element. + The ID assigned to the element. + + + + Determines whether two instances are equal. + + The to compare with the current . + if the specified is equal to the + current ; otherwise, . + + + + Serves as a hash function for a . + + A hash code for the current . + + + + Represents the executable file for Firefox. + + + + + Initializes a new instance of the class. + + The path and file name to the Firefox executable. + + + + Gets the full path to the executable. + + + + + Sets the library path for the Firefox executable environment. + + The used to execute the binary. + + + + Locates the Firefox binary by platform. + + The full path to the binary. + + + + Retrieves an environment variable + + Name of the variable. + Default value of the variable. + The value of the variable. If no variable with that name is set, returns the default. + + + + Retrieves the platform specific environment property name which contains the library path. + + The platform specific environment property name which contains the library path. + + + + Walk a PATH to locate binaries with a specified name. Binaries will be searched for in the + order they are provided. + + The binary names to search for. + The first binary found matching that name. + + + + Defines the interface through which the mutex port for establishing communication + with the WebDriver extension can be locked. + + + + + Locks the mutex port. + + The describing the amount of time to wait for + the mutex port to become available. + + + + Unlocks the mutex port. + + + + + Parses and reads an INI file. + + + + + Initializes a new instance of the class. + + The full path to the .INI file to be read. + + + + Gets a containing the names of the sections in the .INI file. + + + + + Gets a value from the .INI file. + + The section in which to find the key-value pair. + The key of the key-value pair. + The value associated with the given section and key. + + + + Provides a mutex-like lock on a socket. + + + + + Initializes a new instance of the class. + + Port to use to acquire the lock. + The class will attempt to acquire the + specified port number, and wait for it to become free. + + + + Locks the mutex port. + + The describing the amount of time to wait for + the mutex port to become available. + + + + Unlocks the mutex port. + + + + + Releases all resources associated with this + + + + + Represents the preferences used by a profile in Firefox. + + + + + Initializes a new instance of the class. + + A set of preferences that cannot be modified once set. + A set of default preferences. + + + + Sets a preference. + + The name of the preference to set. + A value give the preference. + If the preference already exists in the currently-set list of preferences, + the value will be updated. + + + + Sets a preference. + + The name of the preference to set. + A value give the preference. + If the preference already exists in the currently-set list of preferences, + the value will be updated. + + + + Sets a preference. + + The name of the preference to set. + A value give the preference. + If the preference already exists in the currently-set list of preferences, + the value will be updated. + + + + Gets a preference from the list of preferences. + + The name of the preference to retrieve. + The value of the preference, or an empty string if the preference is not set. + + + + Appends this set of preferences to the specified set of preferences. + + A dictionary containing the preferences to which to + append these values. + If the preference already exists in , + the value will be updated. + + + + Writes the preferences to a file. + + The full path to the file to be written. + + + + Represents the application cache status. + + + + + AppCache status is uncached + + + + + AppCache status is idle + + + + + AppCache status is checkint + + + + + AppCache status is downloading + + + + + AppCache status is updated-ready + + + + + AppCache status is obsolete + + + + + Defines an interface allowing the user to access application cache status + + + + + Gets the current state of the application cache. + + + + + Interface allowing the user to determine if the driver instance supports application cache. + + + + + Gets a value indicating whether manipulating the application cache is supported for this driver. + + + + + Gets an object for managing application cache. + + + + + Interface allowing the user to determine if the driver instance supports geolocation. + + + + + Gets a value indicating whether manipulating geolocation is supported for this driver. + + + + + Gets an object for managing browser location. + + + + + Interface allowing the user to determine if the driver instance supports web storage. + + + + + Gets a value indicating whether web storage is supported for this driver. + + + + + Gets an object for managing web storage. + + + + + Represents the local storage for the site currently opened in the browser. + Each site has its own separate storage area. + + + + + Gets the number of items in local storage. + + + + + Returns value of the local storage given a key. + + key to for a local storage entry + Value of the local storage entry as given a key. + + + + Returns the set of keys associated with local storage. + + Returns the set of keys associated with local storage as . + + + + Adds key/value pair to local storage. + + storage key + storage value + + + + Removes key/value pair from local storage. + + key to remove from storage + Value from local storage as string for the given key. + + + + Clears local storage. + + + + + Interface for location context + + + + + Gets or sets a value indicating the physical location of the browser. + + + + + Represents the session storage for the site currently opened in the browser. + Each site has its own separate storage area. + + + + + Gets the number of items in session storage. + + + + + Returns value of the session storage given a key. + + key to for a session storage entry + Value of the session storage entry as given a key. + + + + Returns the set of keys associated with session storage. + + Returns the set of keys associated with session storage as . + + + + Adds key/value pair to session storage. + + storage key + storage value + + + + Removes key/value pair from session storage. + + key to remove from storage + Value from session storage as string for the given key. + + + + Clears local storage. + + + + + Represents both local and session storage for the site currently opened in the browser. + + + + + Gets the local storage for the site currently opened in the browser. + + + + + Gets the session storage for the site currently opened in the browser. + + + + + Represents the physical location of the browser. + + + + + Initializes a new instance of the class. + + latitude for current location + longitude for current location + altitude for current location + + + + Gets the latitude of the current location. + + + + + Gets the longitude of the current location. + + + + + Gets the altitude of the current location. + + + + + Retuns string represenation for current location. + + Returns string reprsentation for current location. + + + + Defines the interface through which the user can manipulate JavaScript alerts. + + + + + Gets the text of the alert. + + + + + Dismisses the alert. + + + + + Accepts the alert. + + + + + Sends keys to the alert. + + The keystrokes to send. + + + + Sets the user name and password in an alert prompting for credentials. + + The user name to set. + The password to set. + + + + Interface determining whether the driver implementation allows detection of files + when sending keystrokes to a file upload element. + + + + + Gets or sets the responsible for detecting + sequences of keystrokes representing file paths and names. + + + + + Capabilities of the browser that you are going to use + + + + + Gets the capability value with the specified name. + + The name of the capability to get. + The value of the capability. + + The specified capability name is not in the set of capabilities. + + + + + Gets a value indicating whether the browser has a given capability. + + The capability to get. + Returns if the browser has the capability; otherwise, . + + + + Gets a capability of the browser. + + The capability to get. + An object associated with the capability, or + if the capability is not set on the browser. + + + + Defines an interface allowing the user to manipulate cookies on the current page. + + + + + Gets all cookies defined for the current page. + + + + + Adds a cookie to the current page. + + The object to be added. + + + + Gets a cookie with the specified name. + + The name of the cookie to retrieve. + The containing the name. Returns + if no cookie with the specified name is found. + + + + Deletes the specified cookie from the page. + + The to be deleted. + + + + Deletes the cookie with the specified name from the page. + + The name of the cookie to be deleted. + + + + Deletes all cookies from the page. + + + + + Provides a way to access Internet Explorer to run your tests by creating a InternetExplorerDriver instance + + + When the WebDriver object has been instantiated the browser will load. The test can then navigate to the URL under test and + start your test. + + + + [TestFixture] + public class Testing + { + private IWebDriver driver; + + [SetUp] + public void SetUp() + { + driver = new InternetExplorerDriver(); + } + + [Test] + public void TestGoogle() + { + driver.Navigate().GoToUrl("http://www.google.co.uk"); + /* + * Rest of the test + */ + } + + [TearDown] + public void TearDown() + { + driver.Quit(); + driver.Dispose(); + } + } + + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with the desired + options. + + The used to initialize the driver. + + + + Initializes a new instance of the class using the specified driver service. + + The used to initialize the driver. + + + + Initializes a new instance of the class using the specified path + to the directory containing IEDriverServer.exe. + + The full path to the directory containing IEDriverServer.exe. + + + + Initializes a new instance of the class using the specified path + to the directory containing IEDriverServer.exe and options. + + The full path to the directory containing IEDriverServer.exe. + The used to initialize the driver. + + + + Initializes a new instance of the class using the specified path + to the directory containing IEDriverServer.exe, options, and command timeout. + + The full path to the directory containing IEDriverServer.exe. + The used to initialize the driver. + The maximum amount of time to wait for each command. + + + + Initializes a new instance of the class using the specified + and options. + + The to use. + The used to initialize the driver. + + + + Initializes a new instance of the class using the specified + , , and command timeout. + + The to use. + The used to initialize the driver. + The maximum amount of time to wait for each command. + + + + Gets or sets the responsible for detecting + sequences of keystrokes representing file paths and names. + + The IE driver does not allow a file detector to be set, + as the server component of the IE driver (IEDriverServer.exe) only + allows uploads from the local computer environment. Attempting to set + this property has no effect, but does not throw an exception. If you + are attempting to run the IE driver remotely, use + in conjunction with a standalone WebDriver server. + + + + Gets the capabilities as a dictionary supporting legacy drivers. + + The dictionary to return. + A Dictionary consisting of the capabilities requested. + This method is only transitional. Do not rely on it. It will be removed + once browser driver capability formats stabilize. + + + + Represents the valid values of logging levels available with the IEDriverServer.exe. + + + + + Represents the Trace value, the most detailed logging level available. + + + + + Represents the Debug value + + + + + Represents the Info value + + + + + Represents the Warn value + + + + + Represents the Error value + + + + + Represents the Fatal value, the least detailed logging level available. + + + + + Exposes the service provided by the native IEDriverServer executable. + + + + + Initializes a new instance of the class. + + The full path to the IEDriverServer executable. + The file name of the IEDriverServer executable. + The port on which the IEDriverServer executable should listen. + + + + Gets or sets the value of the host adapter on which the IEDriverServer should listen for connections. + + + + + Gets or sets the location of the log file written to by the IEDriverServer. + + + + + Gets or sets the logging level used by the IEDriverServer. + + + + + Gets or sets the path to which the supporting library of the IEDriverServer.exe is extracted. + Defaults to the temp directory if this property is not set. + + + The IEDriverServer.exe requires extraction of a supporting library to perform some of its functions. Setting + This library is extracted to the temp directory if this property is not set. If the property is set, it must + be set to a valid directory. + + + + + Gets or sets the comma-delimited list of IP addresses that are approved to + connect to this instance of the IEDriverServer. Defaults to an empty string, + which means only the local loopback address can connect. + + + + + Gets the command-line arguments for the driver service. + + + + + Creates a default instance of the InternetExplorerDriverService. + + A InternetExplorerDriverService that implements default settings. + + + + Creates a default instance of the InternetExplorerDriverService using a specified path to the IEDriverServer executable. + + The directory containing the IEDriverServer executable. + A InternetExplorerDriverService using a random port. + + + + Creates a default instance of the InternetExplorerDriverService using a specified path to the IEDriverServer executable with the given name. + + The directory containing the IEDriverServer executable. + The name of the IEDriverServer executable file. + A InternetExplorerDriverService using a random port. + + + + Specifies the scroll behavior of elements scrolled into view in the IE driver. + + + + + Indicates the behavior is unspecified. + + + + + Scrolls elements to align with the top of the viewport. + + + + + Scrolls elements to align with the bottom of the viewport. + + + + + Class to manage options specific to + + + + InternetExplorerOptions options = new InternetExplorerOptions(); + options.IntroduceInstabilityByIgnoringProtectedModeSettings = true; + + + For use with InternetExplorerDriver: + + + InternetExplorerDriver driver = new InternetExplorerDriver(options); + + + For use with RemoteWebDriver: + + + RemoteWebDriver driver = new RemoteWebDriver(new Uri("http://localhost:4444/wd/hub"), options.ToCapabilities()); + + + + + + Gets the name of the capability used to store IE options in + a object. + + + + + Gets or sets a value indicating whether to ignore the settings of the Internet Explorer Protected Mode. + + + + + Gets or sets a value indicating whether to ignore the zoom level of Internet Explorer . + + + + + Gets or sets a value indicating whether to use native events in interacting with elements. + + + + + Gets or sets a value indicating whether to require the browser window to have focus before interacting with elements. + + + + + Gets or sets the initial URL displayed when IE is launched. If not set, the browser launches + with the internal startup page for the WebDriver server. + + + By setting the to + and this property to a correct URL, you can launch IE in the Internet Protected Mode zone. This can be helpful + to avoid the flakiness introduced by ignoring the Protected Mode settings. Nevertheless, setting Protected Mode + zone settings to the same value in the IE configuration is the preferred method. + + + + + Gets or sets the value for describing how elements are scrolled into view in the IE driver. Defaults + to scrolling the element to the top of the viewport. + + + + + Gets or sets a value indicating whether to enable persistently sending WM_MOUSEMOVE messages + to the IE window during a mouse hover. + + + + + Gets or sets the amount of time the driver will attempt to look for a newly launched instance + of Internet Explorer. + + + + + Gets or sets the amount of time the driver will attempt to look for the file selection + dialog when attempting to upload a file. + + + + + Gets or sets a value indicating whether to force the use of the Windows CreateProcess API + when launching Internet Explorer. The default value is . + + + + + Gets or sets a value indicating whether to force the use of the Windows ShellWindows API + when attaching to Internet Explorer. The default value is . + + + + + Gets or sets the command line arguments used in launching Internet Explorer when the + Windows CreateProcess API is used. This property only has an effect when the + is . + + + + + Gets or sets a value indicating whether to use the supplied + settings on a per-process basis, not updating the system installed proxy setting. + This property is only valid when setting a , where the + property is either , + , or , and is + otherwise ignored. Defaults to . + + + + + Gets or sets a value indicating whether to clear the Internet Explorer cache + before launching the browser. When set to , clears the + system cache for all instances of Internet Explorer, even those already running + when the driven instance is launched. Defaults to . + + + + + Provides a means to add additional capabilities not yet added as type safe options + for the Internet Explorer driver. + + The name of the capability to add. + The value of the capability to add. + + thrown when attempting to add a capability for which there is already a type safe option, or + when is or the empty string. + + Calling + where has already been added will overwrite the + existing value with the new value in . + Also, by default, calling this method adds capabilities to the options object passed to + IEDriverServer.exe. + + + + Provides a means to add additional capabilities not yet added as type safe options + for the Internet Explorer driver. + + The name of the capability to add. + The value of the capability to add. + Indicates whether the capability is to be set as a global + capability for the driver instead of a IE-specific option. + + thrown when attempting to add a capability for which there is already a type safe option, or + when is or the empty string. + + Calling where + has already been added will overwrite the existing value with the new value in + + + + Returns DesiredCapabilities for IE with these options included as + capabilities. This copies the options. Further changes will not be + reflected in the returned capabilities. + + The DesiredCapabilities for IE with these options. + + + + InternetExplorerWebElement allows you to have access to specific items that are found on the page. + + + + + + [Test] + public void TestGoogle() + { + driver = new InternetExplorerDriver(); + InternetExplorerWebElement elem = driver.FindElement(By.Name("q")); + elem.SendKeys("Cheese please!"); + } + + + + + + Initializes a new instance of the class. + + Driver in use. + ID of the element. + + + + Defines an object responsible for detecting sequences of keystrokes + representing file paths and names. + + + + + Returns a value indicating whether a specified key sequence represents + a file name and path. + + The sequence to test for file existence. + if the key sequence represents a file; otherwise, . + + + + Defines the interface through which the user can determine the capabilities of a driver. + + + + + Gets the object describing the driver's capabilities. + + + + + Provides access to input devices for advanced user interactions. + + + + + Gets an object for sending keystrokes to the browser. + + + + + Gets an object for sending mouse commands to the browser. + + + + + Interface implemented by each driver that allows access to touch screen capabilities. + + + + + Gets the device representing the touch screen. + + + + + Defines the interface through which the user can execute JavaScript. + + + + + Executes JavaScript in the context of the currently selected frame or window. + + The JavaScript code to execute. + The arguments to the script. + The value returned by the script. + + + The method executes JavaScript in the context of + the currently selected frame or window. This means that "document" will refer + to the current document. If the script has a return value, then the following + steps will be taken: + + + + For an HTML element, this method returns a + For a number, a is returned + For a boolean, a is returned + For all other cases a is returned. + For an array,we check the first element, and attempt to return a + of that type, following the rules above. Nested lists are not + supported. + If the value is null or there is no return value, + is returned. + + + + Arguments must be a number (which will be converted to a ), + a , a or a . + An exception will be thrown if the arguments do not meet these criteria. + The arguments will be made available to the JavaScript via the "arguments" magic + variable, as if the function were called via "Function.apply" + + + + + + Executes JavaScript asynchronously in the context of the currently selected frame or window. + + The JavaScript code to execute. + The arguments to the script. + The value returned by the script. + + + + Provides methods representing basic keyboard actions. + + + + + Sends a sequence of keystrokes to the target. + + A string representing the keystrokes to send. + + + + Presses a key. + + The key value representing the key to press. + The key value must be one of the values from the class. + + + + Releases a key. + + The key value representing the key to release. + The key value must be one of the values from the class. + + + + Defines the interface through which the user can discover where an element is on the screen. + + + + + Gets the location of an element on the screen, scrolling it into view + if it is not currently on the screen. + + + + + Gets the coordinates identifying the location of this element using + various frames of reference. + + + + + Interface allowing handling of driver logs. + + + + + Gets the list of available log types for this driver. + + + + + Gets the set of objects for a specified log. + + The log for which to retrieve the log entries. + Log types can be found in the class. + The list of objects for the specified log. + + + + Provides methods representing basic mouse actions. + + + + + Clicks at a set of coordinates using the primary mouse button. + + An describing where to click. + + + + Double-clicks at a set of coordinates. + + A describing where to double-click. + + + + Presses the primary mouse button at a set of coordinates. + + A describing where to press the mouse button down. + + + + Releases the primary mouse button at a set of coordinates. + + A describing where to release the mouse button. + + + + Moves the mouse to the specified set of coordinates. + + A describing where to move the mouse to. + + + + Moves the mouse to the specified set of coordinates. + + A describing where to click. + A horizontal offset from the coordinates specified in . + A vertical offset from the coordinates specified in . + + + + Clicks at a set of coordinates using the secondary mouse button. + + A describing where to click. + + + + Defines an interface allowing the user to access the browser's history and to + navigate to a given URL. + + + + + Move back a single entry in the browser's history. + + + + + Move a single "item" forward in the browser's history. + + Does nothing if we are on the latest page viewed. + + + + Load a new web page in the current browser window. + + The URL to load. It is best to use a fully qualified URL + + Calling the method will load a new web page in the current browser window. + This is done using an HTTP GET operation, and the method will block until the + load is complete. This will follow redirects issued either by the server or + as a meta-redirect from within the returned HTML. Should a meta-redirect "rest" + for any duration of time, it is best to wait until this timeout is over, since + should the underlying page change while your test is executing the results of + future calls against this interface will be against the freshly loaded page. + + + + + Load a new web page in the current browser window. + + The URL to load. + + Calling the method will load a new web page in the current browser window. + This is done using an HTTP GET operation, and the method will block until the + load is complete. This will follow redirects issued either by the server or + as a meta-redirect from within the returned HTML. Should a meta-redirect "rest" + for any duration of time, it is best to wait until this timeout is over, since + should the underlying page change while your test is executing the results of + future calls against this interface will be against the freshly loaded page. + + + + + Refreshes the current page. + + + + + Provides methods that allow the creation of action sequences to enable + advanced user interactions. + + + + + Adds an action to the built set of actions. Adding an action will + add a "tick" to the set of all actions to be executed. + + The action to add to the set of actions + A self reference. + + + + Adds an action to the built set of actions. Adding an action will + add a "tick" to the set of all actions to be executed. Only one action + for each input device may be added for a single tick. + + The set actions to add to the existing set of actions. + A self reference. + + + + Converts the set of actions in this to a . + + A suitable for transmission across the wire. + The collection returned is read-only. + + + + Returns a string that represents the current . + + A string that represents the current . + + + + Provides values that indicate from where element offsets for MoveToElement + are calculated. + + + + + Offsets are calculated from the top-left corner of the element. + + + + + Offsets are calcuated from the center of the element. + + + + + Provides a mechanism for building advanced interactions with the browser. + + + + + Initializes a new instance of the class. + + The object on which the actions built will be performed. + + + + Sends a modifier key down message to the browser. + + The key to be sent. + A self-reference to this . + If the key sent is not is not one + of , , , + , ,, + ,. + + + + Sends a modifier key down message to the specified element in the browser. + + The element to which to send the key command. + The key to be sent. + A self-reference to this . + If the key sent is not is not one + of , , , + , ,, + ,. + + + + Sends a modifier key up message to the browser. + + The key to be sent. + A self-reference to this . + If the key sent is not is not one + of , , , + , ,, + ,. + + + + Sends a modifier up down message to the specified element in the browser. + + The element to which to send the key command. + The key to be sent. + A self-reference to this . + If the key sent is not is not one + of , , , + , ,, + ,. + + + + Sends a sequence of keystrokes to the browser. + + The keystrokes to send to the browser. + A self-reference to this . + + + + Sends a sequence of keystrokes to the specified element in the browser. + + The element to which to send the keystrokes. + The keystrokes to send to the browser. + A self-reference to this . + + + + Clicks and holds the mouse button down on the specified element. + + The element on which to click and hold. + A self-reference to this . + + + + Clicks and holds the mouse button at the last known mouse coordinates. + + A self-reference to this . + + + + Releases the mouse button on the specified element. + + The element on which to release the button. + A self-reference to this . + + + + Releases the mouse button at the last known mouse coordinates. + + A self-reference to this . + + + + Clicks the mouse on the specified element. + + The element on which to click. + A self-reference to this . + + + + Clicks the mouse at the last known mouse coordinates. + + A self-reference to this . + + + + Double-clicks the mouse on the specified element. + + The element on which to double-click. + A self-reference to this . + + + + Double-clicks the mouse at the last known mouse coordinates. + + A self-reference to this . + + + + Moves the mouse to the specified element. + + The element to which to move the mouse. + A self-reference to this . + + + + Moves the mouse to the specified offset of the top-left corner of the specified element. + + The element to which to move the mouse. + The horizontal offset to which to move the mouse. + The vertical offset to which to move the mouse. + A self-reference to this . + + + + Moves the mouse to the specified offset of the top-left corner of the specified element. + + The element to which to move the mouse. + The horizontal offset to which to move the mouse. + The vertical offset to which to move the mouse. + The value from which to calculate the offset. + A self-reference to this . + + + + Moves the mouse to the specified offset of the last known mouse coordinates. + + The horizontal offset to which to move the mouse. + The vertical offset to which to move the mouse. + A self-reference to this . + + + + Right-clicks the mouse on the specified element. + + The element on which to right-click. + A self-reference to this . + + + + Right-clicks the mouse at the last known mouse coordinates. + + A self-reference to this . + + + + Performs a drag-and-drop operation from one element to another. + + The element on which the drag operation is started. + The element on which the drop is performed. + A self-reference to this . + + + + Performs a drag-and-drop operation on one element to a specified offset. + + The element on which the drag operation is started. + The horizontal offset to which to move the mouse. + The vertical offset to which to move the mouse. + A self-reference to this . + + + + Builds the sequence of actions. + + A composite which can be used to perform the actions. + + + + Performs the currently built action. + + + + + Gets the instance of the specified . + + The to get the location of. + The of the . + + + + Adds an action to current list of actions to be performed. + + The to be added. + + + + Represents a sequence of actions to be performed in the target browser. + + + + + Initializes a new instance of the class. + + The input device that executes this sequence of actions. + + + + Initializes a new instance of the class. + + The input device that executes this sequence of actions. + the initial size of the sequence. + + + + Gets the count of actions in the sequence. + + + + + Adds an action to the sequence. + + The action to add to the sequence. + A self-reference to this sequence of actions. + + + + Converts this action sequence into an object suitable for serializing across the wire. + + A containing the actions in this sequence. + + + + Returns a string that represents the current . + + A string that represents the current . + + + + Defines an action for releasing the currently held mouse button. + + + This action can be called for an element different than the one + ClickAndHoldAction was called for. However, if this action is + performed out of sequence (without holding down the mouse button, + for example) the results will be different. + + + + + Initializes a new instance of the class. + + The with which the action will be performed. + An describing an element at which to perform the action. + + + + Performs this action. + + + + + Defines an action for clicking on an element. + + + + + Initializes a new instance of the class. + + The with which the action will be performed. + An describing an element at which to perform the action. + + + + Performs this action. + + + + + Defines an action for clicking and holding the mouse button on an element. + + + + + Initializes a new instance of the class. + + The with which the action will be performed. + An describing an element at which to perform the action. + + + + Performs this action. + + + + + Defines an action that consists of a list of other actions to be performed in the browser. + + + + + Adds an action to the list of actions to be performed. + + An to be appended to the + list of actions to be performed. + A self reference. + + + + Performs the actions defined in this list of actions. + + + + + Defines an action for clicking the secondary mouse button on an element, displaying a context menu. + + + + + Initializes a new instance of the class. + + The with which the action will be performed. + An describing an element at which to perform the action. + + + + Performs this action. + + + + + Defines an action for double-clicking on an element. + + + + + Initializes a new instance of the class. + + The with which the action will be performed. + An describing an element at which to perform the action. + + + + Performs this action. + + + + + Creates a double tap gesture on a touch screen. + + + + + Initializes a new instance of the class. + + The with which the action will be performed. + An describing an element at which to perform the action. + + + + Performs the action. + + + + + Creates a flick gesture on a touch screen. + + + + + Initializes a new instance of the class. + + The with which the action will be performed. + The horizontal speed in pixels per second. + The vertical speed in pixels per second. + + + + Initializes a new instance of the class for use with the specified element. + + The with which the action will be performed. + An describing an element at which to perform the action. + The x offset relative to the viewport. + The y offset relative to the viewport. + The speed in pixels per second. + + + + Performs the action. + + + + + Provides methods by which an interaction with the browser can be performed. + + + + + Performs this action on the browser. + + + + + Provides location of the element using various frames of reference. + + + + + Gets the location of an element in absolute screen coordinates. + + + + + Gets the location of an element relative to the origin of the view port. + + + + + Gets the location of an element's position within the HTML DOM. + + + + + Gets a locator providing a user-defined location for this element. + + + + + Defines an action for keyboard interaction with the browser. + + + + + Initializes a new instance of the class. + + The to use in performing the action. + The to use in setting focus to the element on which to perform the action. + An object providing the element on which to perform the action. + + + + Gets the keyboard with which to perform the action. + + + + + Focuses on the element on which the action is to be performed. + + + + + Defines an action for mouse interaction with the browser. + + + + + Initializes a new instance of the class. + + The with which the action will be performed. + An describing an element at which to perform the action. + + + + Gets the coordinates at which to perform the mouse action. + + + + + Gets the mouse with which to perform the action. + + + + + Moves the mouse to the location at which to perform the action. + + + + + Defines an action for keyboard interaction with the browser using a single modifier key. + + + + + Initializes a new instance of the class. + + The to use in performing the action. + The to use in setting focus to the element on which to perform the action. + An object providing the element on which to perform the action. + The modifier key (, , ) to use in the action. + + + + Gets the key with which to perform the action. + + + + + Defines an action for keyboard interaction with the browser. + + + + + Initializes a new instance of the class. + + The to use in performing the action. + An object providing the element on which to perform the action. + + + + Gets the touch screen with which to perform the action. + + + + + Gets the location at which to perform the action. + + + + + Defines an action for keyboard and mouse interaction with the browser. + + + + + Initializes a new instance of the class for the given element. + + An object that provides coordinates for this action. + + + + Initializes a new instance of the class. + + This action will take place in the context of the previous action's coordinates. + + + + Gets the target of the action providing coordinates of the action. + + + + + Base class for all input devices for actions. + + + + + Initializes a new instance of the class. + + The unique name of the input device represented by this class. + + + + Gets the unique name of this input device. + + + + + Gets the kind of device for this input device. + + + + + Returns a value for this input device that can be transmitted across the wire to a remote end. + + A representing this action. + + + + Creates a pause action for synchronization with other action sequences. + + The representing the action. + + + + Creates a pause action for synchronization with other action sequences. + + A representing the duration + of the pause. Note that pauses to synchronize + with other action sequences for other devices. + The representing the action. + + + + Returns a hash code for the current . + + A hash code for the current . + + + + Returns a string that represents the current . + + A string that represents the current . + + + + Enumerated values for the kinds of devices available. + + + + + Represents the null device. + + + + + Represents a key-based device, primarily for entering text. + + + + + Represents a pointer-based device, such as a mouse, pen, or stylus. + + + + + Represents a single interaction for a given input device. + + + + + Initializes a new instance of the class. + + The input device which performs this action. + + + + Gets the device for which this action is intended. + + + + + Returns a value for this action that can be transmitted across the wire to a remote end. + + A representing this action. + + + + Gets a value indicating whether this action is valid for the specified type of input device. + + The type of device to check. + if the action is valid for the specified type of input device; + otherwise, . + + + + Defines an action for pressing a modifier key (Shift, Alt, or Control) on the keyboard. + + + + + Initializes a new instance of the class. + + The to use in performing the action. + The to use in setting focus to the element on which to perform the action. + An object providing the element on which to perform the action. + The modifier key (, , , + , ,, + ,) to use in the action. + + + + Performs this action. + + + + + Represents a key input device, such as a keyboard. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class, given the device's name. + + The unique name of this input device. + + + + Gets the type of device for this input device. + + + + + Converts this input device into an object suitable for serializing across the wire. + + A representing this input device. + + + + Creates a key-down action for simulating a press of a key. + + The unicode character to be sent. + The representing the action. + + + + Creates a key-up action for simulating a release of a key. + + The unicode character to be sent. + The representing the action. + + + + Defines an action for releasing a modifier key (Shift, Alt, or Control) on the keyboard. + + + + + Initializes a new instance of the class. + + The to use in performing the action. + The to use in setting focus to the element on which to perform the action. + An object providing the element on which to perform the action. + The modifier key (, , , + , ,, + ,) to use in the action. + + + + Performs this action. + + + + + Creates a long press gesture on a touch screen. + + + + + Initializes a new instance of the class. + + The with which the action will be performed. + An describing an element at which to perform the action. + + + + Performs the action. + + + + + Defines an action for moving the mouse to a specified location. + + + + + Initializes a new instance of the class. + + The with which the action will be performed. + An describing an element at which to perform the action. + + + + Performs this action. + + + + + Defines an action for moving the mouse to a specified offset from its current location. + + + + + Initializes a new instance of the class. + + The with which the action will be performed. + An describing an element at which to perform the action. + The horizontal offset from the origin of the target to which to move the mouse. + The vertical offset from the origin of the target to which to move the mouse. + + + + Performs this action. + + + + + Represents a pause action. + + + + + Initializes a new instance of the class. + + The input device on which to execute the pause. + + + + Initializes a new instance of the class. + + The input device on which to execute the pause. + The length of time to pause for. + + + + Returns a value for this action that can be transmitted across the wire to a remote end. + + A representing this action. + + + + Gets a value indicating whether this action is valid for the specified type of input device. + + The type of device to check. + if the action is valid for the specified type of input device; + otherwise, . + + + + Represents the origin of the coordinates for mouse movement. + + + + + The coordinate origin is the origin of the view port of the browser. + + + + + The origin of the movement is the most recent pointer location. + + + + + The origin of the movement is the center of the element specified. + + + + + Specifies the type of pointer a pointer device represents. + + + + + The pointer device is a mouse. + + + + + The pointer device is a pen or stylus. + + + + + The pointer device is a touch screen device. + + + + + Specifies the button used during a pointer down or up action. + + + + + The button used is the primary button. + + + + + The button used is the middle button or mouse wheel. + + + + + The button used is the secondary button. + + + + + Represents a pointer input device, such as a stylus, mouse, or finger on a touch screen. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The kind of pointer represented by this input device. + + + + Initializes a new instance of the class. + + The kind of pointer represented by this input device. + The unique name for this input device. + + + + Gets the type of device for this input device. + + + + + Returns a value for this input device that can be transmitted across the wire to a remote end. + + A representing this action. + + + + Creates a pointer down action. + + The button of the pointer that should be pressed. + The action representing the pointer down gesture. + + + + Creates a pointer up action. + + The button of the pointer that should be released. + The action representing the pointer up gesture. + + + + Creates a pointer move action to a specific element. + + The used as the target for the move. + The horizontal offset from the origin of the move. + The vertical offset from the origin of the move. + The length of time the move gesture takes to complete. + The action representing the pointer move gesture. + + + + Creates a pointer move action to an absolute coordinate. + + The origin of coordinates for the move. Values can be relative to + the view port origin, or the most recent pointer position. + The horizontal offset from the origin of the move. + The vertical offset from the origin of the move. + The length of time the move gesture takes to complete. + The action representing the pointer move gesture. + Thrown when passing CoordinateOrigin.Element into origin. + Users should us the other CreatePointerMove overload to move to a specific element. + + + + Creates a pointer cancel action. + + The action representing the pointer cancel gesture. + + + + Presses a touch screen at a given location. + + + + + Initializes a new instance of the class. + + The with which the action will be performed. + The x coordinate relative to the view port. + The y coordinate relative to the view port. + + + + Performs the action. + + + + + Presses a touch screen at a given location. + + + + + Initializes a new instance of the class. + + The with which the action will be performed. + The x coordinate relative to the view port. + The y coordinate relative to the view port. + + + + Performs the action. + + + + + Presses a touch screen at a given location. + + + + + Initializes a new instance of the class. + + The with which the action will be performed. + The x coordinate relative to the view port. + The y coordinate relative to the view port. + + + + Performs the action. + + + + + Creates a double tap gesture on a touch screen. + + + + + Initializes a new instance of the class. + + The with which the action will be performed. + The horizontal offset relative to the view port. + The vertical offset relative to the view port. + + + + Initializes a new instance of the class for use with the specified element. + + The with which the action will be performed. + An describing an element at which to perform the action. + The x coordinate relative to the view port. + The y coordinate relative to the view port. + + + + Performs the action. + + + + + Defines an action for sending a sequence of keystrokes to an element. + + + + + Initializes a new instance of the class. + + The to use in performing the action. + The to use in setting focus to the element on which to perform the action. + An object providing the element on which to perform the action. + The key sequence to send. + + + + Performs this action. + + + + + Creates a single tap gesture on a touch screen. + + + + + Initializes a new instance of the class. + + The with which the action will be performed. + An describing an element at which to perform the action. + + + + Performs the action. + + + + + Provides a mechanism for building advanced interactions with the browser. + + + + + Initializes a new instance of the class. + + The object on which the actions built will be performed. + + + + Taps the touch screen on the specified element. + + The element on which to tap. + A self-reference to this . + + + + Presses down at the specified location on the screen. + + The x coordinate relative to the view port. + The y coordinate relative to the view port. + A self-reference to this . + + + + Releases a press at the specified location on the screen. + + The x coordinate relative to the view port. + The y coordinate relative to the view port. + A self-reference to this . + + + + Moves to the specified location on the screen. + + The x coordinate relative to the view port. + The y coordinate relative to the view port. + A self-reference to this . + + + + Scrolls the touch screen beginning at the specified element. + + The element on which to begin scrolling. + The x coordinate relative to the view port. + The y coordinate relative to the view port. + A self-reference to this . + + + + Double-taps the touch screen on the specified element. + + The element on which to double-tap. + A self-reference to this . + + + + Presses and holds on the touch screen on the specified element. + + The element on which to press and hold + A self-reference to this . + + + + Scrolls the touch screen to the specified offset. + + The horizontal offset relative to the view port. + The vertical offset relative to the view port. + A self-reference to this . + + + + Flicks the current view. + + The horizontal speed in pixels per second. + The vertical speed in pixels per second. + A self-reference to this . + + + + Flicks the current view starting at a specific location. + + The element at which to start the flick. + The x offset relative to the viewport. + The y offset relative to the viewport. + The speed in pixels per second. + A self-reference to this . + + + + Utility class used to execute "asynchronous" scripts. This class should + only be used by browsers that do not natively support asynchronous + script execution. + Warning: this class is intended for internal use + only. This class will be removed without warning after all + native asynchronous implementations have been completed. + + + + + + Initializes a new instance of the class. + + An object capable of executing JavaScript. + + + + Gets or sets the timeout for the script executor. + + + + + Executes a JavaScript script asynchronously. + + The script to execute. + An array of objects used as arguments in the script. + The object which is the return value of the script. + if the object executing the function doesn't support JavaScript. + if the page reloads during the JavaScript execution. + if the timeout expires during the JavaScript execution. + + + + Encapsulates methods for working with files. + + + + + Recursively copies a directory. + + The source directory to copy. + The destination directory. + if the copy is completed; otherwise . + + + + Recursively deletes a directory, retrying on error until a timeout. + + The directory to delete. + This method does not throw an exception if the delete fails. + + + + Searches for a file with the specified name. + + The name of the file to find. + The full path to the directory where the file can be found, + or an empty string if the file does not exist in the locations searched. + + This method looks first in the directory of the currently executing + assembly. If the specified file is not there, the method then looks in + each directory on the PATH environment variable, in order. + + + + + Gets the directory of the currently executing assembly. + + The directory of the currently executing assembly. + + + + Generates the full path to a random directory name in the temporary directory, following a naming pattern.. + + The pattern to use in creating the directory name, following standard + .NET string replacement tokens. + The full path to the random directory name in the temporary directory. + + + + Interface allowing execution of W3C Specification-compliant actions. + + + + + Gets a value indicating whether this object is a valid action executor. + + + + + Performs the specified list of actions with this action executor. + + The list of action sequences to perform. + + + + Resets the input state of the action executor. + + + + + Defines the interface through which the user finds elements by their CSS class. + + + + + Finds the first element matching the specified CSS class. + + The CSS class to match. + The first matching the criteria. + + + + Finds all elements matching the specified CSS class. + + The CSS class to match. + A containing all + IWebElements matching the criteria. + + + + Defines the interface through which the user finds elements by their cascading style sheet (CSS) selector. + + + + + Finds the first element matching the specified CSS selector. + + The id to match. + The first matching the criteria. + + + + Finds all elements matching the specified CSS selector. + + The CSS selector to match. + A containing all + IWebElements matching the criteria. + + + + Defines the interface through which the user finds elements by their ID. + + + + + Finds the first element matching the specified id. + + The id to match. + The first matching the criteria. + + + + Finds all elements matching the specified id. + + The id to match. + A containing all + IWebElements matching the criteria. + + + + Defines the interface through which the user finds elements by their link text. + + + + + Finds the first element matching the specified link text. + + The link text to match. + The first matching the criteria. + + + + Finds all elements matching the specified link text. + + The link text to match. + A containing all + IWebElements matching the criteria. + + + + Defines the interface through which the user finds elements by their name. + + + + + Finds the first element matching the specified name. + + The name to match. + The first matching the criteria. + + + + Finds all elements matching the specified name. + + The name to match. + A containing all + IWebElements matching the criteria. + + + + Defines the interface through which the user finds elements by a partial match on their link text. + + + + + Finds the first element matching the specified partial link text. + + The partial link text to match. + The first matching the criteria. + + + + Finds all elements matching the specified partial link text. + + The partial link text to match. + A containing all + IWebElements matching the criteria. + + + + Defines the interface through which the user finds elements by their tag name. + + + + + Finds the first element matching the specified tag name. + + The tag name to match. + The first matching the criteria. + + + + Finds all elements matching the specified tag name. + + The tag name to match. + A containing all + IWebElements matching the criteria. + + + + Defines the interface through which the user finds elements by XPath. + + + + + Finds the first element matching the specified XPath query. + + The XPath query to match. + The first matching the criteria. + + + + Finds all elements matching the specified XPath query. + + The XPath query to match. + A containing all + IWebElements matching the criteria. + + + + Defines the interface through which the user can access the driver used to find an element. + + + + + Gets the underlying Dictionary for a given set of capabilities. + + + + + Defines the interface through which the framework can serialize an element to the wire protocol. + + + + + Gets the internal ID of the element. + + + + + Converts an object into an object that represents an element for the wire protocol. + + A that represents an element in the wire protocol. + + + + Defines the interface through which the user can access the driver used to find an element. + + + + + Gets the used to find this element. + + + + + Defines the interface through which the user can discover if there is an underlying element to be used. + + + + + Gets the wrapped by this object. + + + + + Encapsulates methods for working with ports. + + + + + Finds a random, free port to be listened on. + + A random, free port to be listened on. + + + + Encapsulates methods for finding and extracting WebDriver resources. + + + + + Gets a string representing the version of the Selenium assembly. + + + + + Gets a string representing the platform family on which the Selenium assembly is executing. + + + + + Gets a that contains the resource to use. + + A file name in the file system containing the resource to use. + A string representing the resource name embedded in the + executing assembly, if it is not found in the file system. + A Stream from which the resource can be read. + Thrown if neither the file nor the embedded resource can be found. + + The GetResourceStream method searches for the specified resource using the following + algorithm: + + + In the same directory as the calling assembly. + In the full path specified by the argument. + Inside the calling assembly as an embedded resource. + + + + + + + Returns a value indicating whether a resource exists with the specified ID. + + ID of the embedded resource to check for. + if the resource exists in the calling assembly; otherwise . + + + + Class to Create the capabilities of the browser you require for . + If you wish to use default values use the static methods + + + + + Initializes a new instance of the class + + + + + Initializes a new instance of the class + + Dictionary of items for the remote driver + + + + Gets the browser name + + + + + Gets the capability value with the specified name. + + The name of the capability to get. + The value of the capability. + + The specified capability name is not in the set of capabilities. + + + + + Gets the underlying Dictionary for a given set of capabilities. + + + + + Gets the internal capabilities dictionary. + + + + + Gets a value indicating whether the browser has a given capability. + + The capability to get. + Returns if the browser has the capability; otherwise, . + + + + Gets a capability of the browser. + + The capability to get. + An object associated with the capability, or + if the capability is not set on the browser. + + + + Converts the object to a . + + The containing the capabilities. + + + + Return a string of capabilities being used + + String of capabilities being used + + + + Represents a cookie returned to the driver by the browser. + + + + + Initializes a new instance of the class with a specific name, + value, domain, path and expiration date. + + The name of the cookie. + The value of the cookie. + The domain of the cookie. + The path of the cookie. + The expiration date of the cookie. + if the cookie is secure; otherwise + if the cookie is an HTTP-only cookie; otherwise + If the name is or an empty string, + or if it contains a semi-colon. + If the value or currentUrl is . + + + + Gets a value indicating whether the cookie is secure. + + + + + Gets a value indicating whether the cookie is an HTTP-only cookie. + + + + + Creates and returns a string representation of the current cookie. + + A string representation of the current cookie. + + + + Provides entry points into needed unmanaged APIs. + + + + + Values for flags for setting information about a native operating system handle. + + + + + No flags are to be set for the handle. + + + + + If this flag is set, a child process created with the bInheritHandles + parameter of CreateProcess set to TRUE will inherit the object handle. + + + + + If this flag is set, calling the CloseHandle function will not close the + object handle. + + + + + Sets the handle information for a Windows object. + + Handle to the object. + The handle information to set. + The flags for the handle. + if the information is set; otherwise . + + + + The exception that is thrown when the users attempts to set a cookie with an invalid domain. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with + a specified error message. + + The message that describes the error. + + + + Initializes a new instance of the class with + a specified error message and a reference to the inner exception that is the + cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, + or if no inner exception is specified. + + + + Initializes a new instance of the class with serialized data. + + The that holds the serialized + object data about the exception being thrown. + The that contains contextual + information about the source or destination. + + + + The exception that is thrown when a reference to an element is no longer valid. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with + a specified error message. + + The message that describes the error. + + + + Initializes a new instance of the class with + a specified error message and a reference to the inner exception that is the + cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, + or if no inner exception is specified. + + + + Initializes a new instance of the class with serialized data. + + The that holds the serialized + object data about the exception being thrown. + The that contains contextual + information about the source or destination. + + + + The exception that is thrown when an element is not visible. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with + a specified error message. + + The message that describes the error. + + + + Initializes a new instance of the class with + a specified error message and a reference to the inner exception that is the + cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, + or if no inner exception is specified. + + + + Initializes a new instance of the class with serialized data. + + The that holds the serialized + object data about the exception being thrown. + The that contains contextual + information about the source or destination. + + + + Defines an interface allowing the user to set options on the browser. + + + + + Gets an object allowing the user to manipulate cookies on the page. + + + + + Gets an object allowing the user to manipulate the currently-focused browser window. + + "Currently-focused" is defined as the browser window having the window handle + returned when IWebDriver.CurrentWindowHandle is called. + + + + Gets an object allowing the user to examing the logs for this driver instance. + + + + + Provides access to the timeouts defined for this driver. + + An object implementing the interface. + + + + Represents rotation of the browser view for orientation-sensitive devices. + When using this with a real device, the device should not be moved so that + the built-in sensors do not interfere. + + + + + Gets or sets the screen orientation of the browser on the device. + + + + + Defines the interface used to search for elements. + + + + + Finds the first using the given method. + + The locating mechanism to use. + The first matching on the current context. + If no element matches the criteria. + + + + Finds all IWebElements within the current context + using the given mechanism. + + The locating mechanism to use. + A of all WebElements + matching the current criteria, or an empty list if nothing matches. + + + + Defines the interface used to take screen shot images of the screen. + + + + + Gets a object representing the image of the page on the screen. + + A object containing the image. + + + + Defines the interface through which the user can locate a given frame or window. + + + + + Select a frame by its (zero-based) index. + + The zero-based index of the frame to select. + An instance focused on the specified frame. + If the frame cannot be found. + + + + Select a frame by its name or ID. + + The name of the frame to select. + An instance focused on the specified frame. + If the frame cannot be found. + + + + Select a frame using its previously located + + The frame element to switch to. + An instance focused on the specified frame. + If the element is neither a FRAME nor an IFRAME element. + If the element is no longer valid. + + + + Select the parent frame of the currently selected frame. + + An instance focused on the specified frame. + + + + Switches the focus of future commands for this driver to the window with the given name. + + The name of the window to select. + An instance focused on the given window. + If the window cannot be found. + + + + Selects either the first frame on the page or the main document when a page contains iFrames. + + An instance focused on the default frame. + + + + Switches to the element that currently has the focus, or the body element + if no element with focus can be detected. + + An instance representing the element + with the focus, or the body element if no element with focus can be detected. + + + + Switches to the currently active modal dialog for this particular driver instance. + + A handle to the dialog. + + + + Defines the interface through which the user can define timeouts. + + + + + Gets or sets the implicit wait timeout, which is the amount of time the + driver should wait when searching for an element if it is not immediately + present. + + + When searching for a single element, the driver should poll the page + until the element has been found, or this timeout expires before throwing + a . When searching for multiple elements, + the driver should poll the page until at least one element has been found + or this timeout has expired. + + Increasing the implicit wait timeout should be used judiciously as it + will have an adverse effect on test run time, especially when used with + slower location strategies like XPath. + + + + + + Gets or sets the asynchronous script timeout, which is the amount + of time the driver should wait when executing JavaScript asynchronously. + This timeout only affects the + method. + + + + + Gets or sets the page load timeout, which is the amount of time the driver + should wait for a page to load when setting the + property. + + + + + Interface representing basic touch screen operations. + + + + + Allows the execution of single tap on the screen, analogous to click using a Mouse. + + The object representing the location on the screen, + usually an . + + + + Allows the execution of the gesture 'down' on the screen. It is typically the first of a + sequence of touch gestures. + + The x coordinate relative to the view port. + The y coordinate relative to the view port. + + + + Allows the execution of the gesture 'up' on the screen. It is typically the last of a + sequence of touch gestures. + + The x coordinate relative to the view port. + The y coordinate relative to the view port. + + + + Allows the execution of the gesture 'move' on the screen. + + The x coordinate relative to the view port. + The y coordinate relative to the view port. + + + + Creates a scroll gesture that starts on a particular screen location. + + The object representing the location on the screen + where the scroll starts, usually an . + The x coordinate relative to the view port. + The y coordinate relative to the view port. + + + + Creates a scroll gesture for a particular x and y offset. + + The horizontal offset relative to the view port. + The vertical offset relative to the view port. + + + + Allows the execution of double tap on the screen, analogous to click using a Mouse. + + The object representing the location on the screen, + usually an . + + + + Allows the execution of a long press gesture on the screen. + + The object representing the location on the screen, + usually an . + + + + Creates a flick gesture for the current view. + + The horizontal speed in pixels per second. + The vertical speed in pixels per second. + + + + Creates a flick gesture for the current view starting at a specific location. + + The object representing the location on the screen + where the scroll starts, usually an . + The x offset relative to the viewport. + The y offset relative to the viewport. + The speed in pixels per second. + + + + Defines the interface through which the user controls the browser. + + + The interface is the main interface to use for testing, which + represents an idealized web browser. The methods in this class fall into three categories: + + Control of the browser itself + Selection of IWebElements + Debugging aids + + + Key properties and methods are , which is used to + load a new web page by setting the property, and the various methods similar + to , which is used to find IWebElements. + + + You use the interface by instantiate drivers that implement of this interface. + You should write your tests against this interface so that you may "swap in" a + more fully featured browser when there is a requirement for one. + + + + + + Gets or sets the URL the browser is currently displaying. + + + Setting the property will load a new web page in the current browser window. + This is done using an HTTP GET operation, and the method will block until the + load is complete. This will follow redirects issued either by the server or + as a meta-redirect from within the returned HTML. Should a meta-redirect "rest" + for any duration of time, it is best to wait until this timeout is over, since + should the underlying page change while your test is executing the results of + future calls against this interface will be against the freshly loaded page. + + + + + + + Gets the title of the current browser window. + + + + + Gets the source of the page last loaded by the browser. + + + If the page has been modified after loading (for example, by JavaScript) + there is no guarantee that the returned text is that of the modified page. + Please consult the documentation of the particular driver being used to + determine whether the returned text reflects the current state of the page + or the text last sent by the web server. The page source returned is a + representation of the underlying DOM: do not expect it to be formatted + or escaped in the same way as the response sent from the web server. + + + + + Gets the current window handle, which is an opaque handle to this + window that uniquely identifies it within this driver instance. + + + + + Gets the window handles of open browser windows. + + + + + Close the current window, quitting the browser if it is the last window currently open. + + + + + Quits this driver, closing every associated window. + + + + + Instructs the driver to change its settings. + + An object allowing the user to change + the settings of the driver. + + + + Instructs the driver to navigate the browser to another location. + + An object allowing the user to access + the browser's history and to navigate to a given URL. + + + + Instructs the driver to send future commands to a different frame or window. + + An object which can be used to select + a frame or window. + + + + Defines the interface through which the user controls elements on the page. + + The interface represents an HTML element. + Generally, all interesting operations to do with interacting with a page will + be performed through this interface. + + + + + Gets the tag name of this element. + + + The property returns the tag name of the + element, not the value of the name attribute. For example, it will return + "input" for an element specified by the HTML markup <input name="foo" />. + + Thrown when the target element is no longer valid in the document DOM. + + + + Gets the innerText of this element, without any leading or trailing whitespace, + and with other whitespace collapsed. + + Thrown when the target element is no longer valid in the document DOM. + + + + Gets a value indicating whether or not this element is enabled. + + The property will generally + return for everything except explicitly disabled input elements. + Thrown when the target element is no longer valid in the document DOM. + + + + Gets a value indicating whether or not this element is selected. + + This operation only applies to input elements such as checkboxes, + options in a select element and radio buttons. + Thrown when the target element is no longer valid in the document DOM. + + + + Gets a object containing the coordinates of the upper-left corner + of this element relative to the upper-left corner of the page. + + Thrown when the target element is no longer valid in the document DOM. + + + + Gets a object containing the height and width of this element. + + Thrown when the target element is no longer valid in the document DOM. + + + + Gets a value indicating whether or not this element is displayed. + + The property avoids the problem + of having to parse an element's "style" attribute to determine + visibility of an element. + Thrown when the target element is no longer valid in the document DOM. + + + + Clears the content of this element. + + If this element is a text entry element, the + method will clear the value. It has no effect on other elements. Text entry elements + are defined as elements with INPUT or TEXTAREA tags. + Thrown when the target element is no longer valid in the document DOM. + + + + Simulates typing text into the element. + + The text to type into the element. + The text to be typed may include special characters like arrow keys, + backspaces, function keys, and so on. Valid special keys are defined in + . + + Thrown when the target element is not enabled. + Thrown when the target element is not visible. + Thrown when the target element is no longer valid in the document DOM. + + + + Submits this element to the web server. + + If this current element is a form, or an element within a form, + then this will be submitted to the web server. If this causes the current + page to change, then this method will block until the new page is loaded. + Thrown when the target element is no longer valid in the document DOM. + + + + Clicks this element. + + + + Click this element. If the click causes a new page to load, the + method will attempt to block until the page has loaded. After calling the + method, you should discard all references to this + element unless you know that the element and the page will still be present. + Otherwise, any further operations performed on this element will have an undefined. + behavior. + + + If this element is not clickable, then this operation is ignored. This allows you to + simulate a users to accidentally missing the target when clicking. + + + Thrown when the target element is not visible. + Thrown when the target element is no longer valid in the document DOM. + + + + Gets the value of the specified attribute for this element. + + The name of the attribute. + The attribute's current value. Returns a if the + value is not set. + The method will return the current value + of the attribute, even if the value has been modified after the page has been + loaded. Note that the value of the following attributes will be returned even if + there is no explicit attribute on the element: + + + Attribute name + Value returned if not explicitly specified + Valid element types + + + checked + checked + Check Box + + + selected + selected + Options in Select elements + + + disabled + disabled + Input and other UI elements + + + + Thrown when the target element is no longer valid in the document DOM. + + + + Gets the value of a JavaScript property of this element. + + The name JavaScript the JavaScript property to get the value of. + The JavaScript property's current value. Returns a if the + value is not set or the property does not exist. + Thrown when the target element is no longer valid in the document DOM. + + + + Gets the value of a CSS property of this element. + + The name of the CSS property to get the value of. + The value of the specified CSS property. + The value returned by the + method is likely to be unpredictable in a cross-browser environment. + Color values should be returned as hex strings. For example, a + "background-color" property set as "green" in the HTML source, will + return "#008000" for its value. + Thrown when the target element is no longer valid in the document DOM. + + + + Provides methods for getting and setting the size and position of the browser window. + + + + + Gets or sets the position of the browser window relative to the upper-left corner of the screen. + + When setting this property, it should act as the JavaScript window.moveTo() method. + + + + Gets or sets the size of the outer browser window, including title bars and window borders. + + When setting this property, it should act as the JavaScript window.resizeTo() method. + + + + Maximizes the current window if it is not already maximized. + + + + + Minimizes the current window if it is not already maximized. + + + + + Sets the current window to full screen if it is not already in that state. + + + + + Representations of keys able to be pressed that are not text keys for sending to the browser. + + + + + Represents the NUL keystroke. + + + + + Represents the Cancel keystroke. + + + + + Represents the Help keystroke. + + + + + Represents the Backspace key. + + + + + Represents the Tab key. + + + + + Represents the Clear keystroke. + + + + + Represents the Return key. + + + + + Represents the Enter key. + + + + + Represents the Shift key. + + + + + Represents the Shift key. + + + + + Represents the Control key. + + + + + Represents the Control key. + + + + + Represents the Alt key. + + + + + Represents the Alt key. + + + + + Represents the Pause key. + + + + + Represents the Escape key. + + + + + Represents the Spacebar key. + + + + + Represents the Page Up key. + + + + + Represents the Page Down key. + + + + + Represents the End key. + + + + + Represents the Home key. + + + + + Represents the left arrow key. + + + + + Represents the left arrow key. + + + + + Represents the up arrow key. + + + + + Represents the up arrow key. + + + + + Represents the right arrow key. + + + + + Represents the right arrow key. + + + + + Represents the Left arrow key. + + + + + Represents the Left arrow key. + + + + + Represents the Insert key. + + + + + Represents the Delete key. + + + + + Represents the semi-colon key. + + + + + Represents the equal sign key. + + + + + Represents the number pad 0 key. + + + + + Represents the number pad 1 key. + + + + + Represents the number pad 2 key. + + + + + Represents the number pad 3 key. + + + + + Represents the number pad 4 key. + + + + + Represents the number pad 5 key. + + + + + Represents the number pad 6 key. + + + + + Represents the number pad 7 key. + + + + + Represents the number pad 8 key. + + + + + Represents the number pad 9 key. + + + + + Represents the number pad multiplication key. + + + + + Represents the number pad addition key. + + + + + Represents the number pad thousands separator key. + + + + + Represents the number pad subtraction key. + + + + + Represents the number pad decimal separator key. + + + + + Represents the number pad division key. + + + + + Represents the function key F1. + + + + + Represents the function key F2. + + + + + Represents the function key F3. + + + + + Represents the function key F4. + + + + + Represents the function key F5. + + + + + Represents the function key F6. + + + + + Represents the function key F7. + + + + + Represents the function key F8. + + + + + Represents the function key F9. + + + + + Represents the function key F10. + + + + + Represents the function key F11. + + + + + Represents the function key F12. + + + + + Represents the function key META. + + + + + Represents the function key COMMAND. + + + + + Gets the description of a specific key. + + The key value for which to get the description. + The description of the key. + + + + Represents an entry in a log from a driver instance. + + + + + Initializes a new instance of the class. + + + + + Gets the timestamp value of the log entry. + + + + + Gets the logging level of the log entry. + + + + + Gets the message of the log entry. + + + + + Returns a string that represents the current . + + A string that represents the current . + + + + Creates a from a dictionary as deserialized from JSON. + + The from + which to create the . + A with the values in the dictionary. + + + + Represents the levels of logging available to driver instances. + + + + + Show all log messages. + + + + + Show messages with information useful for debugging. + + + + + Show informational messages. + + + + + Show messages corresponding to non-critical issues. + + + + + Show messages corresponding to critical issues. + + + + + Show no log messages. + + + + + Class containing names of common log types. + + + + + Log messages from the client language bindings. + + + + + Logs from the current WebDriver instance. + + + + + Logs from the browser. + + + + + Logs from the server. + + + + + Profiling logs. + + + + + The exception that is thrown when an alert is not found. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with + a specified error message. + + The message that describes the error. + + + + Initializes a new instance of the class with + a specified error message and a reference to the inner exception that is the + cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, + or if no inner exception is specified. + + + + Initializes a new instance of the class with serialized data. + + The that holds the serialized + object data about the exception being thrown. + The that contains contextual + information about the source or destination. + + + + The exception that is thrown when an element is not found. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with + a specified error message. + + The message that describes the error. + + + + Initializes a new instance of the class with + a specified error message and a reference to the inner exception that is the + cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, + or if no inner exception is specified. + + + + Initializes a new instance of the class with serialized data. + + The that holds the serialized + object data about the exception being thrown. + The that contains contextual + information about the source or destination. + + + + The exception that is thrown when a frame is not found. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with + a specified error message. + + The message that describes the error. + + + + Initializes a new instance of the class with + a specified error message and a reference to the inner exception that is the + cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, + or if no inner exception is specified. + + + + Initializes a new instance of the class with serialized data. + + The that holds the serialized + object data about the exception being thrown. + The that contains contextual + information about the source or destination. + + + + The exception that is thrown when a window is not found. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with + a specified error message. + + The message that describes the error. + + + + Initializes a new instance of the class with + a specified error message and a reference to the inner exception that is the + cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, + or if no inner exception is specified. + + + + Initializes a new instance of the class with serialized data. + + The that holds the serialized + object data about the exception being thrown. + The that contains contextual + information about the source or destination. + + + + The exception that is thrown when an item is not found. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with + a specified error message. + + The message that describes the error. + + + + Initializes a new instance of the class with + a specified error message and a reference to the inner exception that is the + cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, + or if no inner exception is specified. + + + + Initializes a new instance of the class with serialized data. + + The that holds the serialized + object data about the exception being thrown. + The that contains contextual + information about the source or destination. + + + + Provides a mechanism to write tests against Opera + + + + [TestFixture] + public class Testing + { + private IWebDriver driver; + + [SetUp] + public void SetUp() + { + driver = new OperaDriver(); + } + + [Test] + public void TestGoogle() + { + driver.Navigate().GoToUrl("http://www.google.co.uk"); + /* + * Rest of the test + */ + } + + [TearDown] + public void TearDown() + { + driver.Quit(); + } + } + + + + + + Accept untrusted SSL Certificates + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class using the specified options. + + The to be used with the Opera driver. + + + + Initializes a new instance of the class using the specified path + to the directory containing OperaDriver.exe. + + The full path to the directory containing OperaDriver.exe. + + + + Initializes a new instance of the class using the specified path + to the directory containing OperaDriver.exe and options. + + The full path to the directory containing OperaDriver.exe. + The to be used with the Opera driver. + + + + Initializes a new instance of the class using the specified path + to the directory containing OperaDriver.exe, options, and command timeout. + + The full path to the directory containing OperaDriver.exe. + The to be used with the Opera driver. + The maximum amount of time to wait for each command. + + + + Initializes a new instance of the class using the specified + and options. + + The to use. + The used to initialize the driver. + + + + Initializes a new instance of the class using the specified . + + The to use. + The to be used with the Opera driver. + The maximum amount of time to wait for each command. + + + + Gets or sets the responsible for detecting + sequences of keystrokes representing file paths and names. + + The Opera driver does not allow a file detector to be set, + as the server component of the Opera driver (OperaDriver.exe) only + allows uploads from the local computer environment. Attempting to set + this property has no effect, but does not throw an exception. If you + are attempting to run the Opera driver remotely, use + in conjunction with a standalone WebDriver server. + + + + Exposes the service provided by the native OperaDriver executable. + + + + + Initializes a new instance of the class. + + The full path to the OperaDriver executable. + The file name of the OperaDriver executable. + The port on which the OperaDriver executable should listen. + + + + Gets or sets the location of the log file written to by the OperaDriver executable. + + + + + Gets or sets the base URL path prefix for commands (e.g., "wd/url"). + + + + + Gets or sets the address of a server to contact for reserving a port. + + + + + Gets or sets the port on which the Android Debug Bridge is listening for commands. + + + + + Gets or sets a value indicating whether to enable verbose logging for the OperaDriver executable. + Defaults to . + + + + + Gets the command-line arguments for the driver service. + + + + + Creates a default instance of the OperaDriverService. + + A OperaDriverService that implements default settings. + + + + Creates a default instance of the OperaDriverService using a specified path to the OperaDriver executable. + + The directory containing the OperaDriver executable. + A OperaDriverService using a random port. + + + + Creates a default instance of the OperaDriverService using a specified path to the OperaDriver executable with the given name. + + The directory containing the OperaDriver executable. + The name of the OperaDriver executable file. + A OperaDriverService using a random port. + + + + Class to manage options specific to + + + Used with OperaDriver.exe for Chromium v0.1.0 and higher. + + + + OperaOptions options = new OperaOptions(); + options.AddExtensions("\path\to\extension.crx"); + options.BinaryLocation = "\path\to\opera"; + + + For use with OperaDriver: + + + OperaDriver driver = new OperaDriver(options); + + + For use with RemoteWebDriver: + + + RemoteWebDriver driver = new RemoteWebDriver(new Uri("http://localhost:4444/wd/hub"), options.ToCapabilities()); + + + + + + Gets the name of the capability used to store Opera options in + a object. + + + + + Gets or sets the location of the Opera browser's binary executable file. + + + + + Gets or sets a value indicating whether Opera should be left running after the + OperaDriver instance is exited. Defaults to . + + + + + Gets the list of arguments appended to the Opera command line as a string array. + + + + + Gets the list of extensions to be installed as an array of base64-encoded strings. + + + + + Gets or sets the address of a Opera debugger server to connect to. + Should be of the form "{hostname|IP address}:port". + + + + + Gets or sets the directory in which to store minidump files. + + + + + Adds a single argument to the list of arguments to be appended to the Opera.exe command line. + + The argument to add. + + + + Adds arguments to be appended to the Opera.exe command line. + + An array of arguments to add. + + + + Adds arguments to be appended to the Opera.exe command line. + + An object of arguments to add. + + + + Adds a single argument to be excluded from the list of arguments passed by default + to the Opera.exe command line by operadriver.exe. + + The argument to exclude. + + + + Adds arguments to be excluded from the list of arguments passed by default + to the Opera.exe command line by operadriver.exe. + + An array of arguments to exclude. + + + + Adds arguments to be excluded from the list of arguments passed by default + to the Opera.exe command line by operadriver.exe. + + An object of arguments to exclude. + + + + Adds a path to a packed Opera extension (.crx file) to the list of extensions + to be installed in the instance of Opera. + + The full path to the extension to add. + + + + Adds a list of paths to packed Opera extensions (.crx files) to be installed + in the instance of Opera. + + An array of full paths to the extensions to add. + + + + Adds a list of paths to packed Opera extensions (.crx files) to be installed + in the instance of Opera. + + An of full paths to the extensions to add. + + + + Adds a base64-encoded string representing a Opera extension to the list of extensions + to be installed in the instance of Opera. + + A base64-encoded string representing the extension to add. + + + + Adds a list of base64-encoded strings representing Opera extensions to the list of extensions + to be installed in the instance of Opera. + + An array of base64-encoded strings representing the extensions to add. + + + + Adds a list of base64-encoded strings representing Opera extensions to be installed + in the instance of Opera. + + An of base64-encoded strings + representing the extensions to add. + + + + Adds a preference for the user-specific profile or "user data directory." + If the specified preference already exists, it will be overwritten. + + The name of the preference to set. + The value of the preference to set. + + + + Adds a preference for the local state file in the user's data directory for Opera. + If the specified preference already exists, it will be overwritten. + + The name of the preference to set. + The value of the preference to set. + + + + Provides a means to add additional capabilities not yet added as type safe options + for the Opera driver. + + The name of the capability to add. + The value of the capability to add. + + thrown when attempting to add a capability for which there is already a type safe option, or + when is or the empty string. + + Calling + where has already been added will overwrite the + existing value with the new value in . + Also, by default, calling this method adds capabilities to the options object passed to + operadriver.exe. + + + + Provides a means to add additional capabilities not yet added as type safe options + for the Opera driver. + + The name of the capability to add. + The value of the capability to add. + Indicates whether the capability is to be set as a global + capability for the driver instead of a Opera-specific option. + + thrown when attempting to add a capability for which there is already a type safe option, or + when is or the empty string. + + Calling + where has already been added will overwrite the + existing value with the new value in + + + + Returns DesiredCapabilities for Opera with these options included as + capabilities. This does not copy the options. Further changes will be + reflected in the returned capabilities. + + The DesiredCapabilities for Opera with these options. + + + + Provides a mechanism to get elements off the page for test + + + + + Initializes a new instance of the class + + Driver in use + Id of the element + + + + Represents the known and supported Platforms that WebDriver runs on. + + The class maps closely to the Operating System, + but differs slightly, because this class is used to extract information such as + program locations and line endings. + + + + Any platform. This value is never returned by a driver, but can be used to find + drivers with certain capabilities. + + + + + Any version of Microsoft Windows. This value is never returned by a driver, + but can be used to find drivers with certain capabilities. + + + + + Any Windows NT-based version of Microsoft Windows. This value is never returned + by a driver, but can be used to find drivers with certain capabilities. This value + is equivalent to PlatformType.Windows. + + + + + Versions of Microsoft Windows that are compatible with Windows XP. + + + + + Versions of Microsoft Windows that are compatible with Windows Vista. + + + + + Any version of the Macintosh OS + + + + + Any version of the Unix operating system. + + + + + Any version of the Linux operating system. + + + + + A version of the Android mobile operating system. + + + + + Represents the platform on which tests are to be run. + + + + + Initializes a new instance of the class for a specific platform type. + + The platform type. + + + + Gets the current platform. + + + + + Gets the major version of the platform operating system. + + + + + Gets the major version of the platform operating system. + + + + + Gets the type of the platform. + + + + + Gets the value of the platform type for transmission using the JSON Wire Protocol. + + + + + Compares the platform to the specified type. + + A value to compare to. + if the platforms match; otherwise . + + + + Returns the string value for this platform type. + + The string value for this platform type. + + + + Creates a object from a string name of the platform. + + The name of the platform to create. + The Platform object represented by the string name. + + + + Describes the kind of proxy. + + + Keep these in sync with the Firefox preferences numbers: + http://kb.mozillazine.org/Network.proxy.type + + + + + Direct connection, no proxy (default on Windows). + + + + + Manual proxy settings (e.g., for httpProxy). + + + + + Proxy automatic configuration from URL. + + + + + Use proxy automatic detection. + + + + + Use the system values for proxy settings (default on Linux). + + + + + No proxy type is specified. + + + + + Describes proxy settings to be used with a driver instance. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with the given proxy settings. + + A dictionary of settings to use with the proxy. + + + + Gets or sets the type of proxy. + + + + + Gets the type of proxy as a string for JSON serialization. + + + + + Gets or sets a value indicating whether the proxy uses automatic detection. + + + + + Gets or sets the value of the proxy for the FTP protocol. + + + + + Gets or sets the value of the proxy for the HTTP protocol. + + + + + Gets or sets the value for bypass proxy addresses. + + + + + Gets the semicolon delimited list of address for which to bypass the proxy. + + + + + Gets or sets the URL used for proxy automatic configuration. + + + + + Gets or sets the value of the proxy for the SSL protocol. + + + + + Gets or sets the value of the proxy for the SOCKS protocol. + + + + + Gets or sets the value of username for the SOCKS proxy. + + + + + Gets or sets the value of password for the SOCKS proxy. + + + + + Adds a single address to the list of addresses against which the proxy will not be used. + + The address to add. + + + + Adds addresses to the list of addresses against which the proxy will not be used. + + An array of addresses to add. + + + + Adds addresses to the list of addresses against which the proxy will not be used. + + An object of arguments to add. + + + + Returns a dictionary suitable for serializing to the W3C Specification + dialect of the wire protocol. + + A dictionary suitable for serializing to the W3C Specification + dialect of the wire protocol. + + + + Returns a dictionary suitable for serializing to the OSS dialect of the + wire protocol. + + A dictionary suitable for serializing to the OSS dialect of the + wire protocol. + + + + Base class for managing options specific to a browser driver. + + + + + Creates a new instance of the class. + + + + + Creates a new instance of the class, + containing the specified to use in the remote + session. + + + A object that contains values that must be matched + by the remote end to create the remote session. + + + A list of objects that contain values that may be matched + by the remote end to create the remote session. + + + + + Gets a value indicating the options that must be matched by the remote end to create a session. + + + + + Gets a value indicating the number of options that may be matched by the remote end to create a session. + + + + + Gets the capability value with the specified name. + + The name of the capability to get. + The value of the capability. + + The specified capability name is not in the set of capabilities. + + + + + Add a metadata setting to this set of remote session settings. + + The name of the setting to set. + The value of the setting. + + The value to be set must be serializable to JSON for transmission + across the wire to the remote end. To be JSON-serializable, the value + must be a string, a numeric value, a boolean value, an object that + implmeents that contains JSON-serializable + objects, or a where the keys + are strings and the values are JSON-serializable. + + + Thrown if the setting name is null, the empty string, or one of the + reserved names of metadata settings; or if the setting value is not + JSON serializable. + + + + + Adds a object to the list of options containing values to be + "first matched" by the remote end. + + The to add to the list of "first matched" options. + + + + Adds a object containing values that must be matched + by the remote end to successfully create a session. + + The that must be matched by + the remote end to successfully create a session. + + + + Gets a value indicating whether the browser has a given capability. + + The capability to get. + Returns if this set of capabilities has the capability; + otherwise, . + + + + Gets a capability of the browser. + + The capability to get. + An object associated with the capability, or + if the capability is not set in this set of capabilities. + + + + Return a dictionary representation of this . + + A representation of this . + + + + Return a string representation of the remote session settings to be sent. + + String representation of the remote session settings to be sent. + + + + Provides a way to access Safari to run your tests by creating a SafariDriver instance + + + When the WebDriver object has been instantiated the browser will load. The test can then navigate to the URL under test and + start your test. + + + + [TestFixture] + public class Testing + { + private IWebDriver driver; + + [SetUp] + public void SetUp() + { + driver = new SafariDriver(); + } + + [Test] + public void TestGoogle() + { + driver.Navigate().GoToUrl("http://www.google.co.uk"); + /* + * Rest of the test + */ + } + + [TearDown] + public void TearDown() + { + driver.Quit(); + driver.Dispose(); + } + } + + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class using the specified . + + The to use for this instance. + + + + Initializes a new instance of the class using the specified driver service. + + The used to initialize the driver. + + + + Initializes a new instance of the class using the specified path + to the directory containing ChromeDriver.exe. + + The full path to the directory containing SafariDriver executable. + + + + Initializes a new instance of the class using the specified path + to the directory containing ChromeDriver.exe and options. + + The full path to the directory containing SafariDriver executable. + The to be used with the Safari driver. + + + + Initializes a new instance of the class using the specified path + to the directory containing ChromeDriver.exe, options, and command timeout. + + The full path to the directory containing SafariDriver executable. + The to be used with the Safari driver. + The maximum amount of time to wait for each command. + + + + Initializes a new instance of the class using the specified + and options. + + The to use. + The used to initialize the driver. + + + + Initializes a new instance of the class using the specified . + + The to use. + The to be used with the Safari driver. + The maximum amount of time to wait for each command. + + + + Gets or sets the responsible for detecting + sequences of keystrokes representing file paths and names. + + The Safari driver does not allow a file detector to be set, + as the server component of the Safari driver (the Safari extension) only + allows uploads from the local computer environment. Attempting to set + this property has no effect, but does not throw an exception. If you + are attempting to run the Safari driver remotely, use + in conjunction with a standalone WebDriver server. + + + + Exposes the service provided by the native SafariDriver executable. + + + + + Initializes a new instance of the class. + + The full path to the SafariDriver executable. + The file name of the SafariDriver executable. + The port on which the SafariDriver executable should listen. + + + + Gets or sets a value indicating whether to use the default open-source project + dialect of the protocol instead of the default dialect compliant with the + W3C WebDriver Specification. + + + This is only valid for versions of the driver for Safari that target Safari 12 + or later, and will result in an error if used with prior versions of the driver. + + + + + Gets the command-line arguments for the driver service. + + + + + Gets a value indicating the time to wait for the service to terminate before forcing it to terminate. + For the Safari driver, there is no time for termination + + + + + Gets a value indicating whether the service has a shutdown API that can be called to terminate + it gracefully before forcing a termination. + + + + + Gets a value indicating whether the service is responding to HTTP requests. + + + + + Creates a default instance of the SafariDriverService. + + A SafariDriverService that implements default settings. + + + + Creates a default instance of the SafariDriverService using a specified path to the ChromeDriver executable. + + The directory containing the ChromeDriver executable. + A ChromeDriverService using a random port. + + + + Creates a default instance of the SafariDriverService using a specified path to the ChromeDriver executable with the given name. + + The directory containing the ChromeDriver executable. + The name of the ChromeDriver executable file. + A ChromeDriverService using a random port. + + + + Class to manage options specific to + + + + SafariOptions options = new SafariOptions(); + options.SkipExtensionInstallation = true; + + + For use with SafariDriver: + + + SafariDriver driver = new SafariDriver(options); + + + For use with RemoteWebDriver: + + + RemoteWebDriver driver = new RemoteWebDriver(new Uri("http://localhost:4444/wd/hub"), options.ToCapabilities()); + + + + + + Initializes a new instance of the class. + + + + + Gets or sets a value indicating whether to have the driver preload the + Web Inspector and JavaScript debugger in the background. + + + + + Gets or sets a value indicating whether to have the driver preload the + Web Inspector and start a timeline recording in the background. + + + + + Gets or sets a value indicating whether the browser is the technology preview. + + + + + Provides a means to add additional capabilities not yet added as type safe options + for the Safari driver. + + The name of the capability to add. + The value of the capability to add. + + thrown when attempting to add a capability for which there is already a type safe option, or + when is or the empty string. + + Calling where + has already been added will overwrite the existing value with the new value in + + + + Returns ICapabilities for Safari with these options included as + capabilities. This copies the options. Further changes will not be + reflected in the returned capabilities. + + The ICapabilities for Safari with these options. + + + + Represents possible screen orientations. + + + + + Represents a portrait mode, where the screen is vertical. + + + + + Represents Landscape mode, where the screen is horizontal. + + + + + File format for saving screenshots. + + + + + W3C Portable Network Graphics image format. + + + + + Joint Photgraphic Experts Group image format. + + + + + Graphics Interchange Format image format. + + + + + Tagged Image File Format image format. + + + + + Bitmap image format. + + + + + Represents an image of the page currently loaded in the browser. + + + + + Initializes a new instance of the class. + + The image of the page as a Base64-encoded string. + + + + Gets the value of the screenshot image as a Base64-encoded string. + + + + + Gets the value of the screenshot image as an array of bytes. + + + + + Saves the screenshot to a Portable Network Graphics (PNG) file, overwriting the + file if it already exists. + + The full path and file name to save the screenshot to. + + + + Saves the screenshot to a file, overwriting the file if it already exists. + + The full path and file name to save the screenshot to. + A value indicating the format + to save the image to. + + + + Returns a String that represents the current Object. + + A String that represents the current Object. + + + + The exception that is thrown when a reference to an element is no longer valid. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with + a specified error message. + + The message that describes the error. + + + + Initializes a new instance of the class with + a specified error message and a reference to the inner exception that is the + cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, + or if no inner exception is specified. + + + + Initializes a new instance of the class with serialized data. + + The that holds the serialized + object data about the exception being thrown. + The that contains contextual + information about the source or destination. + + + + An implementation of the interface that may have its timeout and polling interval + configured on the fly. + + The type of object on which the wait it to be applied. + + + + Initializes a new instance of the class. + + The input value to pass to the evaluated conditions. + + + + Initializes a new instance of the class. + + The input value to pass to the evaluated conditions. + The clock to use when measuring the timeout. + + + + Gets or sets how long to wait for the evaluated condition to be true. The default timeout is 500 milliseconds. + + + + + Gets or sets how often the condition should be evaluated. The default timeout is 500 milliseconds. + + + + + Gets or sets the message to be displayed when time expires. + + + + + Configures this instance to ignore specific types of exceptions while waiting for a condition. + Any exceptions not whitelisted will be allowed to propagate, terminating the wait. + + The types of exceptions to ignore. + + + + Repeatedly applies this instance's input value to the given function until one of the following + occurs: + + + the function returns neither null nor false + the function throws an exception that is not in the list of ignored exception types + the timeout expires + + + + The delegate's expected return type. + A delegate taking an object of type T as its parameter, and returning a TResult. + The delegate's return value. + + + + Throws a with the given message. + + The message of the exception. + The last exception thrown by the condition. + This method may be overridden to throw an exception that is + idiomatic for a particular test infrastructure. + + + + An interface describing time handling functions for timeouts. + + + + + Gets the current date and time values. + + + + + Gets the at a specified offset in the future. + + The offset to use. + The at the specified offset in the future. + + + + Gets a value indicating whether the current date and time is before the specified date and time. + + The date and time values to compare the current date and time values to. + if the current date and time is before the specified date and time; otherwise, . + + + + Interface describing a class designed to wait for a condition. + + The type of object used to detect the condition. + + + + Gets or sets how long to wait for the evaluated condition to be true. + + + + + Gets or sets how often the condition should be evaluated. + + + + + Gets or sets the message to be displayed when time expires. + + + + + Configures this instance to ignore specific types of exceptions while waiting for a condition. + Any exceptions not whitelisted will be allowed to propagate, terminating the wait. + + The types of exceptions to ignore. + + + + Waits until a condition is true or times out. + + The type of result to expect from the condition. + A delegate taking a TSource as its parameter, and returning a TResult. + If TResult is a boolean, the method returns when the condition is true, and otherwise. + If TResult is an object, the method returns the object when the condition evaluates to a value other than . + Thrown when TResult is not boolean or an object type. + + + + Uses the system clock to calculate time for timeouts. + + + + + Gets the current date and time values. + + + + + Calculates the date and time values after a specific delay. + + The delay after to calculate. + The future date and time values. + + + + Gets a value indicating whether the current date and time is before the specified date and time. + + The date and time values to compare the current date and time values to. + if the current date and time is before the specified date and time; otherwise, . + + + + Provides the ability to wait for an arbitrary condition during test execution. + + + + IWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(3)) + IWebElement element = wait.Until(driver => driver.FindElement(By.Name("q"))); + + + + + + Initializes a new instance of the class. + + The WebDriver instance used to wait. + The timeout value indicating how long to wait for the condition. + + + + Initializes a new instance of the class. + + An object implementing the interface used to determine when time has passed. + The WebDriver instance used to wait. + The timeout value indicating how long to wait for the condition. + A value indicating how often to check for the condition to be true. + + + + The exception that is thrown when the user is unable to set a cookie. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with + a specified error message. + + The message that describes the error. + + + + Initializes a new instance of the class with + a specified error message and a reference to the inner exception that is the + cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, + or if no inner exception is specified. + + + + Initializes a new instance of the class with serialized data. + + The that holds the serialized + object data about the exception being thrown. + The that contains contextual + information about the source or destination. + + + + The exception that is thrown when an unhandled alert is present. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with + a specified error message. + + The message that describes the error. + + + + Initializes a new instance of the class with + a specified error message and alert text. + + The message that describes the error. + The text of the unhandled alert. + + + + Initializes a new instance of the class with + a specified error message and a reference to the inner exception that is the + cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, + or if no inner exception is specified. + + + + Initializes a new instance of the class with serialized data. + + The that holds the serialized + object data about the exception being thrown. + The that contains contextual + information about the source or destination. + + + + Gets the text of the unhandled alert. + + + + + Populates a SerializationInfo with the data needed to serialize the target object. + + The that holds the serialized + object data about the exception being thrown. + The that contains contextual + information about the source or destination. + + + + Represents exceptions that are thrown when an error occurs during actions. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with + a specified error message. + + The message that describes the error. + + + + Initializes a new instance of the class with + a specified error message and a reference to the inner exception that is the + cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, + or if no inner exception is specified. + + + + Initializes a new instance of the class with serialized data. + + The that holds the serialized + object data about the exception being thrown. + The that contains contextual + information about the source or destination. + + + + Specifies return values for actions in the driver. + + + + + The action was successful. + + + + + The index specified for the action was out of the acceptable range. + + + + + No collection was specified. + + + + + No string was specified. + + + + + No string length was specified. + + + + + No string wrapper was specified. + + + + + No driver matching the criteria exists. + + + + + No element matching the criteria exists. + + + + + No frame matching the criteria exists. + + + + + The functionality is not supported. + + + + + The specified element is no longer valid. + + + + + The specified element is not displayed. + + + + + The specified element is not enabled. + + + + + An unhandled error occurred. + + + + + An error occurred, but it was expected. + + + + + The specified element is not selected. + + + + + No document matching the criteria exists. + + + + + An unexpected JavaScript error occurred. + + + + + No result is available from the JavaScript execution. + + + + + The result from the JavaScript execution is not recognized. + + + + + No collection matching the criteria exists. + + + + + A timeout occurred. + + + + + A null pointer was received. + + + + + No window matching the criteria exists. + + + + + An illegal attempt was made to set a cookie under a different domain than the current page. + + + + + A request to set a cookie's value could not be satisfied. + + + + + An alert was found open unexpectedly. + + + + + A request was made to switch to an alert, but no alert is currently open. + + + + + An asynchronous JavaScript execution timed out. + + + + + The coordinates of the element are invalid. + + + + + The selector used (CSS/XPath) was invalid. + + + + + A session was not created by the driver + + + + + The requested move was outside the active view port + + + + + The XPath selector was invalid. + + + + + An insecure SSl certificate was specified. + + + + + The element was not interactable + + + + + An invalid argument was passed to the command. + + + + + No cookie was found matching the name requested. + + + + + The driver was unable to capture the screen. + + + + + The click on the element was intercepted by a different element. + + + + + Represents exceptions that are thrown when an error occurs during actions. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with + a specified error message. + + The message that describes the error. + + + + Initializes a new instance of the class with + a specified error message and a reference to the inner exception that is the + cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, + or if no inner exception is specified. + + + + Initializes a new instance of the class with serialized data. + + The that holds the serialized + object data about the exception being thrown. + The that contains contextual + information about the source or destination. + + + + The exception that is thrown when an error occurs during an XPath lookup. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with + a specified error message. + + The message that describes the error. + + + + Initializes a new instance of the class with + a specified error message and a reference to the inner exception that is the + cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, + or if no inner exception is specified. + + + + Initializes a new instance of the class with serialized data. + + The that holds the serialized + object data about the exception being thrown. + The that contains contextual + information about the source or destination. + + + + Unique class for compression/decompression file. Represents a Zip file. + + + + + Compression method enumeration. + + + + Uncompressed storage. + + + Deflate compression method. + + + + Gets a value indicating whether file names and comments should be encoded using UTF-8. + + + + + Gets a value indicating whether to force using the deflate algorithm, + even if doing so inflates the stored file. + + + + + Create a new zip storage in a stream. + + The stream to use to create the Zip file. + General comment for Zip file. + A valid ZipStorer object. + + + + Open the existing Zip storage in a stream. + + Already opened stream with zip contents. + File access mode for stream operations. + A valid ZipStorer object. + + + + Add full contents of a file into the Zip storage. + + Compression method used to store the file. + Full path of file to add to Zip storage. + File name and path as desired in Zip directory. + Comment for stored file. + + + + Add full contents of a stream into the Zip storage. + + Compression method used to store the stream. + Stream object containing the data to store in Zip. + File name and path as desired in Zip directory. + Modification time of the data to store. + Comment for stored file. + + + + Updates central directory (if needed) and close the Zip storage. + + This is a required step, unless automatic dispose is used. + + + + Read all the file records in the central directory. + + List of all entries in directory. + + + + Copy the contents of a stored file into a physical file. + + Entry information of file to extract. + Name of file to store uncompressed data. + if the file is successfully extracted; otherwise, . + Unique compression methods are Store and Deflate. + + + + Copy the contents of a stored file into an open stream. + + Entry information of file to extract. + Stream to store the uncompressed data. + if the file is successfully extracted; otherwise, . + Unique compression methods are Store and Deflate. + + + + Closes the Zip file stream. + + + + + Represents an entry in Zip file directory + + + + Compression method + + + Full path and filename as stored in Zip + + + Original file size + + + Compressed file size + + + Offset of header information inside Zip storage + + + Offset of file inside Zip storage + + + Size of header information + + + 32-bit checksum of entire file + + + Last modification time of file + + + User comment for file + + + True if UTF8 encoding for filename and comments, false if default (CP 437) + + + Overriden method + Filename in Zip + + +