Micro Focus QTP (UFT) Forums

Full Version: How to use ordinal identifiers in VB script
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi All,

I am a beginner in QTP. I am facing a problem in QTP. I need to make QTp to click on web check boxes inside a window. I could not find any unique property that QTP uses to identify the object. Here what we are doing is parameterizing a property and giving the input through an excel. So I need to find a property.But there is nothing. but I found the Ordinal properties(Index,Value)is different for all the check boxes.

Can anyone help me out here?And pls let me knw if i have to make more clear

Thanks
QTPLearner
Hi,

you can use HTML DOM to get a easy solution for this.
Using source code of the page you have to write the script.
Hi, If u know the index of the check box on which u have to work on then use DP to get the access to that check box and perfrom ur task.

Regards,
Sankalp
Hi,
How to use an ordinal identifier in a script??
Can u provide an example??
Hi,

If QTP recognizes the individual checkboxes only with the help of ordinal identfiers and if this ordinal identifiers has to be parameterized, how we will do it??

It would be a great help if someone could give an example

Thanks
Vivek
Hi,

You can use the descriptive programming method to solve this problem.

Like:
Code:
Set checkbox=description.Create
checkbox("class")="WebCheckBox"
checkbox("index")=0(u can pass this value at run time also)

Browser("Google").Page("Google").WebCheckBox(checkbox).Click

I hope this will resolve your issue
Hi Anurag,

Is there any other way other than descriptive programming.??
Thanks
Vivek