10-25-2011, 05:25 PM
Hi,
I have one script which was working fine with IE7. The same script does not work for IE8.
The scenario is that there are many edit box on the page, i need to take a count and then enter some value into the box.
Below is my code ---
---------------------------------------------
The code
intTotalObj=ObjEdit.count
use to give a proper count with IE7, but now it always displays the count as 1. If i restart IE8 and then run the program i get the proper count but once i do some operation on the page and run the program again, the count is always 1.
I am using QTP 11.0.
Please help.
Regards,
Ankesh
I have one script which was working fine with IE7. The same script does not work for IE8.
The scenario is that there are many edit box on the page, i need to take a count and then enter some value into the box.
Below is my code ---
Code:
'Description for Browser and Page
Set ObjBrw=Description.Create
ObjBrw("title").value=".*"
'Description for Frame
Set ObjFrame=Description.Create
ObjFrame("name").value="positions"
'Description for child objects
Set ObjChildObjects=Description.Create
ObjChildObjects("html tag").value="INPUT"
ObjChildObjects("type").value="text"
ObjChildObjects("name").value="product\[.*\]" 'this is because the name of the edit boxes are like product[1], product[2]
'Get the child objects
Set ObjEdit=Browser(ObjBrw).Page(ObjBrw).Frame(ObjFrame).ChildObjects(ObjChildObjects)
intTotalObj=ObjEdit.count
msgbox intTotalObj
For i=0 to intTotalObj-1
ObjEdit(i).Set "Testing is good"&i+1 'Enter some values
Next
'Release the objects
Set ObjEdit=Nothing
Set ObjChildObjects=Nothing
Set ObjFrame=Nothing
Set ObjBrw=Nothing
---------------------------------------------
The code
intTotalObj=ObjEdit.count
use to give a proper count with IE7, but now it always displays the count as 1. If i restart IE8 and then run the program i get the proper count but once i do some operation on the page and run the program again, the count is always 1.
I am using QTP 11.0.
Please help.
Regards,
Ankesh