Skip to content

Commit d61d297

Browse files
committed
Added ElementClickInterceptedException to all languages (#1914)[deploy site]
* removed hanging badge code * added ElementClickInterceptedException to all languages * reduced line count, added reference * Update _index.ja.md * Update _index.pt-br.md * Update _index.zh-cn.md * Update _index.en.md --------- Co-authored-by: Sri Harsha <12621691+harsha509@users.noreply.github.com> 799d3c4
1 parent 05c6c37 commit d61d297

File tree

35 files changed

+348
-78
lines changed

35 files changed

+348
-78
lines changed

Diff for: documentation/_print/index.html

+16-4
Original file line numberDiff line numberDiff line change
@@ -8863,7 +8863,7 @@
88638863
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=invalid-selector-exception>Invalid Selector Exception</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=no-such-element-exception>No Such Element Exception</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=stale-element-reference-exception>Stale Element Reference Exception</h2><p>An element goes stale when it was previously located, but can not be currently accessed.
88648864
Elements do not get relocated automatically; the driver creates a reference ID for the element and
88658865
has a particular place it expects to find it in the DOM. If it can not find the element
8866-
in the current DOM, any action using that element will result in this exception.</p><h3 id=common-causes>Common Causes</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=common-solutions>Common 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
8866+
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
88678867
an element with the desired locator on the page, it is just no longer accessible
88688868
by the element object being used, and the element must be relocated before it can be used again.
88698869
This is often done in one of two ways:</p><ul><li><p>Always relocate the element every time you go to use it. The likelihood of
@@ -8882,7 +8882,19 @@
88828882
and have destroyed the context in which the element was located.
88838883
You can&rsquo;t just relocate it from the current context,
88848884
and you can&rsquo;t switch back to an active context where it is valid. If this is the reason
8885-
for your error, you must both navigate back to the correct location and relocate it.</p><h2 id=invalid-sessionid-exception>Invalid SessionId Exception</h2><p>Sometimes the session you&rsquo;re trying to access is different than what&rsquo;s currently available</p><h3 id=likely-cause-2>Likely Cause</h3><p>This usually occurs when the session has been deleted (e.g. <code>driver.quit()</code>) or if the session has changed, like when the last tab/browser has closed (e.g. <code>driver.close()</code>)</p><h3 id=possible-solutions-2>Possible Solutions</h3><p>Check your script for instances of <code>driver.close()</code> and <code>driver.quit()</code>, and any other possible causes of closed tabs/browsers. It could be that you are locating an element before you should/can.</p></div><div class=td-content style=page-break-before:always><h1 id=pg-5a7d28a8d143d2eaa2a6727d561e2164>2.10.1.1 - Unable to Locate Driver Error</h1><div class=lead>Troubleshooting missing path to driver executable.</div><p>Historically, this is the most common error beginning Selenium users get
8885+
for your error, you must both navigate back to the correct location and relocate it.</p><h2 id=elementclickinterceptedexception>ElementClickInterceptedException</h2><p>This exception occurs when Selenium tries to click an element, but the click would instead be received
8886+
by a different element. Before Selenium will click an element, it checks if the element is visible,
8887+
unobscured by any other elements, and enabled - if the element is obscured, it will raise this exception.</p><h3 id=likely-cause-3>Likely Cause</h3><p><strong>UI Elements Overlapping</strong></p><p>Elements on the UI are typically placed next to each other, but occasionally elements may overlap. For example,
8888+
a navbar always staying at the top of your window as you scroll a page. If that navbar happens to be covering
8889+
an element we are trying to click, Selenium might believe it to be visible and enabled, but when you try to click
8890+
it will throw this exception. Pop-ups and Modals are also common offenders here.</p><p><strong>Animations</strong></p><p>Elements with animations have the potential to cause this exception as well - it is recommended to wait for
8891+
animations to cease before attempting to click an element.</p><h3 id=possible-solutions-3>Possible Solutions</h3><p><strong>Use Explicit Waits</strong></p><p><a href=https://www.selenium.dev/documentation/webdriver/waits/>Explicit Waits</a> will likely be your best friend in these instances.
8892+
A great way is to use <code>ExpectedCondition.ToBeClickable()</code> with <code>WebDriverWait</code> to wait until the right moment.</p><p><strong>Scroll the Element into View</strong></p><p>In instances where the element is out of view, but Selenium still registers the element as visible
8893+
(e.g. navbars overlapping a section at the top of your screen), you can use the <code>WebDriver.executeScript()</code>
8894+
method to execute a javascript function to scroll (e.g. <code>WebDriver.executeScript('window.scrollBy(0,-250)')</code>)
8895+
or you can utilize the Actions class with <code>Actions.moveToElement(element)</code>.</p><h2 id=invalid-sessionid-exception>Invalid SessionId Exception</h2><p>Sometimes the session you&rsquo;re trying to access is different than what&rsquo;s currently available</p><h3 id=likely-cause-4>Likely Cause</h3><p>This usually occurs when the session has been deleted (e.g. <code>driver.quit()</code>) or if the session has changed,
8896+
like when the last tab/browser has closed (e.g. <code>driver.close()</code>)</p><h3 id=possible-solutions-4>Possible Solutions</h3><p>Check your script for instances of <code>driver.close()</code> and <code>driver.quit()</code>, and any other possible causes
8897+
of closed tabs/browsers. It could be that you are locating an element before you should/can.</p></div><div class=td-content style=page-break-before:always><h1 id=pg-5a7d28a8d143d2eaa2a6727d561e2164>2.10.1.1 - Unable to Locate Driver Error</h1><div class=lead>Troubleshooting missing path to driver executable.</div><p>Historically, this is the most common error beginning Selenium users get
88868898
when trying to run code for the first time:</p><ul class="nav nav-tabs" id=tabs-0 role=tablist><li class=nav-item><button class="nav-link active" id=tabs-00-00-tab data-bs-toggle=tab data-bs-target=#tabs-00-00 role=tab data-td-tp-persist=java aria-controls=tabs-00-00 aria-selected=true>
88878899
Java</button></li><li class=nav-item><button class=nav-link id=tabs-00-01-tab data-bs-toggle=tab data-bs-target=#tabs-00-01 role=tab data-td-tp-persist=python aria-controls=tabs-00-01 aria-selected=false>
88888900
Python</button></li><li class=nav-item><button class=nav-link id=tabs-00-02-tab data-bs-toggle=tab data-bs-target=#tabs-00-02 role=tab data-td-tp-persist=csharp aria-controls=tabs-00-02 aria-selected=false>
@@ -14324,7 +14336,7 @@
1432414336
<label><a href=https://github.com/diemol>@diemol</a></label>
1432514337
<span class=contributions>538 commits</span></div><div style=padding:10px><img src="https://avatars.githubusercontent.com/u/23253546?v=4" class=inline width=100 height=100 style=height:100px;height:100px;margin-bottom:.25em;vertical-align:middle>
1432614338
<label><a href=https://github.com/VietND96>@VietND96</a></label>
14327-
<span class=contributions>245 commits</span></div><div style=padding:10px><img src="https://avatars.githubusercontent.com/u/3331063?v=4" class=inline width=100 height=100 style=height:100px;height:100px;margin-bottom:.25em;vertical-align:middle>
14339+
<span class=contributions>246 commits</span></div><div style=padding:10px><img src="https://avatars.githubusercontent.com/u/3331063?v=4" class=inline width=100 height=100 style=height:100px;height:100px;margin-bottom:.25em;vertical-align:middle>
1432814340
<label><a href=https://github.com/selenium-ci>@selenium-ci</a></label>
1432914341
<span class=contributions>159 commits</span></div><div style=padding:10px><img src="https://avatars.githubusercontent.com/u/2972876?v=4" class=inline width=100 height=100 style=height:100px;height:100px;margin-bottom:.25em;vertical-align:middle>
1433014342
<label><a href=https://github.com/ddavison>@ddavison</a></label>
@@ -14530,7 +14542,7 @@
1453014542
<label><a href=https://github.com/titusfortner>@titusfortner</a></label>
1453114543
<span class=contributions>232 commits</span></div><div style=padding:10px><img src="https://avatars.githubusercontent.com/in/2740?v=4" class=inline width=100 height=100 style=height:100px;height:100px;margin-bottom:.25em;vertical-align:middle>
1453214544
<label><a href=https://github.com/apps/renovate>@renovate[bot]</a></label>
14533-
<span class=contributions>133 commits</span></div><div style=padding:10px><img src="https://avatars.githubusercontent.com/u/3264250?v=4" class=inline width=100 height=100 style=height:100px;height:100px;margin-bottom:.25em;vertical-align:middle>
14545+
<span class=contributions>135 commits</span></div><div style=padding:10px><img src="https://avatars.githubusercontent.com/u/3264250?v=4" class=inline width=100 height=100 style=height:100px;height:100px;margin-bottom:.25em;vertical-align:middle>
1453414546
<label><a href=https://github.com/alaahong>@alaahong</a></label>
1453514547
<span class=contributions>115 commits</span></div><div style=padding:10px><img src="https://avatars.githubusercontent.com/u/10705590?v=4" class=inline width=100 height=100 style=height:100px;height:100px;margin-bottom:.25em;vertical-align:middle>
1453614548
<label><a href=https://github.com/pujagani>@pujagani</a></label>

Diff for: documentation/about/_print/index.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@
332332
<label><a href=https://github.com/diemol>@diemol</a></label>
333333
<span class=contributions>538 commits</span></div><div style=padding:10px><img src="https://avatars.githubusercontent.com/u/23253546?v=4" class=inline width=100 height=100 style=height:100px;height:100px;margin-bottom:.25em;vertical-align:middle>
334334
<label><a href=https://github.com/VietND96>@VietND96</a></label>
335-
<span class=contributions>245 commits</span></div><div style=padding:10px><img src="https://avatars.githubusercontent.com/u/3331063?v=4" class=inline width=100 height=100 style=height:100px;height:100px;margin-bottom:.25em;vertical-align:middle>
335+
<span class=contributions>246 commits</span></div><div style=padding:10px><img src="https://avatars.githubusercontent.com/u/3331063?v=4" class=inline width=100 height=100 style=height:100px;height:100px;margin-bottom:.25em;vertical-align:middle>
336336
<label><a href=https://github.com/selenium-ci>@selenium-ci</a></label>
337337
<span class=contributions>159 commits</span></div><div style=padding:10px><img src="https://avatars.githubusercontent.com/u/2972876?v=4" class=inline width=100 height=100 style=height:100px;height:100px;margin-bottom:.25em;vertical-align:middle>
338338
<label><a href=https://github.com/ddavison>@ddavison</a></label>
@@ -538,7 +538,7 @@
538538
<label><a href=https://github.com/titusfortner>@titusfortner</a></label>
539539
<span class=contributions>232 commits</span></div><div style=padding:10px><img src="https://avatars.githubusercontent.com/in/2740?v=4" class=inline width=100 height=100 style=height:100px;height:100px;margin-bottom:.25em;vertical-align:middle>
540540
<label><a href=https://github.com/apps/renovate>@renovate[bot]</a></label>
541-
<span class=contributions>133 commits</span></div><div style=padding:10px><img src="https://avatars.githubusercontent.com/u/3264250?v=4" class=inline width=100 height=100 style=height:100px;height:100px;margin-bottom:.25em;vertical-align:middle>
541+
<span class=contributions>135 commits</span></div><div style=padding:10px><img src="https://avatars.githubusercontent.com/u/3264250?v=4" class=inline width=100 height=100 style=height:100px;height:100px;margin-bottom:.25em;vertical-align:middle>
542542
<label><a href=https://github.com/alaahong>@alaahong</a></label>
543543
<span class=contributions>115 commits</span></div><div style=padding:10px><img src="https://avatars.githubusercontent.com/u/10705590?v=4" class=inline width=100 height=100 style=height:100px;height:100px;margin-bottom:.25em;vertical-align:middle>
544544
<label><a href=https://github.com/pujagani>@pujagani</a></label>

Diff for: documentation/about/copyright/index.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@
318318
<label><a href=https://github.com/diemol>@diemol</a></label>
319319
<span class=contributions>538 commits</span></div><div style=padding:10px><img src="https://avatars.githubusercontent.com/u/23253546?v=4" class=inline width=100 height=100 style=height:100px;height:100px;margin-bottom:.25em;vertical-align:middle>
320320
<label><a href=https://github.com/VietND96>@VietND96</a></label>
321-
<span class=contributions>245 commits</span></div><div style=padding:10px><img src="https://avatars.githubusercontent.com/u/3331063?v=4" class=inline width=100 height=100 style=height:100px;height:100px;margin-bottom:.25em;vertical-align:middle>
321+
<span class=contributions>246 commits</span></div><div style=padding:10px><img src="https://avatars.githubusercontent.com/u/3331063?v=4" class=inline width=100 height=100 style=height:100px;height:100px;margin-bottom:.25em;vertical-align:middle>
322322
<label><a href=https://github.com/selenium-ci>@selenium-ci</a></label>
323323
<span class=contributions>159 commits</span></div><div style=padding:10px><img src="https://avatars.githubusercontent.com/u/2972876?v=4" class=inline width=100 height=100 style=height:100px;height:100px;margin-bottom:.25em;vertical-align:middle>
324324
<label><a href=https://github.com/ddavison>@ddavison</a></label>
@@ -524,7 +524,7 @@
524524
<label><a href=https://github.com/titusfortner>@titusfortner</a></label>
525525
<span class=contributions>232 commits</span></div><div style=padding:10px><img src="https://avatars.githubusercontent.com/in/2740?v=4" class=inline width=100 height=100 style=height:100px;height:100px;margin-bottom:.25em;vertical-align:middle>
526526
<label><a href=https://github.com/apps/renovate>@renovate[bot]</a></label>
527-
<span class=contributions>133 commits</span></div><div style=padding:10px><img src="https://avatars.githubusercontent.com/u/3264250?v=4" class=inline width=100 height=100 style=height:100px;height:100px;margin-bottom:.25em;vertical-align:middle>
527+
<span class=contributions>135 commits</span></div><div style=padding:10px><img src="https://avatars.githubusercontent.com/u/3264250?v=4" class=inline width=100 height=100 style=height:100px;height:100px;margin-bottom:.25em;vertical-align:middle>
528528
<label><a href=https://github.com/alaahong>@alaahong</a></label>
529529
<span class=contributions>115 commits</span></div><div style=padding:10px><img src="https://avatars.githubusercontent.com/u/10705590?v=4" class=inline width=100 height=100 style=height:100px;height:100px;margin-bottom:.25em;vertical-align:middle>
530530
<label><a href=https://github.com/pujagani>@pujagani</a></label>

0 commit comments

Comments
 (0)