I am getting the URL and HTML ID of the frame using the GetRoProperty method and using the same values to identify the object via descriptive programming.
QTP is identifying the object using HTML ID, but when it uses URL for identifying its shows
Cannot identify the object "[ Frame ]" (of class Frame). Verify that this object's properties match an object currently displayed in your application.
Line (24): "print Browser("SAP - [Search: Accounts]").Window("Partner Selection Document").Page("Partner Selection Document").Frame("url:="&rourl).GetROProperty("html id")".
In OR, QTP identifies the frame using URL alone without any other properties.
Following are the lines of code involved:
rourl=Browser("SAP - [Search: Accounts]").Window("Partner Selection Document").Page("Partner Selection Document").Frame("Frame").GetROProperty("url")
print rourl
roid=Browser("SAP - [Search: Accounts]").Window("Partner Selection Document").Page("Partner Selection Document").Frame("Frame").GetROProperty("html id")
print roid
print Browser("SAP - [Search: Accounts]").Window("Partner Selection Document").Page("Partner Selection Document").Frame("html id:="&roid).GetROProperty("html id")
'prints html id
print Browser("SAP - [Search: Accounts]").Window("Partner Selection Document").Page("Partner Selection Document").Frame("url:="&rourl).GetROProperty("html id")
'shows error message
url of frame is http://part1.part2.part3.part4.com:8082/sap(bD1FTiZjPTUwMCZpPTEmZT1WRVZUVkY5Rk1rVkJWVlJQTVRJM01USmZWY3gxMlR4aUNVRGhBSUFBQ2hvd2NnJTNkJTNk)/bc/bsp/sap/crm_ui_frame/bspwdapplication.do?popup-name=_POPUP0001&wcf-request-ticket=929D13152F6D62ACF1AB51BD8BDC2819
I have modified the url as
http://part1\.part2\.part3\.part4\.com:8082/sap\(bD1FTiZjPTUwMCZpPTEmZT1WRVZUVkY5Rk1rVkJWVlJQTVRJM01USmZWY3gxMlR4aUNVRGhBSUFBQ2hvd2NnJTNkJTNk\)/bc/bsp/sap/crm_ui_frame/bspwdapplication\.do\?popup-name=_POPUP0001&wcf-request-ticket=929D13152F6D62ACF1AB51BD8BDC2819
But still is not identifying.
rourl="http://part1\.part2\.part3\.part4\.com:8082/sap\(bD1FTiZjPTUwMCZpPTEmZT1WRVZUVkY5Rk1rVkJWVlJQTVRJM01USmZWY3gxMlR4aUNVRGhBSUFBQ2hvd2NnJTNkJTNk\)/bc/bsp/sap/crm_ui_frame/bspwdapplication\.do\?popup-name=_POPUP0001&wcf-request-ticket=929D13152F6D62ACF1AB51BD8BDC2819"
Browser("SAP - [Search: Accounts]").Window("Select Transaction Type").Page("Select Transaction Type").Frame("url:="&rourl).GetROProperty("html id")