Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Two objects with same properties except for one part of the outerhtml changing
#1
Solved: 11 Years, 4 Months ago
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?
Reply
#2
Solved: 11 Years, 4 Months ago
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
Reply
#3
Solved: 11 Years, 4 Months ago
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.
Reply
#4
Solved: 11 Years, 4 Months ago
Please See if you can make use of index or Location.
Reply
#5
Solved: 11 Years, 4 Months ago
Is it working by using index?
Reply
#6
Solved: 11 Years, 4 Months ago
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. Smile

Thank you very much for all the help.

Regards,
Reema.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Page element keep changing chong67 4 4,648 11-08-2016, 09:17 PM
Last Post: Paul Rammone
  Part of parameters missing when passing between actions skumar007 1 3,012 10-10-2014, 02:00 AM
Last Post: skumar007
  Count and get the properties of different objects in a Java form riechan 0 3,011 07-16-2012, 06:03 AM
Last Post: riechan
  Changing QTP Class praveendasika 1 2,942 07-13-2012, 07:35 AM
Last Post: ravi.gajul
  Parameterizing a part of script itsnotmyid 3 3,483 08-09-2011, 09:02 AM
Last Post: parminderdhiman84

Forum Jump:


Users browsing this thread: 2 Guest(s)