Is it possible to get browserstack/lambdatest session url from t object?

63 Views Asked by At

As an example with LT. The default reporter logs the following info once the test is started. I would like to get the session URL from t object(do not want to implement custom reporter only for that). Is it possible?

1

There are 1 best solutions below

1
Pavel Morozov On

You can obtain the BrowserStack/LambdaTest session URL from the t object with t.testRun.browserConnection.userAgent and use a RegExp to extract necessary information from the string.

However, It's not part of public API and can be changed at any time. Please use it with caution.