-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow
webdriver-url
when creating drivers (#357)
* Allow `webdriver-url` when creating drivers This is an optional pass-through property and web-driver requests are directly sent to this URL, instead of building the URL with host and port. This allows etaoin's use with service providers like browserstack. * Handle remote files (not requiring local checks) Allows for uploading files which are hosted on webdriver hosts and not the local computer where the test suite is running. This is useful for scenarios like browserstack where certain test files are provided for uploads testing. * Merge notes from @lread Ya I see it: - running? and wait-running very likely don't mean much for for a remote hosted WebDriver service as they only check the host and port for reachability. We could extract host and port from a the webdriver-url but checking that we can open a socket on port 443 for chrome.browserless.io doesn't say much about WebDriver service running at https://chrome.browserless.io/webdriver. Minor changes: - documented in user guide - added a test - minor strategy change around wait-running - check :webdriver-url for nil rather than via str/blank? (for consistency with other options) Co-authored-by: lread <[email protected]>
- Loading branch information
Showing
7 changed files
with
144 additions
and
36 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
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 |
---|---|---|
|
@@ -69,3 +69,16 @@ | |
~@body | ||
(finally | ||
(.delete tmp#))))) | ||
|
||
(defn strip-url-creds | ||
"Return `url` with any http credentials stripped, https://user:[email protected] -> https://hello.com. | ||
Use when logging urls to avoid spilling secrets." | ||
^String [^String url] | ||
(let [u (java.net.URL. url)] | ||
(.toExternalForm | ||
(java.net.URL. | ||
(.getProtocol u) | ||
(.getHost u) | ||
(.getPort u) | ||
(.getFile u) | ||
(.getRef u))))) |
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