Skip to content

Commit 16d15b4

Browse files
committed
added assertion code for using selenium (#1758)[deploy site]
added assertion code 564c2ec
1 parent 0a06f32 commit 16d15b4

File tree

34 files changed

+378
-298
lines changed

34 files changed

+378
-298
lines changed

documentation/_print/index.html

Lines changed: 27 additions & 22 deletions
Large diffs are not rendered by default.

documentation/about/_print/index.html

Lines changed: 21 additions & 21 deletions
Large diffs are not rendered by default.

documentation/about/copyright/index.html

Lines changed: 21 additions & 21 deletions
Large diffs are not rendered by default.

documentation/webdriver/_print/index.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,12 @@
247247
JavaScript</button></li><li class=nav-item><button class=nav-link id=tabs-04-05-tab data-bs-toggle=tab data-bs-target=#tabs-04-05 role=tab data-td-tp-persist=kotlin aria-controls=tabs-04-05 aria-selected=false>
248248
Kotlin</button></li></ul><div class=tab-content id=tabs-4-content><div class="tab-body tab-pane fade show active" id=tabs-04-00 role=tabpanel aria-labelled-by=tabs-04-00-tab tabindex=4><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-java data-lang=java><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>String</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>title</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#ce5c00;font-weight:700>=</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>driver</span><span style=color:#000;font-weight:700>.</span><span style=color:#c4a000>getTitle</span><span style=color:#000;font-weight:700>();</span><span style=color:#f8f8f8;text-decoration:underline>
249249
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>assertEquals</span><span style=color:#000;font-weight:700>(</span><span style=color:#4e9a06>&#34;Web form&#34;</span><span style=color:#000;font-weight:700>,</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>title</span><span style=color:#000;font-weight:700>);</span></span></span></code></pre></div><div class="text-end pb-2"><a href=https://github.com/SeleniumHQ/seleniumhq.github.io/blob/trunk/examples/java/src/test/java/dev/selenium/getting_started/UsingSeleniumTest.java#L30-L31 target=_blank><i class="fas fa-external-link-alt pl-2"></i>
250-
<strong>View full example on GitHub</strong></a></div></div><div class="tab-body tab-pane fade" id=tabs-04-01 role=tabpanel aria-labelled-by=tabs-04-01-tab tabindex=4><p><a href=/documentation/about/contributing/#creating-examples><span class=selenium-badge-code data-bs-toggle=tooltip data-bs-placement=right title="This code example is missing. Examples are added to the examples directory; click for details in the contribution guide">Add Example</span></a></p></div><div class="tab-body tab-pane fade" id=tabs-04-02 role=tabpanel aria-labelled-by=tabs-04-02-tab tabindex=4><p><a href=/documentation/about/contributing/#creating-examples><span class=selenium-badge-code data-bs-toggle=tooltip data-bs-placement=right title="This code example is missing. Examples are added to the examples directory; click for details in the contribution guide">Add Example</span></a></p></div><div class="tab-body tab-pane fade" id=tabs-04-03 role=tabpanel aria-labelled-by=tabs-04-03-tab tabindex=4><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-rb data-lang=rb><span style=display:flex><span> <span style=color:#000>expect</span><span style=color:#000;font-weight:700>(</span><span style=color:#000>value</span><span style=color:#000;font-weight:700>)</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>to</span> <span style=color:#000>eq</span><span style=color:#000;font-weight:700>(</span><span style=color:#4e9a06>&#39;Received!&#39;</span><span style=color:#000;font-weight:700>)</span></span></span></code></pre></div><div class="text-end pb-2"><a href=https://github.com/SeleniumHQ/seleniumhq.github.io/blob/trunk/examples/ruby/spec/getting_started/using_selenium_spec.rb#L27 target=_blank><i class="fas fa-external-link-alt pl-2"></i>
250+
<strong>View full example on GitHub</strong></a></div></div><div class="tab-body tab-pane fade" id=tabs-04-01 role=tabpanel aria-labelled-by=tabs-04-01-tab tabindex=4><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-py data-lang=py><span style=display:flex><span> <span style=color:#000>title</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>driver</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>title</span>
251+
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>assert</span> <span style=color:#000>title</span> <span style=color:#ce5c00;font-weight:700>==</span> <span style=color:#4e9a06>&#34;Web form&#34;</span></span></span></code></pre></div><div class="text-end pb-2"><a href=https://github.com/SeleniumHQ/seleniumhq.github.io/blob/trunk/examples/python/tests/getting_started/using_selenium_tests.py#L10-L11 target=_blank><i class="fas fa-external-link-alt pl-2"></i>
252+
<strong>View full example on GitHub</strong></a></div></div><div class="tab-body tab-pane fade" id=tabs-04-02 role=tabpanel aria-labelled-by=tabs-04-02-tab tabindex=4><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-cs data-lang=cs><span style=display:flex><span> <span style=color:#204a87;font-weight:700>var</span> <span style=color:#000>title</span> <span style=color:#000;font-weight:700>=</span> <span style=color:#000>driver</span><span style=color:#000;font-weight:700>.</span><span style=color:#000>Title</span><span style=color:#000;font-weight:700>;</span>
253+
</span></span><span style=display:flex><span> <span style=color:#000>Assert</span><span style=color:#000;font-weight:700>.</span><span style=color:#000>AreEqual</span><span style=color:#000;font-weight:700>(</span><span style=color:#4e9a06>&#34;Web form&#34;</span><span style=color:#000;font-weight:700>,</span> <span style=color:#000>title</span><span style=color:#000;font-weight:700>);</span></span></span></code></pre></div><div class="text-end pb-2"><a href=https://github.com/SeleniumHQ/seleniumhq.github.io/blob/trunk/examples/dotnet/SeleniumDocs/GettingStarted/UsingSeleniumTest.cs#L19-L20 target=_blank><i class="fas fa-external-link-alt pl-2"></i>
254+
<strong>View full example on GitHub</strong></a></div></div><div class="tab-body tab-pane fade" id=tabs-04-03 role=tabpanel aria-labelled-by=tabs-04-03-tab tabindex=4><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-rb data-lang=rb><span style=display:flex><span> <span style=color:#000>title</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>@driver</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>title</span>
255+
</span></span><span style=display:flex><span> <span style=color:#000>expect</span><span style=color:#000;font-weight:700>(</span><span style=color:#000>title</span><span style=color:#000;font-weight:700>)</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>to</span> <span style=color:#000>eq</span><span style=color:#000;font-weight:700>(</span><span style=color:#4e9a06>&#39;Web form&#39;</span><span style=color:#000;font-weight:700>)</span></span></span></code></pre></div><div class="text-end pb-2"><a href=https://github.com/SeleniumHQ/seleniumhq.github.io/blob/trunk/examples/ruby/spec/getting_started/using_selenium_spec.rb#L14-L15 target=_blank><i class="fas fa-external-link-alt pl-2"></i>
251256
<strong>View full example on GitHub</strong></a></div></div><div class="tab-body tab-pane fade" id=tabs-04-04 role=tabpanel aria-labelled-by=tabs-04-04-tab tabindex=4><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-js data-lang=js><span style=display:flex><span> <span style=color:#204a87;font-weight:700>let</span> <span style=color:#000>title</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#204a87;font-weight:700>await</span> <span style=color:#000>driver</span><span style=color:#000;font-weight:700>.</span><span style=color:#000>getTitle</span><span style=color:#000;font-weight:700>();</span>
252257
</span></span><span style=display:flex><span> <span style=color:#000>assert</span><span style=color:#000;font-weight:700>.</span><span style=color:#000>equal</span><span style=color:#000;font-weight:700>(</span><span style=color:#4e9a06>&#34;Web form&#34;</span><span style=color:#000;font-weight:700>,</span> <span style=color:#000>title</span><span style=color:#000;font-weight:700>);</span></span></span></code></pre></div><div class="text-end pb-2"><a href=https://github.com/SeleniumHQ/seleniumhq.github.io/blob/trunk/examples/javascript/test/getting_started/runningTests.spec.js#L14-L15 target=_blank><i class="fas fa-external-link-alt pl-2"></i>
253258
<strong>View full example on GitHub</strong></a></div></div><div class="tab-body tab-pane fade" id=tabs-04-05 role=tabpanel aria-labelled-by=tabs-04-05-tab tabindex=4><p><a href=/documentation/about/contributing/#creating-examples><span class=selenium-badge-code data-bs-toggle=tooltip data-bs-placement=right title="This code example is missing. Examples are added to the examples directory; click for details in the contribution guide">Add Example</span></a></p></div></div><h3 id=setting-up-and-tearing-down>Setting Up and Tearing Down</h3><ul class="nav nav-tabs" id=tabs-5 role=tablist><li class=nav-item><button class="nav-link active" id=tabs-05-00-tab data-bs-toggle=tab data-bs-target=#tabs-05-00 role=tab data-td-tp-persist=java aria-controls=tabs-05-00 aria-selected=true>

documentation/webdriver/getting_started/_print/index.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,12 @@
242242
JavaScript</button></li><li class=nav-item><button class=nav-link id=tabs-04-05-tab data-bs-toggle=tab data-bs-target=#tabs-04-05 role=tab data-td-tp-persist=kotlin aria-controls=tabs-04-05 aria-selected=false>
243243
Kotlin</button></li></ul><div class=tab-content id=tabs-4-content><div class="tab-body tab-pane fade show active" id=tabs-04-00 role=tabpanel aria-labelled-by=tabs-04-00-tab tabindex=4><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-java data-lang=java><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>String</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>title</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#ce5c00;font-weight:700>=</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>driver</span><span style=color:#000;font-weight:700>.</span><span style=color:#c4a000>getTitle</span><span style=color:#000;font-weight:700>();</span><span style=color:#f8f8f8;text-decoration:underline>
244244
</span></span></span><span style=display:flex><span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>assertEquals</span><span style=color:#000;font-weight:700>(</span><span style=color:#4e9a06>&#34;Web form&#34;</span><span style=color:#000;font-weight:700>,</span><span style=color:#f8f8f8;text-decoration:underline> </span><span style=color:#000>title</span><span style=color:#000;font-weight:700>);</span></span></span></code></pre></div><div class="text-end pb-2"><a href=https://github.com/SeleniumHQ/seleniumhq.github.io/blob/trunk/examples/java/src/test/java/dev/selenium/getting_started/UsingSeleniumTest.java#L30-L31 target=_blank><i class="fas fa-external-link-alt pl-2"></i>
245-
<strong>View full example on GitHub</strong></a></div></div><div class="tab-body tab-pane fade" id=tabs-04-01 role=tabpanel aria-labelled-by=tabs-04-01-tab tabindex=4><p><a href=/documentation/about/contributing/#creating-examples><span class=selenium-badge-code data-bs-toggle=tooltip data-bs-placement=right title="This code example is missing. Examples are added to the examples directory; click for details in the contribution guide">Add Example</span></a></p></div><div class="tab-body tab-pane fade" id=tabs-04-02 role=tabpanel aria-labelled-by=tabs-04-02-tab tabindex=4><p><a href=/documentation/about/contributing/#creating-examples><span class=selenium-badge-code data-bs-toggle=tooltip data-bs-placement=right title="This code example is missing. Examples are added to the examples directory; click for details in the contribution guide">Add Example</span></a></p></div><div class="tab-body tab-pane fade" id=tabs-04-03 role=tabpanel aria-labelled-by=tabs-04-03-tab tabindex=4><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-rb data-lang=rb><span style=display:flex><span> <span style=color:#000>expect</span><span style=color:#000;font-weight:700>(</span><span style=color:#000>value</span><span style=color:#000;font-weight:700>)</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>to</span> <span style=color:#000>eq</span><span style=color:#000;font-weight:700>(</span><span style=color:#4e9a06>&#39;Received!&#39;</span><span style=color:#000;font-weight:700>)</span></span></span></code></pre></div><div class="text-end pb-2"><a href=https://github.com/SeleniumHQ/seleniumhq.github.io/blob/trunk/examples/ruby/spec/getting_started/using_selenium_spec.rb#L27 target=_blank><i class="fas fa-external-link-alt pl-2"></i>
245+
<strong>View full example on GitHub</strong></a></div></div><div class="tab-body tab-pane fade" id=tabs-04-01 role=tabpanel aria-labelled-by=tabs-04-01-tab tabindex=4><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-py data-lang=py><span style=display:flex><span> <span style=color:#000>title</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>driver</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>title</span>
246+
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>assert</span> <span style=color:#000>title</span> <span style=color:#ce5c00;font-weight:700>==</span> <span style=color:#4e9a06>&#34;Web form&#34;</span></span></span></code></pre></div><div class="text-end pb-2"><a href=https://github.com/SeleniumHQ/seleniumhq.github.io/blob/trunk/examples/python/tests/getting_started/using_selenium_tests.py#L10-L11 target=_blank><i class="fas fa-external-link-alt pl-2"></i>
247+
<strong>View full example on GitHub</strong></a></div></div><div class="tab-body tab-pane fade" id=tabs-04-02 role=tabpanel aria-labelled-by=tabs-04-02-tab tabindex=4><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-cs data-lang=cs><span style=display:flex><span> <span style=color:#204a87;font-weight:700>var</span> <span style=color:#000>title</span> <span style=color:#000;font-weight:700>=</span> <span style=color:#000>driver</span><span style=color:#000;font-weight:700>.</span><span style=color:#000>Title</span><span style=color:#000;font-weight:700>;</span>
248+
</span></span><span style=display:flex><span> <span style=color:#000>Assert</span><span style=color:#000;font-weight:700>.</span><span style=color:#000>AreEqual</span><span style=color:#000;font-weight:700>(</span><span style=color:#4e9a06>&#34;Web form&#34;</span><span style=color:#000;font-weight:700>,</span> <span style=color:#000>title</span><span style=color:#000;font-weight:700>);</span></span></span></code></pre></div><div class="text-end pb-2"><a href=https://github.com/SeleniumHQ/seleniumhq.github.io/blob/trunk/examples/dotnet/SeleniumDocs/GettingStarted/UsingSeleniumTest.cs#L19-L20 target=_blank><i class="fas fa-external-link-alt pl-2"></i>
249+
<strong>View full example on GitHub</strong></a></div></div><div class="tab-body tab-pane fade" id=tabs-04-03 role=tabpanel aria-labelled-by=tabs-04-03-tab tabindex=4><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-rb data-lang=rb><span style=display:flex><span> <span style=color:#000>title</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>@driver</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>title</span>
250+
</span></span><span style=display:flex><span> <span style=color:#000>expect</span><span style=color:#000;font-weight:700>(</span><span style=color:#000>title</span><span style=color:#000;font-weight:700>)</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>to</span> <span style=color:#000>eq</span><span style=color:#000;font-weight:700>(</span><span style=color:#4e9a06>&#39;Web form&#39;</span><span style=color:#000;font-weight:700>)</span></span></span></code></pre></div><div class="text-end pb-2"><a href=https://github.com/SeleniumHQ/seleniumhq.github.io/blob/trunk/examples/ruby/spec/getting_started/using_selenium_spec.rb#L14-L15 target=_blank><i class="fas fa-external-link-alt pl-2"></i>
246251
<strong>View full example on GitHub</strong></a></div></div><div class="tab-body tab-pane fade" id=tabs-04-04 role=tabpanel aria-labelled-by=tabs-04-04-tab tabindex=4><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-js data-lang=js><span style=display:flex><span> <span style=color:#204a87;font-weight:700>let</span> <span style=color:#000>title</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#204a87;font-weight:700>await</span> <span style=color:#000>driver</span><span style=color:#000;font-weight:700>.</span><span style=color:#000>getTitle</span><span style=color:#000;font-weight:700>();</span>
247252
</span></span><span style=display:flex><span> <span style=color:#000>assert</span><span style=color:#000;font-weight:700>.</span><span style=color:#000>equal</span><span style=color:#000;font-weight:700>(</span><span style=color:#4e9a06>&#34;Web form&#34;</span><span style=color:#000;font-weight:700>,</span> <span style=color:#000>title</span><span style=color:#000;font-weight:700>);</span></span></span></code></pre></div><div class="text-end pb-2"><a href=https://github.com/SeleniumHQ/seleniumhq.github.io/blob/trunk/examples/javascript/test/getting_started/runningTests.spec.js#L14-L15 target=_blank><i class="fas fa-external-link-alt pl-2"></i>
248253
<strong>View full example on GitHub</strong></a></div></div><div class="tab-body tab-pane fade" id=tabs-04-05 role=tabpanel aria-labelled-by=tabs-04-05-tab tabindex=4><p><a href=/documentation/about/contributing/#creating-examples><span class=selenium-badge-code data-bs-toggle=tooltip data-bs-placement=right title="This code example is missing. Examples are added to the examples directory; click for details in the contribution guide">Add Example</span></a></p></div></div><h3 id=setting-up-and-tearing-down>Setting Up and Tearing Down</h3><ul class="nav nav-tabs" id=tabs-5 role=tablist><li class=nav-item><button class="nav-link active" id=tabs-05-00-tab data-bs-toggle=tab data-bs-target=#tabs-05-00 role=tab data-td-tp-persist=java aria-controls=tabs-05-00 aria-selected=true>

0 commit comments

Comments
 (0)