Hi We created A generic function which will
check for the windowbutton,dialogbutton and windowdialogbutton
and does the required action

Function ClickButton(Window,Dialog,Button)
If IsNull(Window) and JavaDialog(Dialog).JavaButton(Button).Exist Then
ElseIf IsNull(Dialog) and JavaWindow(Window).JavaButton(Button).Exist Then
ElseIf JavaWindow(Window).JavaDialog(Dialog).JavaButton(B utton).Exist Then
JavaWindow(Window).JavaDialog(Dialog).JavaButton(B utton).Click
Msgbox "The Button Does Not Exist "
End If
End Function

Call ClickButton(xyzWindow,Null,Pulla)

Error := It says failed to run test due to an unknown error it stops at the step
"If IsNull(Window) and JavaDialog(Dialog).JavaButton(Button).Exist Then"