Skip to content

Commit e40f8e6

Browse files
committed
Rephrase/reformat a few sentences (#1981)
[deploy site] 77ae509
1 parent f445384 commit e40f8e6

File tree

26 files changed

+82
-82
lines changed

26 files changed

+82
-82
lines changed

documentation/_print/index.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,8 @@
178178
performing their operations in entirely different ways
179179
but which frequently look the same while doing so.
180180
Even though the text is rendered in the same fonts,
181-
the images are displayed in the same place
182-
, and the links take you to the same destination.
181+
the images are displayed in the same place,
182+
and the links take you to the same destination.
183183
What is happening underneath is as different as night and day.
184184
Selenium “abstracts” these differences,
185185
hiding their details and intricacies from the person writing the code.
@@ -213,8 +213,8 @@
213213
and build a strong community
214214
so that the project can continue to keep up with emerging technologies
215215
and remain a dominant platform for functional test automation.</p></div><div class=td-content style=page-break-before:always><h1 id=pg-03fac682a3f8ce461fb3631d7a8c09cf>2 - WebDriver</h1><div class=lead>WebDriver drives a browser natively; learn more about it.</div><p>WebDriver drives a browser natively, as a user would, either locally
216-
or on a remote machine using the Selenium server,
217-
marks a leap forward in terms of browser automation.</p><p>Selenium WebDriver refers to both the language bindings
216+
or on a remote machine using the Selenium server.
217+
It marks a leap forward in terms of browser automation.</p><p>Selenium WebDriver refers to both the language bindings
218218
and the implementations of the individual browser controlling code.
219219
This is commonly referred to as just <em>WebDriver</em>.</p><p>Selenium WebDriver is a <a href=https://www.w3.org/TR/webdriver1/>W3C Recommendation</a></p><ul><li><p>WebDriver is designed as a simple
220220
and more concise programming interface.</p></li><li><p>WebDriver is a compact object-oriented API.</p></li><li><p>It drives the browser effectively.</p></li></ul></div><div class=td-content style=page-break-before:always><h1 id=pg-83a05f84a53d59f39c7a07b577b25ad1>2.1 - Getting started</h1><div class=lead>If you are new to Selenium, we have a few resources that can help you get up to speed right away.</div><p>Selenium supports automation of all the major browsers in the market
@@ -8685,15 +8685,15 @@
86858685
</span></span><span style=display:flex><span>Thread safety error; this instance of WebDriver was constructed
86868686
</span></span><span style=display:flex><span>on thread main (id 1)and is being accessed by thread Thread-1 (id 24)
86878687
</span></span><span style=display:flex><span>This is not permitted and *will* cause undefined behaviour
8688-
</span></span></code></pre></div><p>As seen in the example:</p><ul><li><code>protectedDriver</code> Will be created in Main thread</li><li>We use Java <code>Runnable</code> to spin up a new process and a new <code>Thread</code> to run the process</li><li>Both <code>Thread</code> will clash because the Main Thread does not have <code>protectedDriver</code> in it&rsquo;s memory.</li><li><code>ThreadGuard.protect</code> will throw an exception.</li></ul><h4 id=note>Note:</h4><p>This does not replace the need for using <code>ThreadLocal</code> to manage drivers when running parallel.</p></div><div class=td-content style=page-break-before:always><h1 id=pg-f6283427de39b51ad43d27f5c63829dd>2.10 - Troubleshooting Assistance</h1><div class=lead>How to get manage WebDriver problems.</div><p>It is not always obvious the root cause of errors in Selenium.</p><ol><li><p>The most common Selenium-related error is a result of poor synchronization.
8688+
</span></span></code></pre></div><p>As seen in the example:</p><ul><li><code>protectedDriver</code> Will be created in Main thread</li><li>We use Java <code>Runnable</code> to spin up a new process and a new <code>Thread</code> to run the process</li><li>Both <code>Thread</code> will clash because the Main Thread does not have <code>protectedDriver</code> in it&rsquo;s memory.</li><li><code>ThreadGuard.protect</code> will throw an exception.</li></ul><h4 id=note>Note:</h4><p>This does not replace the need for using <code>ThreadLocal</code> to manage drivers when running parallel.</p></div><div class=td-content style=page-break-before:always><h1 id=pg-f6283427de39b51ad43d27f5c63829dd>2.10 - Troubleshooting Assistance</h1><div class=lead>How to solve WebDriver problems.</div><p>It is not always obvious the root cause of errors in Selenium.</p><ol><li><p>The most common Selenium-related error is a result of poor synchronization.
86898689
Read about <a href=https://www.selenium.dev/documentation/webdriver/waits/>Waiting Strategies</a>. If you aren&rsquo;t sure if it
86908690
is a synchronization strategy you can try <em>temporarily</em> hard coding a large sleep
86918691
where you see the issue, and you&rsquo;ll know if adding an explicit wait can help.</p></li><li><p>Note that many errors that get reported to the project are actually caused by
86928692
issues in the underlying drivers that Selenium sends the commands to. You can rule
86938693
out a driver problem by executing the command in multiple <a href=https://www.selenium.dev/documentation/webdriver/browsers/>browsers</a>.</p></li><li><p>If you have questions about how to do things, check out the <a href=/support/>Support options</a>
86948694
for ways get assistance.</p></li><li><p>If you think you&rsquo;ve found a problem with Selenium code, go ahead and file a
86958695
<a href="https://github.com/SeleniumHQ/selenium/issues/new?assignees=&labels=I-defect%2Cneeds-triaging&template=bug-report.yml&title=%5B%F0%9F%90%9B+Bug%5D%3A+">Bug Report</a>
8696-
on GitHub.</p></li></ol></div><div class=td-content style=page-break-before:always><h1 id=pg-9106a7ac709cadefdb6e4b92e9e3ceaf>2.10.1 - Understanding Common Errors</h1><div class=lead>How to get deal with various problems in your Selenium code.</div><h2 id=invalidselectorexception>InvalidSelectorException</h2><p>CSS and XPath Selectors are sometimes difficult to get correct.</p><h3 id=likely-cause>Likely Cause</h3><p>The CSS or XPath selector you are trying to use has invalid characters or an invalid query.</p><h3 id=possible-solutions>Possible Solutions</h3><p>Run your selector through a validator service:</p><ul><li><a href=http://csslint.net/>CSS Validator</a></li><li><a href=http://www.freeformatter.com/xpath-tester.html>xPath Validator</a></li></ul><p>Or use a browser extension to get a known good value:</p><ul><li><a href=https://selectorshub.com/selectorshub/>SelectorsHub</a></li></ul><h2 id=nosuchelementexception>NoSuchElementException</h2><p>The element can not be found at the exact moment you attempted to locate it.</p><h3 id=likely-cause-1>Likely Cause</h3><ul><li>You are looking for the element in the wrong place (perhaps a previous action was unsuccessful).</li><li>You are looking for the element at the wrong time (the element has not shown up in the DOM, yet)</li><li>The locator has changed since you wrote the code</li></ul><h3 id=possible-solutions-1>Possible Solutions</h3><ul><li>Make sure you are on the page you expect to be on, and that previous actions in your code completed correctly</li><li>Make sure you are using a proper <a href=https://www.selenium.dev/documentation/webdriver/waits/>Waiting Strategy</a></li><li>Update the locator with the browser&rsquo;s devtools console or use a browser extension like:<ul><li><a href=https://selectorshub.com/selectorshub/>SelectorsHub</a></li></ul></li></ul><h2 id=staleelementreferenceexception>StaleElementReferenceException</h2><p>An element goes stale when it was previously located, but can not be currently accessed.
8696+
on GitHub.</p></li></ol></div><div class=td-content style=page-break-before:always><h1 id=pg-9106a7ac709cadefdb6e4b92e9e3ceaf>2.10.1 - Understanding Common Errors</h1><div class=lead>How to solve various problems in your Selenium code.</div><h2 id=invalidselectorexception>InvalidSelectorException</h2><p>CSS and XPath Selectors are sometimes difficult to get correct.</p><h3 id=likely-cause>Likely Cause</h3><p>The CSS or XPath selector you are trying to use has invalid characters or an invalid query.</p><h3 id=possible-solutions>Possible Solutions</h3><p>Run your selector through a validator service:</p><ul><li><a href=http://csslint.net/>CSS Validator</a></li><li><a href=http://www.freeformatter.com/xpath-tester.html>xPath Validator</a></li></ul><p>Or use a browser extension to get a known good value:</p><ul><li><a href=https://selectorshub.com/selectorshub/>SelectorsHub</a></li></ul><h2 id=nosuchelementexception>NoSuchElementException</h2><p>The element can not be found at the exact moment you attempted to locate it.</p><h3 id=likely-cause-1>Likely Cause</h3><ul><li>You are looking for the element in the wrong place (perhaps a previous action was unsuccessful).</li><li>You are looking for the element at the wrong time (the element has not shown up in the DOM, yet)</li><li>The locator has changed since you wrote the code</li></ul><h3 id=possible-solutions-1>Possible Solutions</h3><ul><li>Make sure you are on the page you expect to be on, and that previous actions in your code completed correctly</li><li>Make sure you are using a proper <a href=https://www.selenium.dev/documentation/webdriver/waits/>Waiting Strategy</a></li><li>Update the locator with the browser&rsquo;s devtools console or use a browser extension like:<ul><li><a href=https://selectorshub.com/selectorshub/>SelectorsHub</a></li></ul></li></ul><h2 id=staleelementreferenceexception>StaleElementReferenceException</h2><p>An element goes stale when it was previously located, but can not be currently accessed.
86978697
Elements do not get relocated automatically; the driver creates a reference ID for the element and
86988698
has a particular place it expects to find it in the DOM. If it can not find the element
86998699
in the current DOM, any action using that element will result in this exception.</p><h3 id=likely-cause-2>Likely Cause</h3><p>This can happen when:</p><ul><li>You have refreshed the page, or the DOM of the page has dynamically changed.</li><li>You have navigated to a different page.</li><li>You have switched to another window or into or out of a frame or iframe.</li></ul><h3 id=possible-solutions-2>Possible Solutions</h3><p><strong>The DOM has changed</strong></p><p>When the page is refreshed or items on the page have moved around, there is still

documentation/overview/_print/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@
8484
performing their operations in entirely different ways
8585
but which frequently look the same while doing so.
8686
Even though the text is rendered in the same fonts,
87-
the images are displayed in the same place
88-
, and the links take you to the same destination.
87+
the images are displayed in the same place,
88+
and the links take you to the same destination.
8989
What is happening underneath is as different as night and day.
9090
Selenium “abstracts” these differences,
9191
hiding their details and intricacies from the person writing the code.

0 commit comments

Comments
 (0)