using FindChild() method on Id property
i am facing an issue with the below code
main()
test("button","122")
function test(strtype,strID)
PropArray = Array("id")
ValuesArray = Array(""& strID& "")
set testobj = pg.FindChild(PropArray ,ValuesArray ,100,True)
if testobj.exists then
testobj.click
end if
end function
the issue is, i am passing the hardcoded ID value thinking it is always the same for that button on page, but looks like everytime ths ID value is changing for that button...so its clicking a different object with that ID..
i want a generic function, which can handle any type of object comes in and perform the corresponding aciton based on the type of it.
is it a right way to take ID property here or do i need to check any other property like Name/Caption....etc??
Thanks,