ROHINI
ROHINI

Reputation: 1

How can we write test cases for Alert or pop up in testcafe?

We have various popups on our website which are used for validation. How can we write test cases in Testcafe for alerts/popups?

Not able to inspect alert and hence not able to get the id.

Upvotes: 0

Views: 1297

Answers (1)

Alex Skorkin
Alex Skorkin

Reputation: 4274

You can use the setNativeDialogHandler method to handle alert windows.

Its API and examples are available in the corresponding help topic.

Upvotes: 1

Related Questions