How to validate the pop UP window or Dialog window in the Automated test frame work?

ramuv
Tera Expert

How to validate the pop UP window or Dialog window in the Automated test frame work?

Scenario : we are trying to click the Reopen Incident UI Action button , that time pop UP or Dialog Window  visible ,

then click the OK Button .

--> How to validate  the Pop UP Window.

--> How to click the OK Button  on the Pop UP Window.

 

 

 

ramuv_0-1689956015374.png

 

Thanks

1 REPLY 1

Riya Verma
Kilo Sage
Kilo Sage

Hi @ramuv ,

 

Hope you are doing great.

 

To validate the pop-up window:

  1. First, we need to identify the pop-up window's unique properties, such as the title, message, or any specific HTML attributes.
  2. Next, we'll use the ATF's test steps to interact with the UI and check if the pop-up window is visible.
  3. We can use an assertion in the test script to verify that the pop-up window is displayed on the screen.x

Sample code to validate the pop-up window:

 

// Assuming 'popUpElement' is a variable representing the pop-up window element
var isPopUpVisible = popUpElement.isVisible(); // Check if the pop-up window is visible

// Perform the validation
assert.isTrue(isPopUpVisible, "Pop-up window is visible on the screen");

 

 

To click the OK button on the pop-up window:

  1. Similar to the validation, we need to identify the OK button element using unique properties or HTML attributes.
  2. Then, we'll use ATF's test steps to interact with the UI and click the OK button.

Sample code to click the OK button on the pop-up window:

 

// Assuming 'okButtonElement' is a variable representing the OK button element
okButtonElement.click(); // Click the OK button on the pop-up window

 

 
Please mark the appropriate response as correct answer and helpful, This may help other community users to follow correct solution.
Regards,
Riya Verma