07-07-2011, 05:00 PM
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:
My code second try:
Someone can me explain, why it doesn't work and maybe how to solve my problem? Would be great
lucster
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
lucster