Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to prove if an object exists?
#1
Solved: 11 Years, 4 Months ago
Hey guys,

i've had allready two ideas which didn't work yet.
I use QTP 9.2.

My problem:
I want to find at least one object with "innertext:="&Kriterium on a page. So i defined an object and use the following code to prove it. Unfortuneatly the Exist-function doesn't work in this context.

My code first try:
Code:
' define object
Set chKriterium = Description.Create
chKriterium("micclass").Value = "WebElement"
chKriterium("innertext").Value = Kriterium

Browser("P@W Report Viewer").Page("P@W Report Viewer").Frame("Report").ChildObjects(chKriterium).Exist

My code second try:
Code:
' define object
Set chKriterium = Description.Create
chKriterium("micclass").Value = "WebElement"
chKriterium("innertext").Value = Kriterium

Set EditCollection = Browser("P@W Report Viewer").Page("P@W Report Viewer").Frame("Report").ChildObjects(chKriterium)

If  EditCollection.Count > 0 Then
...

Someone can me explain, why it doesn't work and maybe how to solve my problem? Would be great Smile

lucster
Reply


Messages In This Thread
How to prove if an object exists? - by lucster - 07-07-2011, 05:00 PM
RE: How to prove if an object exists? - by rajpes - 07-07-2011, 06:23 PM
RE: How to prove if an object exists? - by rajpes - 07-07-2011, 10:24 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Report Viewer showing hundreds of WebElement.Exists? themoon 1 2,345 03-09-2016, 02:43 PM
Last Post: vinod123
  How to check whether data exists in excel.. venkatesh9032 1 3,084 03-06-2014, 04:37 PM
Last Post: supputuri
  Object does not exists shwetasharma 4 9,122 03-01-2013, 01:05 PM
Last Post: shwetasharma
  Verifying the value exists and if not, wait up to 5min HeZma 3 4,087 02-25-2012, 12:21 PM
Last Post: rajpes
  Object not found in object repository Even it exists There Rohit 4 12,061 03-21-2011, 07:04 PM
Last Post: Rohit

Forum Jump:


Users browsing this thread: 2 Guest(s)