Hi Sreekanth,
Correct me if i am wrong.
As per QTP help topic :-Identifying an Object Using the Index Property
index ares assigned as per Class i.e object Type
so if you have four objects two webedit and two webbutton in single cell
the index will be
first webedit index =0
Second webedit index =1
first webElement index =0
Second webElement index =1
as per you thinking it would be like
first webElement index =0
Second webElement index =1
first webedit index =2
Second webedit index =3
which is false as per QTP help
so need not worry even if one webedit is there it will be of index 0,
other type of objects will also start from zero.
Thanks
Help Referance
While learning an object, QuickTest can assign a value to the test object's Index property to uniquely identify the object. The value is based on the order in which the object appears within the source code. The first occurrence is 0.
"Index property values are object-specific" . Therefore, if you use Index:=3 to describe a WebEdit test object, QuickTest searches for the fourth WebEdit object in the page. However, if you use Index:=3 to describe a WebElement object, QuickTest searches for the fourth Web object on the page—regardless of the type—because the WebElement object applies to all Web objects.
Correct me if i am wrong.
As per QTP help topic :-Identifying an Object Using the Index Property
index ares assigned as per Class i.e object Type
so if you have four objects two webedit and two webbutton in single cell
the index will be
first webedit index =0
Second webedit index =1
first webElement index =0
Second webElement index =1
as per you thinking it would be like
first webElement index =0
Second webElement index =1
first webedit index =2
Second webedit index =3
which is false as per QTP help
so need not worry even if one webedit is there it will be of index 0,
other type of objects will also start from zero.
Thanks
Help Referance
While learning an object, QuickTest can assign a value to the test object's Index property to uniquely identify the object. The value is based on the order in which the object appears within the source code. The first occurrence is 0.
"Index property values are object-specific" . Therefore, if you use Index:=3 to describe a WebEdit test object, QuickTest searches for the fourth WebEdit object in the page. However, if you use Index:=3 to describe a WebElement object, QuickTest searches for the fourth Web object on the page—regardless of the type—because the WebElement object applies to all Web objects.