question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Get currently running sessionId

See original GitHub issue

The problem

I am writing a python script to retrieve the page source of my app through driver.page_source Appium returns them in XML but I want it in JSON. So I try to send raw HTTP requests to Appium server, but I need the sessionId for that. I tried self.driver.session_id but apparently it gives a new sessionId. Is there any workaround for this?

Or even better, is there a way to get page_source without having Appium parse it to XML?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
KazuCocoacommented, Aug 6, 2021

Is this for iOS device thing? Then, you can call https://github.com/appium/WebDriverAgent/blob/a1824895274c60798b506f31054e4ce1e0400c71/WebDriverAgentLib/Commands/FBDebugCommands.m#L28 like http://<device ip>:<port>/source?format=json from the Appium/WDA (or via portforwarding) without session id. this may help.

1reaction
KazuCocoacommented, Aug 8, 2021

It is expected. Appium itself does not provide the feature since it follows W3C WebDeiver spec.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to get current session id ? — oracle-tech
You can obtain current session ID using default namespace sys_context of Oracle. Use Following query. select sys_context('userenv' ...
Read more >
How to find the session id of running jobs - DBA Stack Exchange
Trying to get the session id of executing jobs ... intr1) - charindex(':', intr1) - 1) ,SessionId = spid FROM master.dbo.sysprocesses x ...
Read more >
How to find session id and process name - Microsoft Q&A
I am having a scenario that I would like to find the session id associated with the SQLQUERYNOTIFICATIONSERVICE running in my test database....
Read more >
SQL SERVER – Get Query Running in Session
You can find a range of active session IDs in your system by running system stored procedure sp_who2. The following is the resultset...
Read more >
How can I retrieve the Session ID from command line?
It will display the name and session# of each process running. If you are logged in locally then look at the ID for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found