As I am not much comfortable with scripting I recorded a keyword test which dint not have any warning or error dialog popped from the application and works fine when i playedback (Eg: Login to an application).

But During playback if flow have some validations where it validates the users and display some warning message.
how can write script to click <Ok> or <Yes> button and proceed the test.

Here I cannot hardcode the error or warning message dialog as there are more validation messages during the flow. That has be general wrt this windows application for all the validation dialog boxes.
So when ever error or warning or information message is popped up default button to be clicked.

I tried with Unexpected window property setting but did not work.