PageRenderTime 7ms CodeModel.GetById 21ms app.highlight 19ms RepoModel.GetById 1ms app.codeStats 0ms

/docs/Docs/assertions.html

http://github.com/lefthandedgoat/canopy
HTML | 211 lines | 211 code | 0 blank | 0 comment | 0 complexity | 719c12dcfd539e40385f7c269d10f337 MD5 | raw file
  1<!doctype html>
  2<html data-reactroot="" lang="en"><head><title>canopy docs / assertions.html-canopy</title><meta name="viewport" content="width=device-width, initial-scale=1" /><link href="https://lefthandedgoat.github.io/canopy/content/toggle-bootstrap.min.css?version=637191850341272396" type="text/css" rel="stylesheet" /><link href="https://lefthandedgoat.github.io/canopy/content/toggle-bootstrap-dark.min.css?version=637191850341272396" type="text/css" rel="stylesheet" /><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/all.min.css" rel="stylesheet" integrity="sha384-KA6wR/X5RY4zFAHpv/CnoG2UW1uogYfdnP67Uv7eULvTveboZJg0qUpmJZb5VqzN" crossorigin="anonymous" /><link href="https://lefthandedgoat.github.io/canopy/content/style.css?version=637191850341272396" type="text/css" rel="stylesheet" /></head><body><nav class="navbar navbar-expand-md sticky-top navbar-dark bg-dark"><a class="navbar-brand" href="https://lefthandedgoat.github.io/canopy/index.html"><i class="fa fa-tree text-white mr-2"></i>canopy</a><button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation"><span class="navbar-toggler-icon"></span></button><div class="collapse navbar-collapse" id="navbarNav"><ul class="navbar-nav mr-auto"><li class="nav-item dropdown"><a id="navbarDropdown-Api_Reference" href="#" data-toggle="dropdown" aria-haspopup  class="nav-link dropdown-toggle">Api Reference</a><ul aria-labelledby="dropdownMenu1" class="dropdown-menu border-0 shadow"><li class="dropdown-submenu"><a id="navbarDropdown-canopy" href="#" role="button" data-toggle="dropdown" aria-haspopup  class="dropdown-item dropdown-toggle">canopy</a><ul aria-labelledby="dropdownMenu2" class="dropdown-menu border-0 shadow"><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy\canopy.html">canopy</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy\canopy-classic.html">canopy classic</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy\canopy-configuration.html">canopy configuration</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy\canopy-csharp-canopy.html">canopy csharp canopy</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy\canopy-finders.html">canopy finders</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy\canopy-finders-byjquery.html">canopy finders byjquery</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy\canopy-history.html">canopy history</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy\canopy-jarowinkler.html">canopy jarowinkler</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy\canopy-jarowinkler-result.html">canopy jarowinkler result</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy\canopy-parallell-functions.html">canopy parallell functions</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy\canopy-parallell-functions-navigate.html">canopy parallell functions navigate</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy\canopy-parallell-instanced.html">canopy parallell instanced</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy\canopy-parallell-instanced-instance.html">canopy parallell instanced instance</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy\canopy-reporters.html">canopy reporters</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy\canopy-reporters-consolereporter.html">canopy reporters consolereporter</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy\canopy-reporters-junitreporter.html">canopy reporters junitreporter</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy\canopy-reporters-livehtmlreporter.html">canopy reporters livehtmlreporter</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy\canopy-reporters-teamcityreporter.html">canopy reporters teamcityreporter</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy\canopy-runner-classic.html">canopy runner classic</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy\canopy-screen.html">canopy screen</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy\canopy-screen-screenboundary.html">canopy screen screenboundary</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy\canopy-types.html">canopy types</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy\canopy-types-browsers.html">canopy types browsers</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy\canopy-types-browserstartmode.html">canopy types browserstartmode</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy\canopy-types-canopycheckfailedexception.html">canopy types canopycheckfailedexception</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy\canopy-types-canopycontainsfailedexception.html">canopy types canopycontainsfailedexception</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy\canopy-types-canopycountexception.html">canopy types canopycountexception</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy\canopy-types-canopydeselectionfailedexception.html">canopy types canopydeselectionfailedexception</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy\canopy-types-canopydisabledfailedexception.html">canopy types canopydisabledfailedexception</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy\canopy-types-canopydisplayedfailedexception.html">canopy types canopydisplayedfailedexception</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy\canopy-types-canopyelementnotfoundexception.html">canopy types canopyelementnotfoundexception</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy\canopy-types-canopyenabledfailedexception.html">canopy types canopyenabledfailedexception</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy\canopy-types-canopyequalityfailedexception.html">canopy types canopyequalityfailedexception</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy\canopy-types-canopyexception.html">canopy types canopyexception</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy\canopy-types-canopymorethanoneelementfoundexception.html">canopy types canopymorethanoneelementfoundexception</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy\canopy-types-canopynobrowserexception.html">canopy types canopynobrowserexception</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy\canopy-types-canopynotcontainsfailedexception.html">canopy types canopynotcontainsfailedexception</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy\canopy-types-canopynotdisplayedfailedexception.html">canopy types canopynotdisplayedfailedexception</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy\canopy-types-canopynotequalsfailedexception.html">canopy types canopynotequalsfailedexception</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy\canopy-types-canopynotstringorelementexception.html">canopy types canopynotstringorelementexception</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy\canopy-types-canopyonexception.html">canopy types canopyonexception</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy\canopy-types-canopyoptionnotfoundexception.html">canopy types canopyoptionnotfoundexception</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy\canopy-types-canopyreadexception.html">canopy types canopyreadexception</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy\canopy-types-canopyreadonlyexception.html">canopy types canopyreadonlyexception</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy\canopy-types-canopyselectionfailedexeception.html">canopy types canopyselectionfailedexeception</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy\canopy-types-canopyskiptestexception.html">canopy types canopyskiptestexception</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy\canopy-types-canopyuncheckfailedexception.html">canopy types canopyuncheckfailedexception</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy\canopy-types-canopyvalueinlistexception.html">canopy types canopyvalueinlistexception</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy\canopy-types-canopyvaluenotinlistexception.html">canopy types canopyvaluenotinlistexception</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy\canopy-types-canopywaitforexception.html">canopy types canopywaitforexception</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy\canopy-types-direction.html">canopy types direction</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy\canopy-types-ireporter.html">canopy types ireporter</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy\canopy-types-result.html">canopy types result</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy\canopy-types-suite.html">canopy types suite</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy\canopy-types-test.html">canopy types test</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy\canopy-wait.html">canopy wait</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy\global-screensizes.html">global screensizes</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy\global-useragents.html">global useragents</a></li></ul></li><li class="dropdown-submenu"><a id="navbarDropdown-canopy.integration" href="#" role="button" data-toggle="dropdown" aria-haspopup  class="dropdown-item dropdown-toggle">canopy.integration</a><ul aria-labelledby="dropdownMenu2" class="dropdown-menu border-0 shadow"><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy.integration\canopy-csharp-integration.html">canopy csharp integration</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy.integration\canopy-csharp-loadtest-job.html">canopy csharp loadtest job</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy.integration\canopy-csharp-loadtest-runner.html">canopy csharp loadtest runner</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy.integration\canopy-csharp-loadtest-task.html">canopy csharp loadtest task</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy.integration\canopy-integration-loadtest.html">canopy integration loadtest</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy.integration\canopy-integration-loadtest-job.html">canopy integration loadtest job</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy.integration\canopy-integration-loadtest-task.html">canopy integration loadtest task</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy.integration\canopy.integration.html">canopy.integration</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy.integration\global-jsonvalidator.html">global jsonvalidator</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy.integration\jsonvalidator-difference.html">jsonvalidator difference</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy.integration\jsonvalidator-meta.html">jsonvalidator meta</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Api_Reference\canopy.integration\jsonvalidator-type.html">jsonvalidator type</a></li></ul></li></ul></li><li class="nav-item dropdown"><a id="navbarDropdown-Docs" href="#" data-toggle="dropdown" aria-haspopup  class="nav-link dropdown-toggle">Docs</a><ul aria-labelledby="dropdownMenu1" class="dropdown-menu border-0 shadow"><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Docs\actions.html">actions</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Docs\assertions.html">assertions</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Docs\configuration.html">configuration</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Docs\reporting.html">reporting</a></li><li class="nav-item"><a class="dropdown-item" href="https://lefthandedgoat.github.io/canopy/\Docs\testing.html">testing</a></li></ul></li></ul><ul class="navbar-nav"><button id="theme-toggle" class=""></button><li class="nav-item"><a class="nav-link" aria-label="canopy Repository on Github" href="https://github.com/lefthandedgoat/canopy"><i class="fab fa-github fa-lg fa-fw text-light"></i></a></li></ul></div></nav><div class="wrapper d-flex flex-column justify-content-between min-vh-100"><main class="container main mb-4"><div><h1><a name="Assertions" class="anchor" href="#Assertions">Assertions</a></h1>
  3<h2><a name="equals" class="anchor" href="#equals">== (equals)</a></h2>
  4<p>Assert that the element on the left is equal to the value on the right.</p>
  5<table class="pre"><tr><td class="lines"><pre class="fssnip"><span class="l">1: </span>
  6</pre></td>
  7<td class="snippet"><pre class="fssnip highlighted"><code lang="fsharp"><span class="s">&quot;#firstName&quot;</span> <span class="o">==</span> <span class="s">&quot;Alex&quot;</span>
  8</code></pre></td>
  9</tr>
 10</table>
 11<h2><a name="does-not-equal" class="anchor" href="#does-not-equal">!= (does not equal)</a></h2>
 12<p>Assert that the element on the left is not equal to the value on the right.</p>
 13<table class="pre"><tr><td class="lines"><pre class="fssnip"><span class="l">1: </span>
 14</pre></td>
 15<td class="snippet"><pre class="fssnip highlighted"><code lang="fsharp"><span class="s">&quot;#firstName&quot;</span> <span class="o">!=</span> <span class="s">&quot;Tom&quot;</span>
 16</code></pre></td>
 17</tr>
 18</table>
 19<h2><a name="aliased-as-is" class="anchor" href="#aliased-as-is">=== (aliased as is)</a></h2>
 20<p>Assert that the value on the left is equal to the value on right.
 21* Note: does not use retry-ability.  Equivalent to Assert.Equals.</p>
 22<table class="pre"><tr><td class="lines"><pre class="fssnip"><span class="l">1: </span>
 23</pre></td>
 24<td class="snippet"><pre class="fssnip highlighted"><code lang="fsharp"><span class="s">&quot;Not a selector&quot;</span> <span class="o">===</span> <span class="s">&quot;Not a selector&quot;</span>
 25</code></pre></td>
 26</tr>
 27</table>
 28<h2><a name="one-of-many-equals" class="anchor" href="#one-of-many-equals">*= (one of many equals)</a></h2>
 29<p>Assert that at least one element in a list equals a value.</p>
 30<table class="pre"><tr><td class="lines"><pre class="fssnip"><span class="l">1: </span>
 31</pre></td>
 32<td class="snippet"><pre class="fssnip highlighted"><code lang="fsharp"><span class="s">&quot;.todoItem&quot;</span> <span class="o">*=</span> <span class="s">&quot;Buy milk&quot;</span>
 33</code></pre></td>
 34</tr>
 35</table>
 36<h2><a name="none-equals" class="anchor" href="#none-equals">*!= (none equals)</a></h2>
 37<p>Assert that none of the items in a list equals a value.</p>
 38<table class="pre"><tr><td class="lines"><pre class="fssnip"><span class="l">1: </span>
 39</pre></td>
 40<td class="snippet"><pre class="fssnip highlighted"><code lang="fsharp"><span class="s">&quot;.todoItem&quot;</span> <span class="o">*!=</span> <span class="s">&quot;Sell everything&quot;</span>
 41</code></pre></td>
 42</tr>
 43</table>
 44<h2><a name="contains" class="anchor" href="#contains">contains</a></h2>
 45<p>Assert that one string contains another.</p>
 46<table class="pre"><tr><td class="lines"><pre class="fssnip"><span class="l">1: </span>
 47</pre></td>
 48<td class="snippet"><pre class="fssnip highlighted"><code lang="fsharp"><span onmouseout="hideTip(event, '5', 6)" onmouseover="showTip(event, '5', 6)" class="fn">contains</span> <span class="s">&quot;Log&quot;</span> <span class="pn">(</span><span onmouseout="hideTip(event, '6', 7)" onmouseover="showTip(event, '6', 7)" class="fn">read</span> <span class="s">&quot;#logout&quot;</span><span class="pn">)</span>
 49</code></pre></td>
 50</tr>
 51</table>
 52<h2><a name="containsInsensitive" class="anchor" href="#containsInsensitive">containsInsensitive</a></h2>
 53<p>Assert that one string contains (case insensitive) another.</p>
 54<table class="pre"><tr><td class="lines"><pre class="fssnip"><span class="l">1: </span>
 55</pre></td>
 56<td class="snippet"><pre class="fssnip highlighted"><code lang="fsharp"><span onmouseout="hideTip(event, '7', 8)" onmouseover="showTip(event, '7', 8)" class="fn">containsInsensitive</span> <span class="s">&quot;Log&quot;</span> <span class="pn">(</span><span onmouseout="hideTip(event, '6', 9)" onmouseover="showTip(event, '6', 9)" class="fn">read</span> <span class="s">&quot;#logout&quot;</span><span class="pn">)</span>
 57</code></pre></td>
 58</tr>
 59</table>
 60<h2><a name="notContains" class="anchor" href="#notContains">notContains</a></h2>
 61<p>Assert that one string does not contains another.</p>
 62<table class="pre"><tr><td class="lines"><pre class="fssnip"><span class="l">1: </span>
 63</pre></td>
 64<td class="snippet"><pre class="fssnip highlighted"><code lang="fsharp"><span onmouseout="hideTip(event, '8', 10)" onmouseover="showTip(event, '8', 10)" class="fn">notContains</span> <span class="s">&quot;Hello Bob!&quot;</span> <span class="pn">(</span><span onmouseout="hideTip(event, '6', 11)" onmouseover="showTip(event, '6', 11)" class="fn">read</span> <span class="s">&quot;#name&quot;</span><span class="pn">)</span>
 65</code></pre></td>
 66</tr>
 67</table>
 68<h2><a name="count" class="anchor" href="#count">count</a></h2>
 69<p>Assert there are <code>X</code> items of given css selector.</p>
 70<table class="pre"><tr><td class="lines"><pre class="fssnip"><span class="l">1: </span>
 71</pre></td>
 72<td class="snippet"><pre class="fssnip highlighted"><code lang="fsharp"><span onmouseout="hideTip(event, '9', 12)" onmouseover="showTip(event, '9', 12)" class="fn">count</span> <span class="s">&quot;.todoItem&quot;</span> <span class="n">5</span>
 73</code></pre></td>
 74</tr>
 75</table>
 76<h2><a name="regex-match" class="anchor" href="#regex-match">=~ (regex match)</a></h2>
 77<p>Assert that an element <code>regex</code> matches a value.</p>
 78<table class="pre"><tr><td class="lines"><pre class="fssnip"><span class="l">1: </span>
 79<span class="l">2: </span>
 80<span class="l">3: </span>
 81<span class="l">4: </span>
 82</pre></td>
 83<td class="snippet"><pre class="fssnip highlighted"><code lang="fsharp"><span class="s">&quot;#lastName&quot;</span> <span class="o">&lt;&lt;</span> <span class="s">&quot;Gray&quot;</span>
 84<span class="s">&quot;#lastName&quot;</span> <span class="o">=~</span> <span class="s">&quot;Gr[ae]y&quot;</span>
 85<span class="s">&quot;#lastName&quot;</span> <span class="o">&lt;&lt;</span> <span class="s">&quot;Grey&quot;</span>
 86<span class="s">&quot;#lastName&quot;</span> <span class="o">=~</span> <span class="s">&quot;Gr[ae]y&quot;</span>
 87</code></pre></td>
 88</tr>
 89</table>
 90<h2><a name="regex-match-1" class="anchor" href="#regex-match-1">!=~ (regex match)</a></h2>
 91<p>Assert that an element does not <code>regex</code> match a value.</p>
 92<table class="pre"><tr><td class="lines"><pre class="fssnip"><span class="l">1: </span>
 93<span class="l">2: </span>
 94<span class="l">3: </span>
 95<span class="l">4: </span>
 96</pre></td>
 97<td class="snippet"><pre class="fssnip highlighted"><code lang="fsharp"><span class="s">&quot;#lastName&quot;</span> <span class="o">&lt;&lt;</span> <span class="s">&quot;Gr0y&quot;</span>
 98<span class="s">&quot;#lastName&quot;</span> <span class="o">!=~</span> <span class="s">&quot;Gr[ae]y&quot;</span>
 99<span class="s">&quot;#lastName&quot;</span> <span class="o">&lt;&lt;</span> <span class="s">&quot;Gr1y&quot;</span>
100<span class="s">&quot;#lastName&quot;</span> <span class="o">!=~</span> <span class="s">&quot;Gr[ae]y&quot;</span>
101</code></pre></td>
102</tr>
103</table>
104<h2><a name="one-of-many-regex-match" class="anchor" href="#one-of-many-regex-match">*~ (one of many regex match)</a></h2>
105<p>Assert that one of many element <code>regex</code> matches a value.</p>
106<table class="pre"><tr><td class="lines"><pre class="fssnip"><span class="l">1: </span>
107</pre></td>
108<td class="snippet"><pre class="fssnip highlighted"><code lang="fsharp"><span class="s">&quot;#colors li&quot;</span> <span class="o">*~</span> <span class="s">&quot;gr[ea]y&quot;</span>
109</code></pre></td>
110</tr>
111</table>
112<h2><a name="on" class="anchor" href="#on">on</a></h2>
113<p>Assert that the browser is currently on a url. Falls back to using <code>String.Contains</code> after page timeout.</p>
114<table class="pre"><tr><td class="lines"><pre class="fssnip"><span class="l">1: </span>
115<span class="l">2: </span>
116</pre></td>
117<td class="snippet"><pre class="fssnip highlighted"><code lang="fsharp"><span onmouseout="hideTip(event, '10', 13)" onmouseover="showTip(event, '10', 13)" class="fn">url</span> <span class="s">&quot;https://duckduckgo.com/?q=canopy+f%23&quot;</span>
118<span onmouseout="hideTip(event, '11', 14)" onmouseover="showTip(event, '11', 14)" class="fn">on</span> <span class="s">&quot;https://duckduckgo.com/?q&quot;</span>
119</code></pre></td>
120</tr>
121</table>
122<h2><a name="onn" class="anchor" href="#onn">onn</a></h2>
123<p>Same as <code>on</code> but does not fall back to using <code>String.Contains</code>.</p>
124<table class="pre"><tr><td class="lines"><pre class="fssnip"><span class="l">1: </span>
125<span class="l">2: </span>
126</pre></td>
127<td class="snippet"><pre class="fssnip highlighted"><code lang="fsharp"><span onmouseout="hideTip(event, '10', 15)" onmouseover="showTip(event, '10', 15)" class="fn">url</span> <span class="s">&quot;https://duckduckgo.com/about&quot;</span>
128<span onmouseout="hideTip(event, '12', 16)" onmouseover="showTip(event, '12', 16)" class="fn">onn</span> <span class="s">&quot;https://duckduckgo.com/about&quot;</span>
129</code></pre></td>
130</tr>
131</table>
132<h2><a name="selected" class="anchor" href="#selected">selected</a></h2>
133<p>Assert that a radio or checkbox is selected.</p>
134<table class="pre"><tr><td class="lines"><pre class="fssnip"><span class="l">1: </span>
135</pre></td>
136<td class="snippet"><pre class="fssnip highlighted"><code lang="fsharp"><span onmouseout="hideTip(event, '13', 17)" onmouseover="showTip(event, '13', 17)" class="fn">selected</span> <span class="s">&quot;#yes&quot;</span>
137</code></pre></td>
138</tr>
139</table>
140<h2><a name="deselected" class="anchor" href="#deselected">deselected</a></h2>
141<p>Assert that a radio or checkbox is not selected.</p>
142<table class="pre"><tr><td class="lines"><pre class="fssnip"><span class="l">1: </span>
143</pre></td>
144<td class="snippet"><pre class="fssnip highlighted"><code lang="fsharp"><span onmouseout="hideTip(event, '14', 18)" onmouseover="showTip(event, '14', 18)" class="fn">deselected</span> <span class="s">&quot;#yes&quot;</span>
145</code></pre></td>
146</tr>
147</table>
148<h2><a name="displayed" class="anchor" href="#displayed">displayed</a></h2>
149<p>Assert that an element is displayed on the screen. (Note:  Will not walk up the dom.  If a parent container is hidden this may give the wrong results, try adding :visible to selector)</p>
150<table class="pre"><tr><td class="lines"><pre class="fssnip"><span class="l">1: </span>
151</pre></td>
152<td class="snippet"><pre class="fssnip highlighted"><code lang="fsharp"><span onmouseout="hideTip(event, '15', 19)" onmouseover="showTip(event, '15', 19)" class="fn">displayed</span> <span class="s">&quot;#modal&quot;</span>
153</code></pre></td>
154</tr>
155</table>
156<h2><a name="notDisplayed" class="anchor" href="#notDisplayed">notDisplayed</a></h2>
157<p>Assert that an element is not displayed on the screen. (Note:  Will not walk up the dom.  If a parent container is hidden this may give the wrong results, try adding :visible to selector)</p>
158<table class="pre"><tr><td class="lines"><pre class="fssnip"><span class="l">1: </span>
159</pre></td>
160<td class="snippet"><pre class="fssnip highlighted"><code lang="fsharp"><span onmouseout="hideTip(event, '16', 20)" onmouseover="showTip(event, '16', 20)" class="fn">notDisplayed</span> <span class="s">&quot;#modal&quot;</span>
161</code></pre></td>
162</tr>
163</table>
164<h2><a name="enabled" class="anchor" href="#enabled">enabled</a></h2>
165<p>Assert that an element is enabled.</p>
166<table class="pre"><tr><td class="lines"><pre class="fssnip"><span class="l">1: </span>
167</pre></td>
168<td class="snippet"><pre class="fssnip highlighted"><code lang="fsharp"><span onmouseout="hideTip(event, '17', 21)" onmouseover="showTip(event, '17', 21)" class="fn">enabled</span> <span class="s">&quot;#button&quot;</span>
169</code></pre></td>
170</tr>
171</table>
172<h2><a name="disabled" class="anchor" href="#disabled">disabled</a></h2>
173<p>Assert that an element is not enabled.</p>
174<table class="pre"><tr><td class="lines"><pre class="fssnip"><span class="l">1: </span>
175</pre></td>
176<td class="snippet"><pre class="fssnip highlighted"><code lang="fsharp"><span onmouseout="hideTip(event, '18', 22)" onmouseover="showTip(event, '18', 22)" class="fn">disabled</span> <span class="s">&quot;#button&quot;</span>
177</code></pre></td>
178</tr>
179</table>
180<h2><a name="fadedIn" class="anchor" href="#fadedIn">fadedIn</a></h2>
181<p>Returns true/false if element has finished fading in and is shown.</p>
182<table class="pre"><tr><td class="lines"><pre class="fssnip"><span class="l">1: </span>
183<span class="l">2: </span>
184</pre></td>
185<td class="snippet"><pre class="fssnip highlighted"><code lang="fsharp"><span class="k">let</span> <span onmouseout="hideTip(event, '19', 23)" onmouseover="showTip(event, '19', 23)" class="id">isShown</span> <span class="o">=</span> <span class="pn">(</span><span onmouseout="hideTip(event, '20', 24)" onmouseover="showTip(event, '20', 24)" class="fn">fadedIn</span> <span class="s">&quot;#message&quot;</span><span class="pn">)</span><span class="pn">(</span><span class="pn">)</span>
186<span onmouseout="hideTip(event, '21', 25)" onmouseover="showTip(event, '21', 25)" class="fn">waitFor</span> <span class="o">&lt;|</span> <span onmouseout="hideTip(event, '20', 26)" onmouseover="showTip(event, '20', 26)" class="fn">fadedIn</span> <span class="s">&quot;#message&quot;</span>
187</code></pre></td>
188</tr>
189</table>
190<div class="tip" id="1">namespace canopy</div>
191<div class="tip" id="2">module classic<br /><br />from canopy</div>
192<div class="tip" id="3">namespace canopy.runner</div>
193<div class="tip" id="4">namespace System</div>
194<div class="tip" id="5">val contains : value1:string -&gt; value2:string -&gt; unit</div>
195<div class="tip" id="6">val read : item:&#39;a -&gt; string</div>
196<div class="tip" id="7">val containsInsensitive : value1:string -&gt; value2:string -&gt; unit</div>
197<div class="tip" id="8">val notContains : value1:string -&gt; value2:string -&gt; unit</div>
198<div class="tip" id="9">val count : cssSelector:string -&gt; count&#39;:int -&gt; unit</div>
199<div class="tip" id="10">val url : u:string -&gt; unit</div>
200<div class="tip" id="11">val on : u:string -&gt; unit</div>
201<div class="tip" id="12">val onn : u:string -&gt; unit</div>
202<div class="tip" id="13">val selected : item:&#39;a -&gt; unit</div>
203<div class="tip" id="14">val deselected : item:&#39;a -&gt; unit</div>
204<div class="tip" id="15">val displayed : item:&#39;a -&gt; unit</div>
205<div class="tip" id="16">val notDisplayed : item:&#39;a -&gt; unit</div>
206<div class="tip" id="17">val enabled : item:&#39;a -&gt; unit</div>
207<div class="tip" id="18">val disabled : item:&#39;a -&gt; unit</div>
208<div class="tip" id="19">val isShown : bool</div>
209<div class="tip" id="20">val fadedIn : cssSelector:string -&gt; (&#39;a -&gt; bool)</div>
210<div class="tip" id="21">val waitFor : ((unit -&gt; bool) -&gt; unit)</div>
211</div></main><footer class="footer font-small m-0 py-4 bg-dark"><div class="container"><div class="row"><div class="col-12 col-md-4 mb-4 mb-md-0"><div class="text-light"><h2 class="h5">Project Resources</h2><ul class="list-group list-group-flush"><li class="list-group-item bg-dark ml-0 pl-0"><a href="https://github.com/lefthandedgoat/canopy/blob/master/README.md" class="text-white"><i class="fas fa-book-reader fa-fw mr-2"></i>README</a></li><li class="list-group-item bg-dark ml-0 pl-0"><a href="https://github.com/lefthandedgoat/canopy/blob/master/CHANGELOG.md" class="text-white"><i class="fas fa-sticky-note fa-fw mr-2"></i>Release Notes / Changelog</a></li><li class="list-group-item bg-dark ml-0 pl-0"><a href="https://github.com/lefthandedgoat/canopy/blob/master/LICENSE.md" class="text-white"><i class="fas fa-id-card fa-fw mr-2"></i>License</a></li></ul></div></div><div class="col-12 col-md-4 mb-4 mb-md-0"><div class="text-light"><h2 class="h5">Other Links</h2><ul class="list-group list-group-flush"><li class="list-group-item bg-dark ml-0 pl-0"><a href="https://docs.microsoft.com/en-us/dotnet/fsharp/" class="text-white"><i class="fab fa-microsoft fa-fw mr-2"></i>F# Documentation</a></li><li class="list-group-item bg-dark ml-0 pl-0"><a href="https://fsharp.org/guides/slack/" class="text-white"><i class="fab fa-slack fa-fw mr-2"></i>F# Slack</a></li><li class="list-group-item bg-dark ml-0 pl-0"><a href="http://foundation.fsharp.org/" class="text-white"><img class="fsharp-footer-logo mr-2" src="https://fsharp.org/img/logo/fsharp.svg" alt="FSharp Logo" />F# Software Foundation</a></li></ul></div></div><div class="col-12 col-md-4 mb-4 mb-md-0"><div class="text-light"><h2 class="h5">Metadata</h2><ul class="list-group list-group-flush"><li class="list-group-item bg-dark ml-0 pl-0">Generated for version <a class="text-white" href="https://github.com/lefthandedgoat/canopy/releases/tag/2.1.5">2.1.5</a> on 2020/03/07</li><li class="list-group-item bg-dark ml-0 pl-0">Found an issue? <a class="text-white" href="https://github.com/lefthandedgoat/canopy/edit/master/docsSrc/Docs/assertions.fsx">Edit this page.</a></li></ul></div></div></div><div class="row"><div class="col text-center"><small class="text-light"><i class="fas fa-copyright mr-1"></i>2020 canopy, All rights reserved</small></div></div></div></footer></div><script src="https://lefthandedgoat.github.io/canopy/content/themes.js?version=637191850341272396"></script><script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script><script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script><script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script><script src="https://lefthandedgoat.github.io/canopy/content/tips.js?version=637191850341272396"></script><script src="https://lefthandedgoat.github.io/canopy/content/submenu.js?version=637191850341272396"></script><script src="https://lefthandedgoat.github.io/canopy/content/cleanups.js?version=637191850341272396"></script></body></html>