-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve resetting of page, closes #1035
Navigate to an empty HTML instead of navigating to about:blank. Hopefully this should work better than before.
- Loading branch information
Showing
5 changed files
with
35 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<!doctype> | ||
<html> | ||
<!-- an empty HTML document, used for resetting the page content --> | ||
</html> |
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 |
---|---|---|
|
@@ -75,8 +75,11 @@ def driver | |
# Reset the session, removing all cookies. | ||
# | ||
def reset! | ||
driver.reset! if @touched | ||
@touched = false | ||
if @touched | ||
driver.reset! | ||
@touched = false | ||
assert_no_selector :xpath, "/html/body/*" | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
jnicklas
Author
Collaborator
|
||
end | ||
raise @server.error if Capybara.raise_server_errors and @server and @server.error | ||
ensure | ||
@server.reset_error! if @server | ||
|
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
What is the purpose of this line? Looks like it just tests that driver resets page correctly.