-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce Session/Element.requireElement
- Loading branch information
1 parent
f578048
commit cd5255f
Showing
7 changed files
with
66 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
public struct ElementNotFoundError: Error { | ||
/// The locator that was used to search for the element. | ||
public var locator: ElementLocator | ||
|
||
/// A human-readable description of the element. | ||
public var description: String? | ||
|
||
/// The error that caused the element to not be found. | ||
public var sourceError: Error | ||
|
||
public init(locator: ElementLocator, description: String? = nil, sourceError: Error) { | ||
self.locator = locator | ||
self.description = description | ||
self.sourceError = sourceError | ||
} | ||
|
||
/// The error response returned by the WebDriver server, if this was the source of the failure. | ||
public var errorResponse: ErrorResponse? { sourceError as? ErrorResponse } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters