In the current project, I am utilizing the Serenity-js BDD framework with a screenplay pattern approach. However, I am encountering an issue when attempting to assert the visibility of an element on a web page using the "that" method from the Ensure class.
Sample Code :
Page Element -
static searchPatientsVerificationRow = Target.the('verification record').located(by.xpath("//div[@class='row']//tr"));
Test Script Step :
return Ensure.that(TaggingSearchControls.searchPatientsVerificationRow,Is.visible())
Error :
An error stating 'Argument of type 'SuccessCondition' is not assignable to parameter of type 'Assertion'. Property 'answeredBy' is missing in type 'SuccessCondition' but required in type 'Assertion'' has been encountered.