Skip to content

Commit 3b26cdd

Browse files
committed
Edit code reference (L18->L19) to align Python example with other languages (programming languages and spoken languages) (#1982) [deploy site]
Edit code reference (L18->L19) to align Python example with others On page https://www.selenium.dev/documentation/webdriver/getting_started/first_script/ in section "7. Request element information" Python example shows getting message element ```python3 message = driver.find_element(by=By.ID, value="message") ``` instead of getting message element information ```python3 text = message.text ``` The examples for other programming languages show getting the `text` attribute of the `message` element. And the examples for Python in other spoken languages show getting the `text` attribute of the `message` element. This commit changes the code reference to the Python file from L18 to L19 in the English markdown file. This makes the Python example show getting the `text` attribute from the `message` element. After this change: - the Python example is like the examples for other programming languages - the Python example on first_script.en.md is like the Python example for these: first_script.{zh-cn,pt-br,ja}.md a039da8
1 parent 0f2863c commit 3b26cdd

File tree

32 files changed

+328
-328
lines changed

32 files changed

+328
-328
lines changed

documentation/_print/index.html

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

documentation/about/_print/index.html

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

documentation/about/copyright/index.html

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

documentation/webdriver/_print/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&lt;version&gt;</span>${selenium.version}<span style=color:#204a87;font-weight:700>&lt;/version&gt;</span>
5151
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&lt;/dependency&gt;</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/pom.xml#L30-L34 target=_blank><i class="fas fa-external-link-alt pl-2"></i>
5252
<strong>View full example on GitHub</strong></a></div><h3 id=gradle>Gradle</h3><p>Specify the dependency in the project <code>build.gradle</code> file as <code>testImplementation</code>:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-gradle data-lang=gradle><span style=display:flex><span> <span style=color:#000>testImplementation</span> <span style=color:#4e9a06>&#39;org.seleniumhq.selenium:selenium-java:4.25.0&#39;</span>
53-
</span></span><span style=display:flex><span> <span style=color:#000>testImplementation</span> <span style=color:#4e9a06>&#39;org.junit.jupiter:junit-jupiter-engine:5.11.0&#39;</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/build.gradle#L13-L14 target=_blank><i class="fas fa-external-link-alt pl-2"></i>
53+
</span></span><span style=display:flex><span> <span style=color:#000>testImplementation</span> <span style=color:#4e9a06>&#39;org.junit.jupiter:junit-jupiter-engine:5.11.1&#39;</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/build.gradle#L13-L14 target=_blank><i class="fas fa-external-link-alt pl-2"></i>
5454
<strong>View full example on GitHub</strong></a></div></div><div class="tab-body tab-pane fade" id=tabs-00-01 role=tabpanel aria-labelled-by=tabs-00-01-tab tabindex=0><p>The minimum supported Python version for each Selenium version can be found
5555
in <code>Supported Python Versions</code> on <a href=https://pypi.org/project/selenium/>PyPi</a></p><p>There are a couple different ways to install Selenium.</p><h3 id=pip>Pip</h3><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-shell data-lang=shell><span style=display:flex><span>pip install selenium
5656
</span></span></code></pre></div><br><h3 id=download>Download</h3><p>Alternatively you can download the <a href=https://pypi.org/project/selenium/#files>PyPI source archive</a>
@@ -181,7 +181,7 @@
181181
Ruby</button></li><li class=nav-item><button class=nav-link id=tabs-14-04-tab data-bs-toggle=tab data-bs-target=#tabs-14-04 role=tab data-td-tp-persist=javascript aria-controls=tabs-14-04 aria-selected=false>
182182
JavaScript</button></li><li class=nav-item><button class=nav-link id=tabs-14-05-tab data-bs-toggle=tab data-bs-target=#tabs-14-05 role=tab data-td-tp-persist=kotlin aria-controls=tabs-14-05 aria-selected=false>
183183
Kotlin</button></li></ul><div class=tab-content id=tabs-14-content><div class="tab-body tab-pane fade show active" id=tabs-14-00 role=tabpanel aria-labelled-by=tabs-14-00-tab tabindex=14><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>message</span><span style=color:#000;font-weight:700>.</span><span style=color:#c4a000>getText</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/FirstScript.java#L27 target=_blank><i class="fas fa-external-link-alt pl-2"></i>
184-
<strong>View full example on GitHub</strong></a></div></div><div class="tab-body tab-pane fade" id=tabs-14-01 role=tabpanel aria-labelled-by=tabs-14-01-tab tabindex=14><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>message</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>By</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>ID</span><span style=color:#000;font-weight:700>,</span> <span style=color:#000>value</span><span style=color:#ce5c00;font-weight:700>=</span><span style=color:#4e9a06>&#34;message&#34;</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/getting_started/first_script.py#L18 target=_blank><i class="fas fa-external-link-alt pl-2"></i>
184+
<strong>View full example on GitHub</strong></a></div></div><div class="tab-body tab-pane fade" id=tabs-14-01 role=tabpanel aria-labelled-by=tabs-14-01-tab tabindex=14><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>text</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>message</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>text</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/first_script.py#L19 target=_blank><i class="fas fa-external-link-alt pl-2"></i>
185185
<strong>View full example on GitHub</strong></a></div></div><div class="tab-body tab-pane fade" id=tabs-14-02 role=tabpanel aria-labelled-by=tabs-14-02-tab tabindex=14><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:#204a87;font-weight:700>value</span> <span style=color:#000;font-weight:700>=</span> <span style=color:#000>message</span><span style=color:#000;font-weight:700>.</span><span style=color:#000>Text</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/FirstScript.cs#L26 target=_blank><i class="fas fa-external-link-alt pl-2"></i>
186186
<strong>View full example on GitHub</strong></a></div></div><div class="tab-body tab-pane fade" id=tabs-14-03 role=tabpanel aria-labelled-by=tabs-14-03-tab tabindex=14><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>message</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>text</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/first_script.rb#L18 target=_blank><i class="fas fa-external-link-alt pl-2"></i>
187187
<strong>View full example on GitHub</strong></a></div></div><div class="tab-body tab-pane fade" id=tabs-14-04 role=tabpanel aria-labelled-by=tabs-14-04-tab tabindex=14><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>value</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#204a87;font-weight:700>await</span> <span style=color:#000>message</span><span style=color:#000;font-weight:700>.</span><span style=color:#000>getText</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/firstScript.spec.js#L23 target=_blank><i class="fas fa-external-link-alt pl-2"></i>

documentation/webdriver/getting_started/_print/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&lt;version&gt;</span>${selenium.version}<span style=color:#204a87;font-weight:700>&lt;/version&gt;</span>
4646
</span></span><span style=display:flex><span> <span style=color:#204a87;font-weight:700>&lt;/dependency&gt;</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/pom.xml#L30-L34 target=_blank><i class="fas fa-external-link-alt pl-2"></i>
4747
<strong>View full example on GitHub</strong></a></div><h3 id=gradle>Gradle</h3><p>Specify the dependency in the project <code>build.gradle</code> file as <code>testImplementation</code>:</p><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-gradle data-lang=gradle><span style=display:flex><span> <span style=color:#000>testImplementation</span> <span style=color:#4e9a06>&#39;org.seleniumhq.selenium:selenium-java:4.25.0&#39;</span>
48-
</span></span><span style=display:flex><span> <span style=color:#000>testImplementation</span> <span style=color:#4e9a06>&#39;org.junit.jupiter:junit-jupiter-engine:5.11.0&#39;</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/build.gradle#L13-L14 target=_blank><i class="fas fa-external-link-alt pl-2"></i>
48+
</span></span><span style=display:flex><span> <span style=color:#000>testImplementation</span> <span style=color:#4e9a06>&#39;org.junit.jupiter:junit-jupiter-engine:5.11.1&#39;</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/build.gradle#L13-L14 target=_blank><i class="fas fa-external-link-alt pl-2"></i>
4949
<strong>View full example on GitHub</strong></a></div></div><div class="tab-body tab-pane fade" id=tabs-00-01 role=tabpanel aria-labelled-by=tabs-00-01-tab tabindex=0><p>The minimum supported Python version for each Selenium version can be found
5050
in <code>Supported Python Versions</code> on <a href=https://pypi.org/project/selenium/>PyPi</a></p><p>There are a couple different ways to install Selenium.</p><h3 id=pip>Pip</h3><div class=highlight><pre tabindex=0 style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-shell data-lang=shell><span style=display:flex><span>pip install selenium
5151
</span></span></code></pre></div><br><h3 id=download>Download</h3><p>Alternatively you can download the <a href=https://pypi.org/project/selenium/#files>PyPI source archive</a>
@@ -176,7 +176,7 @@
176176
Ruby</button></li><li class=nav-item><button class=nav-link id=tabs-14-04-tab data-bs-toggle=tab data-bs-target=#tabs-14-04 role=tab data-td-tp-persist=javascript aria-controls=tabs-14-04 aria-selected=false>
177177
JavaScript</button></li><li class=nav-item><button class=nav-link id=tabs-14-05-tab data-bs-toggle=tab data-bs-target=#tabs-14-05 role=tab data-td-tp-persist=kotlin aria-controls=tabs-14-05 aria-selected=false>
178178
Kotlin</button></li></ul><div class=tab-content id=tabs-14-content><div class="tab-body tab-pane fade show active" id=tabs-14-00 role=tabpanel aria-labelled-by=tabs-14-00-tab tabindex=14><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>message</span><span style=color:#000;font-weight:700>.</span><span style=color:#c4a000>getText</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/FirstScript.java#L27 target=_blank><i class="fas fa-external-link-alt pl-2"></i>
179-
<strong>View full example on GitHub</strong></a></div></div><div class="tab-body tab-pane fade" id=tabs-14-01 role=tabpanel aria-labelled-by=tabs-14-01-tab tabindex=14><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>message</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>By</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>ID</span><span style=color:#000;font-weight:700>,</span> <span style=color:#000>value</span><span style=color:#ce5c00;font-weight:700>=</span><span style=color:#4e9a06>&#34;message&#34;</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/getting_started/first_script.py#L18 target=_blank><i class="fas fa-external-link-alt pl-2"></i>
179+
<strong>View full example on GitHub</strong></a></div></div><div class="tab-body tab-pane fade" id=tabs-14-01 role=tabpanel aria-labelled-by=tabs-14-01-tab tabindex=14><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>text</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>message</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>text</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/first_script.py#L19 target=_blank><i class="fas fa-external-link-alt pl-2"></i>
180180
<strong>View full example on GitHub</strong></a></div></div><div class="tab-body tab-pane fade" id=tabs-14-02 role=tabpanel aria-labelled-by=tabs-14-02-tab tabindex=14><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:#204a87;font-weight:700>value</span> <span style=color:#000;font-weight:700>=</span> <span style=color:#000>message</span><span style=color:#000;font-weight:700>.</span><span style=color:#000>Text</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/FirstScript.cs#L26 target=_blank><i class="fas fa-external-link-alt pl-2"></i>
181181
<strong>View full example on GitHub</strong></a></div></div><div class="tab-body tab-pane fade" id=tabs-14-03 role=tabpanel aria-labelled-by=tabs-14-03-tab tabindex=14><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>message</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>text</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/first_script.rb#L18 target=_blank><i class="fas fa-external-link-alt pl-2"></i>
182182
<strong>View full example on GitHub</strong></a></div></div><div class="tab-body tab-pane fade" id=tabs-14-04 role=tabpanel aria-labelled-by=tabs-14-04-tab tabindex=14><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>value</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#204a87;font-weight:700>await</span> <span style=color:#000>message</span><span style=color:#000;font-weight:700>.</span><span style=color:#000>getText</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/firstScript.spec.js#L23 target=_blank><i class="fas fa-external-link-alt pl-2"></i>

0 commit comments

Comments
 (0)