Skip to main content

executionContext

Overview

During the test run, Testplane adds an executionContext property to browser to store the execution context.

The browser.executionContext property holds the current test or hook _Mocha object, supplemented with a browser identifier.

info

The execution context is added by Testplane and is not available in the API WebDriverIO.

Usage Example

it("should log execution context", async ({ browser }) => {
await browser.url("/foo/bar");

console.log("test", browser.executionContext);
// outputs:
// test: {
// "title": "should log execution context",
// "async": 0,
// "sync": true,
// "timedOut": false,
// "pending": false,
// "type": "test",
// "body": "...",
// "file": "/foo/bar/baz/qux.js",
// "parent": "#<Suite>",
// "ctx": "#<Context>",
// "browserId": "chrome",
// "meta": {},
// "timer": {}
// }
});