Skip to content

Commit d617794

Browse files
authored
Update _index.ja.md
1 parent 615e688 commit d617794

File tree

1 file changed

+21
-7
lines changed
  • website_and_docs/content/documentation/webdriver/troubleshooting/errors

1 file changed

+21
-7
lines changed

website_and_docs/content/documentation/webdriver/troubleshooting/errors/_index.ja.md

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -94,36 +94,50 @@ for your error, you must both navigate back to the correct location and relocate
9494

9595
## ElementClickInterceptedException
9696

97-
This exception occurs when Selenium tries to click an element, but the click would instead be received by a different element. Before Selenium will click an element, it checks if the element is visible, unobscured by any other elements, and enabled - if the element is obscured, it will raise this exception.
97+
This exception occurs when Selenium tries to click an element, but the click would instead
98+
be received by a different element. Before Selenium will click an element, it checks if the
99+
element is visible, unobscured by any other elements, and enabled - if the element is obscured,
100+
it will raise this exception.
98101

99102
### Likely Cause
100103

101104
**UI Elements Overlapping**
102105

103-
Elements on the UI are typically placed next to each other, but occasionally elements may overlap. For example, a navbar always staying at the top of your window as you scroll a page. If that navbar happens to be covering an element we are trying to click, Selenium might believe it to be visible and enabled, but when you try to click it will throw this exception. Pop-ups and Modals are also common offenders here.
106+
Elements on the UI are typically placed next to each other, but occasionally elements may overlap.
107+
For example, a navbar always staying at the top of your window as you scroll a page. If that navbar
108+
happens to be covering an element we are trying to click, Selenium might believe it to be visible
109+
and enabled, but when you try to click it will throw this exception. Pop-ups and Modals are also
110+
common offenders here.
104111

105112
**Animations**
106113

107-
Elements with animations have the potential to cause this exception as well - it is recommended to wait for animations to cease before attempting to click an element.
114+
Elements with animations have the potential to cause this exception as well - it is recommended to
115+
wait for animations to cease before attempting to click an element.
108116

109117
### Possible Solutions
110118

111119
**Use Explicit Waits**
112120

113-
Explicit waits will likely be your best friend in these instances. A great way is to use `ExpectedCondition.ToBeClickable()` with `WebDriverWait` to wait until the right moment.
121+
[Explicit Waits]({{< ref "/documentation/webdriver/waits" >}}) will likely be your best friend in these instances.
122+
A great way is to use `ExpectedCondition.ToBeClickable()` with `WebDriverWait` to wait until the right moment.
114123

115124
**Scroll the Element into View**
116125

117-
In instances where the element is out of view, but Selenium still registers the element as visible (e.g. navbars overlapping a section at the top of your screen), you can use the `WebDriver.executeScript()` method to execute a javascript function to scroll (e.g. `WebDriver.executeScript('window.scrollBy(0,-250)')`) or you can utilize the Actions class with `Actions.moveToElement(element)`.
126+
In instances where the element is out of view, but Selenium still registers the element as visible
127+
(e.g. navbars overlapping a section at the top of your screen), you can use the `WebDriver.executeScript()`
128+
method to execute a javascript function to scroll (e.g. `WebDriver.executeScript('window.scrollBy(0,-250)')`)
129+
or you can utilize the Actions class with `Actions.moveToElement(element)`.
118130

119131
## Invalid SessionId Exception
120132

121133
Sometimes the session you're trying to access is different than what's currently available
122134

123135
### Likely Cause
124136

125-
This usually occurs when the session has been deleted (e.g. `driver.quit()`) or if the session has changed, like when the last tab/browser has closed (e.g. `driver.close()`)
137+
This usually occurs when the session has been deleted (e.g. `driver.quit()`) or if the session has changed,
138+
like when the last tab/browser has closed (e.g. `driver.close()`)
126139

127140
### Possible Solutions
128141

129-
Check your script for instances of `driver.close()` and `driver.quit()`, and any other possible causes of closed tabs/browsers. It could be that you are locating an element before you should/can.
142+
Check your script for instances of `driver.close()` and `driver.quit()`, and any other possible causes of closed
143+
tabs/browsers. It could be that you are locating an element before you should/can.

0 commit comments

Comments
 (0)