diff --git a/Sources/WebDriver/NoSuchElementError.swift b/Sources/WebDriver/NoSuchElementError.swift index 9f538ea..9da4cfd 100644 --- a/Sources/WebDriver/NoSuchElementError.swift +++ b/Sources/WebDriver/NoSuchElementError.swift @@ -1,5 +1,5 @@ /// Thrown when findElement fails to locate an element. -public struct ElementNotFoundError: Error, CustomStringConvertible { +public struct NoSuchElementError: Error, CustomStringConvertible { /// The locator that was used to search for the element. public var locator: ElementLocator @@ -15,6 +15,6 @@ public struct ElementNotFoundError: Error, CustomStringConvertible { public var errorResponse: ErrorResponse? { sourceError as? ErrorResponse } public var description: String { - "Element not found using locator [\(locator.using)=\(locator.value)]: \(sourceError)" + "No element found using locator [\(locator.using)=\(locator.value)]: \(sourceError)" } } diff --git a/Sources/WebDriver/Session.swift b/Sources/WebDriver/Session.swift index 9aa1081..c812b02 100644 --- a/Sources/WebDriver/Session.swift +++ b/Sources/WebDriver/Session.swift @@ -186,7 +186,7 @@ public class Session { } } } catch { - throw ElementNotFoundError(locator: locator, sourceError: error) + throw NoSuchElementError(locator: locator, sourceError: error) } } }