Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error during execution of QTP script
#5
Solved: 10 Years, 10 Months, 1 Week ago
I have the same issue with ChildObjects on a web page. In some cases I found this helps:

Code:
wElement("class").RegularExpression = "false"

It seems some description objects use Regular Expressions to do the search, this turns it off and in the case of using "html tag" it does make the search for ChildObjects quicker and less error prone with there are a large number of objects.

However, it will still fail if there are x-thousands of objects. This occurs in QTP 9.5 and 10, so there is a limit to the number of objects it can handle. The only "work around" I can find is:

Code:
on error resume next
Set cComps=Browser().Page().PSFrame().ChildObjects(cComp)
if not isEmpty(cComps ) then
    'do something
else
    Reporter.ReportEvent micWarning, "cComps", "Returned Empty"
end if
on error goto 0

The error you are getting is because the variable is null/empty, I think. So you have to handle that and let your code continue. I just record the message and move on letting my devs no I can't test that many objects, usually a table, and they need to break it up if possible, or provide test data that doesn't fail.

Hope this helps.
Reply


Messages In This Thread
RE: Error during execution of QTP script - by jsknight1969 - 03-29-2010, 11:28 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to catch the script execution when QTP scripts are executed from command line Sreeni.lutukurthy 0 2,713 03-19-2015, 05:55 PM
Last Post: Sreeni.lutukurthy
  vb script to stop execution of functions if conditions fail visitjaga 1 7,158 12-05-2013, 12:26 AM
Last Post: ravi.gajul
  .vbs script error when trying to insert a value in a sapguitable frebuffi 5 6,563 07-18-2013, 03:04 PM
Last Post: Staff
  Speed issues on script execution (First Post) martinshort 4 3,187 07-03-2012, 03:02 PM
Last Post: martinshort
  Error while creating object using description.create object in VB script SarodeGirish 5 5,907 06-19-2012, 05:30 PM
Last Post: ssvali

Forum Jump:


Users browsing this thread: 1 Guest(s)