Created
May 23, 2022 10:04
-
-
Save szydan/f60804a6e2ae7762e0b8fdfd54f46b11 to your computer and use it in GitHub Desktop.
Execute http request selenium async
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
response = driver.execute_async_script(""" | |
var done = arguments[0]; | |
function reqListener () { | |
done(this.responseText); | |
} | |
var oReq = new XMLHttpRequest(); | |
oReq.addEventListener("load", reqListener); | |
oReq.open("POST", "https://s12.volatile.siren.io/investigate-access-control/api/v1/auth/info"); | |
oReq.setRequestHeader("kbn-version", "12.2.0-SNAPSHOT"); | |
oReq.send(); | |
""") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment