CLICKING ON A HYPERLINK WHICH IS NUMBER IN THE TOTAL COLUMN, NUMBER KEEPS GETTING UPDATED EVERY TIME
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
CLICKING ON A HYPERLINK WHICH IS NUMBER IN THE TOTAL COLUMN, NUMBER KEEPS GETTING UPDATED EVERY TIME
CLICKING ON A HYPERLINK WHICH IS NUMBER IN THE TOTAL COLUMN. NUMBER KEEPS GETTING UPDATED EVERY TIME A REPORT IS GENERATED.
I need to click on this link to move to next page.
So in one session the link may be a 21 and next session the link may be 50 as many users are generating reports.
It may remain teh same too if noone has generated a report.
How do we handle this scenario.
Test Complete records it as
Aliases.browser.pageFred01.table.cell.table.cell5.link399
The 399 is ahyperlink in a total column which is changing.
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That's a prime example of "dynamic properties". I'm guessing you're using the number, somehow, in the property of the link that you need to click on.
Rather than using that number, try replacing it in your name mapping with an asterisk (*) character in the property itself. Or, perhaps see if there are other properties you can use to map the object that do not include the number.
Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.
Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Added a screenshot of the property added in name mapping.
1.Link
2.<a href="index.cfm?fuseaction=MEDFR.EngineerList&cdate=ALL&stid=1&apid=2">398</a>
3. Sys.Browser("iexplore").Page("http://fred01/index.cfm?fuseaction=Navigation.Home&CFID=360414&CFTOKEN=1756a39ef7aad8ec-1A0EB420-C297-FF45-78FAD9E31D15911C").Table(1).Cell(3, 0).Table(0).Cell(131, 3).Link(0)
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Remove the "FullName" property from your mapping. That's unnecessary, redundant, and, in fact, bypasses the benefits of the NameMapping engine entirely.
I would go one of three ways with this.
1) Replace the "398" in your outerHTML property with an asterisk (*) as that is the dynamic part of the link. That's changing from run to run so if you replace with an asterisk, it will find any objects that match the whole string with that segment being variable.
2) If you can guarantee that you're running just internet explorer and only that browser, you can use the "href" property which will map with the string for the href as shown in the OuterHTML. This is, I'm assuming, unique in the cell in question
3) In that cell, if there are no other links in the cell... then just using the ObjectType property is all you need and remove the rest. It's the only link, so it will match the object with the simplest set of object properties.
Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.
Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Remove the "FullName" property from your mapping. That's unnecessary, redundant, and, in fact, bypasses the benefits of the NameMapping engine entirely.
DONE
I would go one of three ways with this.
1) Replace the "398" in your outerHTML property with an asterisk (*) as that is the dynamic part of the link. That's changing from run to run so if you replace with an asterisk, it will find any objects that match the whole string with that segment being variable.
How do I edit this with an Asterisk?
2) If you can guarantee that you're running just internet explorer and only that browser, you can use the "href" property which will map with the string for the href as shown in the OuterHTML. This is, I'm assuming, unique in the cell in question
ONLY IE is the browser.
3) In that cell, if there are no other links in the cell... then just using the ObjectType property is all you need and remove the rest. It's the only link, so it will match the object with the simplest set of object properties.
NO Other links in that cell.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'd go with #3 then. Just delete all other properties from the NameMapping for the object and just use the "Link" property. It's the only link there and you already have the cell mapped... nothing else needed.
Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.
Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
