Reply
Highlighted
Occasional Contributor
Posts: 8
Registered: ‎07-25-2017

object doesn't support this property or method

Hello,

 

This is weird for me, I'm working with vbscript in testcomplete and until a few hours ago my code was working (see below a snippet) but suddenly it prompted me an erro telling me that the object doesn't support this property or method: 'DataPool.item'.

 

The code is here:

 

Function DataPoolfile()
  DataPool.FilePath = Project.Path + "TestData\\" 'Test data sheet path
  DataPool.FileName = Project.Variables.Filename 'Test data file name
  DataPool.SheetName = Project.Variables.Sheetname 'Test data sheet name  
  DataPool.New()
  firstCommand = true
  prevCmd = ""
  Set objArrayList = CreateObject("System.Collections.ArrayList")

  While (not DataPool.EOF)
     If (DataPool.Item("Run") = "Yes") Then
         run = DataPool.Item("Run")
         sc = CDbl(DataPool.Item("Scenario #"))

     ....

     End If

     ...

  Wend

 

 

Please, I need help!!!

Valued Contributor
Posts: 607
Registered: ‎03-12-2014

Re: object doesn't support this property or method

Not a VBS expert...

But if you share where DataPool object is being defined how did you access it may give us more insight.

Posts: 4,379
Topics: 39
Kudos: 1,609
Solutions: 325
Registered: ‎11-30-2009

Re: object doesn't support this property or method


NisHera wrote:

Not a VBS expert...

But if you share where DataPool object is being defined how did you access it may give us more insight.


I'm with @NisHera here... we really don't have any exposure as to what "DataPool" is.  You're calling a "new" method on it which I can only guess is doing some kind of initialization of something.  If you can give us exposure as to what that is doing, we might be able to answer you better.

 

Suggestion: It looks like you're using an excel sheet as the data source for some sort of data driven loop.  Is there a reason why you're not using the DDT.ExcelDriver method to create that data source?  Or is that what "DataPool" is doing?


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Extensions available
Community Leaders Program
Occasional Contributor
Posts: 8
Registered: ‎07-25-2017

Re: object doesn't support this property or method

Hi guys, thanks for replying.....DataPool is created in de Description.XML file as a RuntimeObject. It's in the Extns folder of my project, attached are the files....

Posts: 4,379
Topics: 39
Kudos: 1,609
Solutions: 325
Registered: ‎11-30-2009

Re: object doesn't support this property or method

I can't be certain... but what it seems like is that the GetRoutine for the item property is somehow failing.  So, when TestComplete attempts to evaluate the Item("Run"), it's not actually getting the property.  I'd take a look to see if there's something going on with your extension code, figure out what's failing in getting the "Item" property of DataPool.


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Extensions available
Community Leaders Program
Try QAComplete Now