Forum Discussion
fayrehouse
12 years agoFrequent Contributor
Hi Alexei,
Maybe I'm missing something still, but... I previously had auto name mapping turned off. To use templates, I had to turn mappng back on. I defined a template, and recorded a bit of our tested app functionality - clicking 2 links
This produced 2 mapped link objects, and aliases for each, with code such as
Aliases.browser.frame.link2.Click();
But:
a) looking at this code, it's not immediately obvious which link "link2" is - anyone reading would need to flick between the code and the object map
b) (most importantly here) - Im trying to write a function where I can specify the link label as a parameter, and the right link will be clicked eg:
Function ClickLinkOnScreen(linktext)
{
Sys.Browser().Page(******).Frame(******).Form(******).Panel("navigation").Link(linktext).Click();
}
Called like:
ClickLinkOnScreen("My Link Label");
Or have I just not used the template mapping correctly?
Maybe I'm missing something still, but... I previously had auto name mapping turned off. To use templates, I had to turn mappng back on. I defined a template, and recorded a bit of our tested app functionality - clicking 2 links
This produced 2 mapped link objects, and aliases for each, with code such as
Aliases.browser.frame.link2.Click();
But:
a) looking at this code, it's not immediately obvious which link "link2" is - anyone reading would need to flick between the code and the object map
b) (most importantly here) - Im trying to write a function where I can specify the link label as a parameter, and the right link will be clicked eg:
Function ClickLinkOnScreen(linktext)
{
Sys.Browser().Page(******).Frame(******).Form(******).Panel("navigation").Link(linktext).Click();
}
Called like:
ClickLinkOnScreen("My Link Label");
Or have I just not used the template mapping correctly?
Related Content
- 5 years ago
- 6 years ago
Recent Discussions
- 15 hours ago