Ask a Question

object doesn't support this property or method

alexis733
Occasional Contributor

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!!!

4 REPLIES 4
NisHera
Valued Contributor

Not a VBS expert...

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

tristaanogre
Esteemed Contributor


@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
[Hall of Fame]
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.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
alexis733
Occasional Contributor

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....

tristaanogre
Esteemed Contributor

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
[Hall of Fame]
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.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
cancel
Showing results for 
Search instead for 
Did you mean: