Skip to content

Commit 3fb159d

Browse files
committed
errors: point NoSuchElementException to #nosuchelementexception
Switch support URL anchor from #no-such-element-exception → #nosuchelementexception to match Selenium docs. Scope: NoSuchElementException only.
1 parent d6b9bc4 commit 3fb159d

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

dotnet/src/webdriver/NoSuchElementException.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public class NoSuchElementException : NotFoundException
3131
/// <summary>
3232
/// Link to the documentation for this error
3333
/// </summary>
34-
private static string supportUrl = baseSupportUrl + "#no-such-element-exception";
34+
private static string supportUrl = baseSupportUrl + "#nosuchelementexception";
3535

3636
/// <summary>
3737
/// Initializes a new instance of the <see cref="NoSuchElementException"/> class.

dotnet/test/common/RelativeLocatorTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ public void NearLocatorShouldNotFindFarElements()
224224
{
225225
var rect2 = driver.FindElement(RelativeBy.WithLocator(By.Id("rect4")).Near(rect));
226226

227-
}, Throws.TypeOf<NoSuchElementException>().With.Message.EqualTo("Unable to find element; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#no-such-element-exception"));
227+
}, Throws.TypeOf<NoSuchElementException>().With.Message.EqualTo("Unable to find element; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#nosuchelementexception"));
228228
}
229229

230230
//------------------------------------------------------------------

java/src/org/openqa/selenium/NoSuchElementException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
@NullMarked
2828
public class NoSuchElementException extends NotFoundException {
2929

30-
private static final String SUPPORT_URL = BASE_SUPPORT_URL + "#no-such-element-exception";
30+
private static final String SUPPORT_URL = BASE_SUPPORT_URL + "#nosuchelementexception";
3131

3232
public NoSuchElementException(@Nullable String reason) {
3333
super(reason);

rb/lib/selenium/webdriver/common/error.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def self.for_error(error)
3838
ERROR_URL = 'https://www.selenium.dev/documentation/webdriver/troubleshooting/errors'
3939

4040
URLS = {
41-
NoSuchElementError: "#{ERROR_URL}#no-such-element-exception",
41+
NoSuchElementError: "#{ERROR_URL}#nosuchelementexception",
4242
StaleElementReferenceError: "#{ERROR_URL}#stale-element-reference-exception",
4343
InvalidSelectorError: "#{ERROR_URL}#invalid-selector-exception",
4444
NoSuchDriverError: "#{ERROR_URL}/driver_location"

rb/spec/integration/selenium/webdriver/driver_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ module WebDriver
149149
driver.navigate.to url_for('xhtmlTest.html')
150150
expect {
151151
driver.find_element(id: 'not-there')
152-
}.to raise_error(Error::NoSuchElementError, /errors#no-such-element-exception/)
152+
}.to raise_error(Error::NoSuchElementError, /errors#nosuchelementexception/)
153153
end
154154

155155
it 'raises if invalid locator',

rb/spec/integration/selenium/webdriver/error_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ module WebDriver
2727

2828
expect {
2929
driver.find_element(id: 'nonexistent')
30-
}.to raise_error(WebDriver::Error::NoSuchElementError, /#no-such-element-exception/)
30+
}.to raise_error(WebDriver::Error::NoSuchElementError, /#nosuchelementexception/)
3131
end
3232

3333
it 'has backtrace locations' do

0 commit comments

Comments
 (0)