Forum Discussion

Adeel1's avatar
Adeel1
Contributor
8 years ago
Solved

Is there someone having idea about handling Window confirm() Method for chrome.

Below is the html for page which show dialogue box. It halt your browser even you cant open new window as well. How to perform OK or Cancel for this dialogue box in TestComplete using JavaScript.

 

<!DOCTYPE html>
<html>
<body>

<p>Click the button to display a confirm box.</p>

<button onclick="myFunction()">Try it</button>

<script>
function myFunction() {
confirm("Press a button!");
}
</script>

</body>
</html>

  • page.Confirm.Button("OK").Click();

     

    I found above solution worked for me.

     

    Thank you TestComplete.

     

1 Reply

  • page.Confirm.Button("OK").Click();

     

    I found above solution worked for me.

     

    Thank you TestComplete.