Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Run Time Error '-2147417851'(80010105);
#1
Not Solved Shy 
Hi,

My framework is of "Functional Decomposition" Type and all the Functions are written in a Dll with VB.

I am trying to run below the code:

Code:
If Not CBool(CStr(JavaDialog("GTMLogin").Exist(0))) Then
             SystemUtil.Run "iexplore", Environment("App_URL")
       End If

The Public Property variable is defined for this:
Code:
Public Property Get JavaDialog()
    Set JavaDialog = mJavaDialog
End Property

After excecuting the last line "End Property" I am getting following error:
Run Time Error '-2147417851'(80010105);
Automation Error
the Server threw an exception


I am facing this problem when I am associating the OR at run time:
Code:
Dim qtpApp
Set qtpApp = CreateObject("QuickTest.Application")
Dim qtpRepositories
Set qtpRepositories = qtpApp.Test.Actions("Regression").ObjectRepositories

'Load Test.tsr
If qtpRepositories.Find(SourceFile) = -1 Then ' If the repository cannot be found in the collection
    qtpRepositories.Add SourceFile, 1 ' Add the repository to the collection
End If

And when I comment this code everything works fine.

I am frustrated ,plz help.
Reply
#2
Not Solved
Hi Shrikant,

This thread has some information on adding OR to Action and test.
Reply
#3
Not Solved
Hi Manish,

I have associated the OR to Action properly and Its working properly.And I am able to perform operations on the objects of this associated OR but only If I hardcode it in my Driver script but the same operations are failing through the Dll written in VB.I guess this issue is related to interface between QTP and VB.

Hi Ankur,saket

Please help in this issue.
Reply
#4
Not Solved
below statements does not seem to be doing anything with your DLL. Its simply trying to find the objects existance in the AUT.
Code:
If Not CBool(CStr(JavaDialog("GTMLogin").Exist(0))) Then
SystemUtil.Run "iexplore", Environment("App_URL")
End If
May be I am not getting the whole logic with this partial piece of your dll and statements, but I guess this is the OR which is causing the issue as you mentioned commenting the statements work so it could be some conflict with objects or I suspect JavaDialog requires to have a regular/speciifc JavaDialog test object/ some other objects in the repository.
if possible paste some more info in terms of the flow/design of your framework or dll structure.

Reply
#5
Not Solved
Hi Saket,

My Framework Contains a Driver Script,3 Functional Libraries to create an instance of objects in Dll and a Dll scripted in VB.

Dll Contains Four Classes divided according to the functions written in it like Data Entry Class, Test Case Class and Utilities Class.
And the below code is from one of these class:

Code:
If Not CBool(CStr(JavaDialog("GTMLogin").Exist(0))) Then
SystemUtil.Run "iexplore", Environment("App_URL")
End If



The Public Property variable is defined for this:

‘while creating instance:

Code:
Public Property Set JavaDialog(mObject)
    Set mJavaDialog = mObject  
    mSC.AddObject "JavaDialog", mJavaDialog, True
End Property

‘while checking for Login Dialog:

Code:
Public Property Get JavaDialog()
   Set JavaDialog = mJavaDialog
->End Property

Everything works fine until I add below code in my driver script:

Code:
If qtpRepositories.Find(SourceFileC) = -1 Then ' If the repository cannot be found in the collection
    qtpRepositories.Add SourceFileC, 1 ' Add the repository to the collection
End If

In Dll After "End Property" line It gives that Run time Error.

Please suggest me how to get rid of this error.


Attached Files Image(s)
   
Reply
#6
Not Solved
One workaround is to release the memory allocated to "qtpRepositories" by using the following line at the end of the code.
Set qtpRepositories=Nothing

Try the above workaround. If it still does not work you will have to install the patches released by HP for QTP. I have seen similar error which got fixed after installing the QTP patches shared by my colleague.
Reply
#7
Not Solved
Hi,

Along with Set qtpRepositories=Nothing I released all the Objects related to this step but still facing the same problem.

Can you please share the link for those QTP patches?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  General run error when Exist fails msacks 1 1,851 02-08-2019, 02:12 AM
Last Post: Ankur
  Trying to create List box in excel sheet at Run time with values yes No JACKSPARROW 0 1,707 01-17-2017, 11:05 AM
Last Post: JACKSPARROW
Rolleyes The test run cannot continue due to an unrecoverable error neerndg123 3 8,653 09-17-2015, 08:27 PM
Last Post: ananthakumarbe
  HI, i'm having a run time error ,please help? Awzar 0 2,633 01-24-2015, 06:52 AM
Last Post: Awzar
  Browser("BrowserName").Back gives General Run Error... deminiek 13 18,649 12-10-2013, 12:53 AM
Last Post: rizvia

Forum Jump:


Users browsing this thread: 4 Guest(s)