Hey guys,
Sorry for this question, but I’m trying to create a general method inside my steps_file, and from there, blow up errors to test on Scenarios.
It was my last attempt (but I’ve already tried other ways - ):
It is inside step_file.js but there is a method calling it in a Page Object:
checkElementIsFreeze: async function (componentFreezeLocate) {
let classAtribute = await this.grabAttributeFrom(componentFreezeLocate, 'class');
await assert.ok(classAtribute.toString().indexOf('freeze') > -1).catch(() => this.say(`Component ${componentFreezeLocate} is not frozen`));
},
I know it’s easy for you @davert and @paulb …
When this method is on the Page Object works beautifully, without need to use try…catch…