Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to handle exeptions
#1
can i handle unwanted window/dialog box which appear in the application by clicking on the OK button..?

most of the unwanted windows/dialog box(exception) appearing will not have a title bar name, hence QM is not able to recognize the window, QM recognizes the window class name as "#32770"
the approach i used was:
firstly i check whether the window/dialog is existing..?
secondly i try to click on the OK button

Is there any other options of handling the exceptions....?
#2
What is the application?

The exception window probably have text inside, and that text probably is control. That text can be used in window trigger. If you want to recognize the window from macro, use child function.

int w1=win("" "#32770")
int w2=child("control text" "control class" w1)
if(w2)
,out "it is exception window"
,but id(1 w1) ;;click OK

Control text can be partial.
#3
its a .Net application

can you please refer to the attachment...


Attached Files Image(s)
   
#4
Probably win finds other window (possibly hidden) with same class. Maybe some of these codes will work.

Code:
Copy      Help
int w1=win("*" "#32770" "" 0x400|1)
if(w1)
,int w2=child("IDynamic*" "Static" w1 0x200|1)
,if(w2)
,,out "exception"

Code:
Copy      Help
int w1=WinC("IDynamic*" "Static" 0x200|1 "*" "#32770" "" 0x400|1)
if(w1)
,out "exception"

Code:
Copy      Help
int w1=wait(0 WV WinC("IDynamic*" "Static" 0x200|1 "*" "#32770" "" 0x400|1))
if(w1)
,out "exception"


Forum Jump:


Users browsing this thread: 1 Guest(s)