I just need to know if there is a way to use a variable for a object type. I want to be able to use a variable so i don't have to use a select case or a bunch of if statements like below.
Select Case arrsplit(0)
Below is what i am trying to do and hoping that i am missing something.
var1 = "WebElement"
If Browser("Browser").Page("Page").var1 ("innertext:=testing").Exist = "True" Then
Senior IS QA Developer
LR, QTP, QC Admin, Sitescope, SilkPerformer
You can indeed...
right down to FrmWrkObj.Exist for example.
That variable holds all the values that identify the object.
You can buy my Art from: "Post Cards now available"
Ian Fraser Landscape Photography
World Wide Shipping.
I am doubt about the replacement of var1 by WebElement in the script, how could QTP recognizes this object?
Here is the way I resolved my problem, I put the micclass in the object description and other properties and then I counted the children. If the count was one then it existed.
set children = Browser("Browser").Page("Page").ChildObjects(oDesc )