How to get the session ID of a running test via script in Pytest?

How to get the session ID of a running test via script in Pytest?

Hello Ana,

You can use the syntax below to get the session ID of a running test via script in Pytest:

HttpContext.Current.Session.SessionID