|
704 | 704 | CSharp</button></li><li class=nav-item><button class=nav-link id=tabs-06-03-tab data-bs-toggle=tab data-bs-target=#tabs-06-03 role=tab data-td-tp-persist=ruby aria-controls=tabs-06-03 aria-selected=false>
|
705 | 705 | Ruby</button></li><li class=nav-item><button class=nav-link id=tabs-06-04-tab data-bs-toggle=tab data-bs-target=#tabs-06-04 role=tab data-td-tp-persist=javascript aria-controls=tabs-06-04 aria-selected=false>
|
706 | 706 | JavaScript</button></li><li class=nav-item><button class=nav-link id=tabs-06-05-tab data-bs-toggle=tab data-bs-target=#tabs-06-05 role=tab data-td-tp-persist=kotlin aria-controls=tabs-06-05 aria-selected=false>
|
707 |
| -Kotlin</button></li></ul><div class=tab-content id=tabs-6-content><div class="tab-body tab-pane fade show active" id=tabs-06-00 role=tabpanel aria-labelled-by=tabs-06-00-tab tabindex=6><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-06-01 role=tabpanel aria-labelled-by=tabs-06-01-tab tabindex=6><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>driver</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>quit</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/python/tests/drivers/test_options.py#L13 target=_blank><i class="fas fa-external-link-alt pl-2"></i> |
708 |
| -<strong>View full example on GitHub</strong></a></div></div><div class="tab-body tab-pane fade" id=tabs-06-02 role=tabpanel aria-labelled-by=tabs-06-02-tab tabindex=6><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-06-03 role=tabpanel aria-labelled-by=tabs-06-03-tab tabindex=6><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>driver</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>quit</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/drivers/options_spec.rb#L16 target=_blank><i class="fas fa-external-link-alt pl-2"></i> |
709 |
| -<strong>View full example on GitHub</strong></a></div></div><div class="tab-body tab-pane fade" id=tabs-06-04 role=tabpanel aria-labelled-by=tabs-06-04-tab tabindex=6><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-06-05 role=tabpanel aria-labelled-by=tabs-06-05-tab tabindex=6><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></div><div class=td-content style=page-break-before:always><h1 id=pg-839805e2dec21aeac2a04c521100ccd7>2.2.1 - Browser Options</h1><div class=lead>These capabilities are shared by all browsers.</div><p>In Selenium 3, capabilities were defined in a session by using Desired Capabilities classes. |
| 707 | +Kotlin</button></li></ul><div class=tab-content id=tabs-6-content><div class="tab-body tab-pane fade show active" id=tabs-06-00 role=tabpanel aria-labelled-by=tabs-06-00-tab tabindex=6>{< gh-codeblock path="examples/java/src/test/java/dev/selenium/getting_started/FirstScript.java#L29" >}<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-06-01 role=tabpanel aria-labelled-by=tabs-06-01-tab tabindex=6><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>driver</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>quit</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/python/tests/drivers/test_options.py#L13 target=_blank><i class="fas fa-external-link-alt pl-2"></i> |
| 708 | +<strong>View full example on GitHub</strong></a></div></div><div class="tab-body tab-pane fade" id=tabs-06-02 role=tabpanel aria-labelled-by=tabs-06-02-tab tabindex=6>{< gh-codeblock path="examples/dotnet/HelloSelenium.cs#L13" >}<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-06-03 role=tabpanel aria-labelled-by=tabs-06-03-tab tabindex=6><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>driver</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>quit</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/drivers/options_spec.rb#L16 target=_blank><i class="fas fa-external-link-alt pl-2"></i> |
| 709 | +<strong>View full example on GitHub</strong></a></div></div><div class="tab-body tab-pane fade" id=tabs-06-04 role=tabpanel aria-labelled-by=tabs-06-04-tab tabindex=6>{< gh-codeblock path="examples/javascript/test/getting_started/firstScript.spec.js#L28" >}<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-06-05 role=tabpanel aria-labelled-by=tabs-06-05-tab tabindex=6>{< gh-codeblock path="examples/kotlin/src/test/kotlin/dev/selenium/getting_started/FirstScriptTest.kt#L35" >}<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></div><div class=td-content style=page-break-before:always><h1 id=pg-839805e2dec21aeac2a04c521100ccd7>2.2.1 - Browser Options</h1><div class=lead>These capabilities are shared by all browsers.</div><p>In Selenium 3, capabilities were defined in a session by using Desired Capabilities classes. |
710 | 710 | As of Selenium 4, you must use the browser options classes.
|
711 | 711 | For remote driver sessions, a browser options instance is required as it determines which browser will be used.</p><p>These options are described in the w3c specification for <a href=https://w3c.github.io/webdriver/#capabilities>Capabilities</a>.</p><p>Each browser has <a href=https://www.selenium.dev/documentation/webdriver/browsers/>custom options</a> that may be defined in addition to the ones defined in the specification.</p><h2 id=browsername>browserName</h2><p>Browser name is set by default when using an Options class instance.</p><ul class="nav nav-tabs" id=tabs-1 role=tablist><li class=nav-item><button class="nav-link active" id=tabs-01-00-tab data-bs-toggle=tab data-bs-target=#tabs-01-00 role=tab data-td-tp-persist=java aria-controls=tabs-01-00 aria-selected=true>
|
712 | 712 | Java</button></li><li class=nav-item><button class=nav-link id=tabs-01-01-tab data-bs-toggle=tab data-bs-target=#tabs-01-01 role=tab data-td-tp-persist=python aria-controls=tabs-01-01 aria-selected=false>
|
|
3003 | 3003 | </span></span><span style=display:flex><span><span style=color:#000>element</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>find_element</span><span style=color:#000;font-weight:700>(</span><span style=color:#000>By</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>TAG_NAME</span><span style=color:#000;font-weight:700>,</span> <span style=color:#4e9a06>'div'</span><span style=color:#000;font-weight:700>)</span>
|
3004 | 3004 | </span></span><span style=display:flex><span>
|
3005 | 3005 | </span></span><span style=display:flex><span> <span style=color:#8f5902;font-style:italic># Get all the elements available with tag name 'p'</span>
|
3006 |
| -</span></span><span style=display:flex><span> <span style=color:#8f5902;font-style:italic># NOTE: in order to utilize XPATH from current element, you must add "." to beginning of path</span> |
3007 | 3006 | </span></span><span style=display:flex><span><span style=color:#000>elements</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>element</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>find_elements</span><span style=color:#000;font-weight:700>(</span><span style=color:#000>By</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>TAG_NAME</span><span style=color:#000;font-weight:700>,</span> <span style=color:#4e9a06>'p'</span><span style=color:#000;font-weight:700>)</span>
|
3008 | 3007 | </span></span><span style=display:flex><span><span style=color:#204a87;font-weight:700>for</span> <span style=color:#000>e</span> <span style=color:#204a87;font-weight:700>in</span> <span style=color:#000>elements</span><span style=color:#000;font-weight:700>:</span>
|
3009 | 3008 | </span></span><span style=display:flex><span> <span style=color:#204a87>print</span><span style=color:#000;font-weight:700>(</span><span style=color:#000>e</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>text</span><span style=color:#000;font-weight:700>)</span>
|
3010 | 3009 | </span></span><span style=display:flex><span>
|
3011 | 3010 | </span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic>##get elements from parent element using XPATH</span>
|
| 3011 | +</span></span><span style=display:flex><span><span style=color:#8f5902;font-style:italic>##NOTE: in order to utilize XPATH from current element, you must add "." to beginning of path</span> |
3012 | 3012 | </span></span><span style=display:flex><span>
|
3013 | 3013 | </span></span><span style=display:flex><span> <span style=color:#8f5902;font-style:italic># Get first element of tag 'ul'</span>
|
3014 | 3014 | </span></span><span style=display:flex><span><span style=color:#000>element</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>find_element</span><span style=color:#000;font-weight:700>(</span><span style=color:#000>By</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>XPATH</span><span style=color:#000;font-weight:700>,</span> <span style=color:#4e9a06>'//ul'</span><span style=color:#000;font-weight:700>)</span>
|
@@ -14481,14 +14481,14 @@
|
14481 | 14481 | <label><a href=https://github.com/hiroksarker>@hiroksarker</a></label>
|
14482 | 14482 | <span class=contributions>10 commits</span></div><div style=padding:10px><img src="https://avatars.githubusercontent.com/u/50069278?v=4" class=inline width=100 height=100 style=height:100px;height:100px;margin-bottom:.25em;vertical-align:middle>
|
14483 | 14483 | <label><a href=https://github.com/nwintop>@nwintop</a></label>
|
| 14484 | +<span class=contributions>8 commits</span></div><div style=padding:10px><img src="https://avatars.githubusercontent.com/u/69980130?v=4" class=inline width=100 height=100 style=height:100px;height:100px;margin-bottom:.25em;vertical-align:middle> |
| 14485 | +<label><a href=https://github.com/shbenzer>@shbenzer</a></label> |
14484 | 14486 | <span class=contributions>8 commits</span></div><div style=padding:10px><img src="https://avatars.githubusercontent.com/u/25596787?v=4" class=inline width=100 height=100 style=height:100px;height:100px;margin-bottom:.25em;vertical-align:middle>
|
14485 | 14487 | <label><a href=https://github.com/testbot206>@testbot206</a></label>
|
14486 | 14488 | <span class=contributions>7 commits</span></div><div style=padding:10px><img src="https://avatars.githubusercontent.com/u/909773?v=4" class=inline width=100 height=100 style=height:100px;height:100px;margin-bottom:.25em;vertical-align:middle>
|
14487 | 14489 | <label><a href=https://github.com/krmahadevan>@krmahadevan</a></label>
|
14488 | 14490 | <span class=contributions>7 commits</span></div><div style=padding:10px><img src="https://avatars.githubusercontent.com/u/2152854?v=4" class=inline width=100 height=100 style=height:100px;height:100px;margin-bottom:.25em;vertical-align:middle>
|
14489 | 14491 | <label><a href=https://github.com/tetration>@tetration</a></label>
|
14490 |
| -<span class=contributions>7 commits</span></div><div style=padding:10px><img src="https://avatars.githubusercontent.com/u/69980130?v=4" class=inline width=100 height=100 style=height:100px;height:100px;margin-bottom:.25em;vertical-align:middle> |
14491 |
| -<label><a href=https://github.com/shbenzer>@shbenzer</a></label> |
14492 | 14492 | <span class=contributions>7 commits</span></div><div style=padding:10px><img src="https://avatars.githubusercontent.com/u/117716?v=4" class=inline width=100 height=100 style=height:100px;height:100px;margin-bottom:.25em;vertical-align:middle>
|
14493 | 14493 | <label><a href=https://github.com/connerT>@connerT</a></label>
|
14494 | 14494 | <span class=contributions>6 commits</span></div><div style=padding:10px><img src="https://avatars.githubusercontent.com/u/35181101?v=4" class=inline width=100 height=100 style=height:100px;height:100px;margin-bottom:.25em;vertical-align:middle>
|
|
0 commit comments