Micro Focus QTP (UFT) Forums
How to use ordinal identifiers in VB script - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: How to use ordinal identifiers in VB script (/Thread-How-to-use-ordinal-identifiers-in-VB-script)



How to use ordinal identifiers in VB script - qtplearner88 - 03-06-2012

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


RE: How to use ordinal identifiers in VB script - skatta - 03-20-2012

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.


RE: How to use ordinal identifiers in VB script - sshukla12 - 03-21-2012

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


RE: How to use ordinal identifiers in VB script - qtplearner88 - 03-22-2012

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



RE: How to use ordinal identifiers in VB script - qtplearner88 - 05-03-2013

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


RE: How to use ordinal identifiers in VB script - agarwl.anurag - 05-03-2013

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


RE: How to use ordinal identifiers in VB script - qtplearner88 - 07-30-2013

Hi Anurag,

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