I am using playwright, working with an ERP (IFS) system and I can't figure out the locator for my text on page to be verified. How can we verify the text on a page without locator?
I tried the following
expect(this.page.getByText('Success!').isVisible());
To my surprise when I tried following it still passes when "Go home" does not exists on the page, so clearly something is wrong there
expect(this.page.getByText('Go home!').isVisible);
I tried with followin
expect(page.locator(('#Form-WorkOrderContactList-fndRow-1-Cf_Contact_Type'))).toBe("Success");
it gives error as follow
Expected: "Success"
Received: {"_frame": {"_guid": "frame@b4a0f19f2bc5a31359f192d5bab34ac7", "_type": "Frame"}, "_selector": "internal:attr=[title=\"Case Handler\"i] >> div >> nth=0"}
I have added a picture, its an IFS System, I tried so many things in last two days but no luck, any help will be appreciated. I am using typescript