Skip to content

Is it possible to get the title of the current step? #39

@jeffb-sfdc

Description

@jeffb-sfdc

While debugging (via VS Code) I see that there is a "this" object available within a step, and it has a this.test.title property which has the title of the current step. Yet, when I add this code to a step:

describe('Example Suite', async () => {
  step('Example step', async () => {

    debugger;
    const context = this as unknown as Context;
    const test = (this as unknown as Context).test;
    const title = (this as unknown as Context).test!.title;

...this.test is unknown, and this.test.title throws an exception (dereferencing an unknown object)

Is it possible to get the title of the current running step?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions