After considering various possibilities, I came up with the following solution:
Given(
`Step1`,
async function() {
const ObjectToUse = {
A: 'a',
B: 'b'
}
this.ObjectToUse = ObjectToUse
}
)
Then(`Step2`, async function() {
ObjectToUse = this.ObjectToUse
})
Despite my efforts, I am uncertain whether this is the most efficient practice as it might become redundant when used multiple times.
Do you have any suggestions for a more streamlined approach? My goal is to simply utilize the values obtained from the Given step.