Forum Discussion

ash10's avatar
ash10
Occasional Contributor
10 years ago
Solved

How to check if the window or object exsist

I have dialog1 appearing on my App sometime and if it appears then I have to click on Ok and  sometime this dialog might not appear.    if(Aliases["App"]["WinFormsObject"]("Dialog1")["Exists"]) Al...
  • HKosova's avatar
    HKosova
    10 years ago

    Use WaitWinFormsObject for Dialog1:

     

    var dlg = Aliases["App"]["WaitWinFormsObject"]("Dialog1", 1000);
    if (dlg.Exists)
      dlg["WinFormsObject"]("buttonClose")["Click"]();