Embarking on a fresh cucumber-selenium project in Typescript, I am eager to keep the Driver in the world context. However, following the method suggested here, I encounter an issue where the Driver
type remains inaccessible to step definitions.
This means that in my initial step,
Given('First step', async function () {
this.driver.get('http://vacuumlabs.com')
})
the object driver
defaults to type any
, as this
is of type World
rather than CustomWorld
. Is there a workaround for this?
The dependencies I am utilizing include:
"@types/cucumber": "6.0.1",
"cucumber": "^7.0.0-rc.0",
(as @cucumber/cucumber
interprets this
as any
)