|
247 | 247 | 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>
|
248 | 248 | 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>
|
249 | 249 | </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>"Web form"</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>'Received!'</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>"Web form"</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>"Web form"</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>'Web form'</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> |
251 | 256 | <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>
|
252 | 257 | </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>"Web form"</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>
|
253 | 258 | <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