Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ERROR : Object reference not set to an instance of an object.
#1
Not Solved
Hi all ,

I am facing a issue while automating a WPF app on Windows

I added Plugin "WPF" as needed and added WEB , ActiveX and Vbscripts as plugin while Opening QTP app

while recording it recorded Properly but on rerun it gets failed with below error


ERROR :-
Object reference not set to an instance of an object.
Line (13): "WpfWindow("MYAPP1").WpfButton("OK").Click".

so I tried debuging

i code like

Code:
Dim Varname
Varname  = WpfWindow("MYAPP1").WpfButton("OK").GetROProperty("text")
msgbox(Varname)

WpfWindow("MYAPP1").WpfButton("OK").Click

Varname Message Box shows "OK" , so it means object is Recognizes. - BUT IT FAILS IN NEXT LINE
I checked Obj repository and checked OK button is there !!!


also tried

Code:
Set WinObject = WpfWindow("MYAPP1").WpfButton("OK")
If  WinObject.Exist Then
            msgbox("yes")
    else
        msgbox("NO")
End If

It gives error as -
General run error.
Line (9): "Set WinObject = WpfWindow("MYAPP1").WpfButton("OK")".

FUNNEST Part is , i DOONO Some times both above code works and "OK" Button get pressed !!! Smile

I don't want to Use Descriptive programming as get all Child Objects , loop and get the Object which is required
Reply
#2
Not Solved
Hi,
With description programming is the same?
Reply
#3
Not Solved
Hi All,
Is there any solution for this issue ??
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  object spy not recognizing object.. pleaseeeee help Sonia Sadeque 3 3,452 12-22-2016, 02:42 PM
Last Post: ishan.mahajan@adp.com
  Intermitent "Object not visible" error erodpr 5 3,522 01-14-2016, 10:55 AM
Last Post: vinod123
  When trying to recognize the object in QTP, each object is recognized as “WinObject:S geetasarvadnya 2 3,776 10-28-2015, 12:34 PM
Last Post: vinod123
  Object repository losing object properties ishan.mahajan@adp.com 2 3,770 08-20-2015, 11:33 PM
Last Post: ADITI1992
  login object not found in object repository Akram 2 3,125 06-01-2015, 07:47 PM
Last Post: babu123

Forum Jump:


Users browsing this thread: 1 Guest(s)