Abhinav Jha
Abhinav Jha

Reputation: 1

Does testcafe support: 1. Window based pop up handler ? 2. How can we migrate our Selenium(Java) code to TestCafe?

I am looking for TesCafe support for below 2 scenario:

  1. How we can handle window based pup-up?
  2. Is there any way to migrate Selenium(Java) scripts/code to TestCafe?

Thanks for your response in advance.

Warm Regards, Abhinav

Upvotes: 0

Views: 47

Answers (1)

Alex Kamaev
Alex Kamaev

Reputation: 6318

If your popup is based on javascript windows, you can use the following methods to handle these windows: https://testcafe.io/documentation/402677/reference/test-api/testcontroller/switchtowindow https://testcafe.io/documentation/402694/reference/test-api/testcontroller/openwindow#header https://testcafe.io/documentation/402709/reference/test-api/testcontroller/closewindow

Please refer to the following help topic for more details: https://testcafe.io/402900/resources/blog/2020-8-26-introducing-multi-window-tests-beta#header.

As for migration from Selenium, it's not possible in automatic mode. You need to rewrite your tests yourself.

Upvotes: 1

Related Questions