[Question] How to get browser session ID?
See original GitHub issueWhat are you trying to achieve?
I am trying to migrate a python WebDriver test to a Codeceptjs test. When the test finishes, it posts a link to the suacelabs session like this:
def tearDown(self):
if is_travis():
print("Link to your job: https://saucelabs.com/jobs/%s" % self.driver.session_id)
try:
if sys.exc_info() == (None, None, None):
sauce.jobs.update_job(self.driver.session_id, passed=True)
else:
sauce.jobs.update_job(self.driver.session_id, passed=False)
finally:
self.driver.quit()
else:
self.driver.close()
Is there an equivalent to self.driver.session_id
I can use to get the sessionID in codeceptjs?
Details
- CodeceptJS version: v0.4.13
- NodeJS Version: 6.9.2
- WebDriverIO
Issue Analytics
- State:
- Created 7 years ago
- Comments:12 (6 by maintainers)
Top Results From Across the Web
Get Session ID in browser - New Relic Explorers Hub
You should be able to copy that ID and use it via NRQL queries as the “session” attribute in a WHERE clause.
Read more >Read Session Id using Javascript - Stack Overflow
Yes. As the session ID is either transported over the URL ( document.location.href ) or via a cookie ( document.cookie ), you could...
Read more >[Question] How to get browser session ID? · Issue #362 - GitHub
What are you trying to achieve? I am trying to migrate a python WebDriver test to a Codeceptjs test. When the test finishes,...
Read more >Question about "Unique Session ID" per Browser instance.
The SessionID property is used to uniquely identify a browser with session data on the server. The SessionID value is randomly generated by...
Read more >Get session id from users? - Discussions on Python.org
I'm developing a distributed software (in python) that I intend to run on the web (browser) and I came across a question about...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Oh, looks like it returns a promise, not an array as I expected.
I think you need a custom helper
Run:
to create SauceLabs helper
Then your helper should look like:
Please see webdriverio session reference for session id, as I can be wrong in this part.
It is important to make your helper to be declared before WebDriverIO in codecept.json so this.browser to be available inside
_after
.