Two objects with same properties except for one part of the outerhtml changing - 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: Two objects with same properties except for one part of the outerhtml changing (/Thread-Two-objects-with-same-properties-except-for-one-part-of-the-outerhtml-changing) |
Two objects with same properties except for one part of the outerhtml changing - reejais - 10-11-2010 Hi All, This is what I do while testing 1. I land on a page. 2. click on a profile ID (There are many profiles on the same page and I am taking profile ID from data table) 3. When I click on the profile ID the details of the profile is displayed. 4. now I have to click the edit button of that profile ID to edit it. My problem is as follows. 1. The details of all the profile ID is already present on the same page one after the other after all the profile ID list. 2. Now every profile ID has same name "Edit" to edit the profile. 3. All the properties of this edit button is also the same except for a part of outerhtml that gives the profile "ID". Something like this outerhtml = <A href="manage_sp_edit.htm?serviceProfileId=1000029">Edit</A> Can anyone please tell me how do I capture this SP ID while clicking the profile and use it while clicking the edit button. Is it possible? If no then is any other way? RE: Two objects with same properties except for one part of the outerhtml changing - KavitaPriyaCR - 10-11-2010 Hi How about the Id=1000029? I mean in the line u have given as: outerhtml = <A href="manage_sp_edit.htm?serviceProfileId=1000029">Edit</A> Is it static for corresponding Profile ID OR changes/generated dynamically? If it is static, take that as advantage to parameterise (Use regular expression), else pls gve some more info regarding this RE: Two objects with same properties except for one part of the outerhtml changing - reejais - 10-14-2010 Actually My problem goes like this. Steps 1. I am taking the name of the profile from an external file. 2. Using that profile name to click on that particular profile. 3. then that profile's details comes into focus. 4. I have to click the edit button of that particular profile. Now my problem is 1. The Profile name list, Profile details of each profile is on the same page. 2. Now when I record the edit button with profile 1 whenever I run the script with other name it clicks on profile 1 edit button. 3. I tried defining the object at runtime using visible = True and hideFocus = False property but it still saying more that one object matching. 4. The problem is that the edit buttons have same properties except for wat I have mentioned in the above post. The ID is generated when a profile is created. There is no property which defines just the ID. I hope I am clear this time. I still cannot find a solution to it. RE: Two objects with same properties except for one part of the outerhtml changing - rajeshwar - 10-14-2010 Please See if you can make use of index or Location. RE: Two objects with same properties except for one part of the outerhtml changing - KavitaPriyaCR - 10-19-2010 Is it working by using index? RE: Two objects with same properties except for one part of the outerhtml changing - reejais - 10-22-2010 They dont have an index value populated for Edit button it is NONE now. Anyways we have asked dev team to put a unique field which has a link between profile name and edit button of that profile name. For now we use "tab" to go to that particular edit button once the page is profile details is displayed. Thank you very much for all the help. Regards, Reema. |