jmcwhinney
12 years agoContributor
Creating reusable functions for Navigation Menu in webpage
Hello,
I am trying to automate testing of an asp.net application
There are multiple pages which TestComplete creates Aliases for.
Aliases.browser.pageUserRegistration2
Aliases.browser.pageEpartstorePartsSearch
etc...
Each of these pages contains the same navigation menu.
I would like to create a function that allows me to click one of the navigation options regardless of which page I am starting from.
To make the function truly generic and usable at any time, I do not want to use a reference to a specific page within the function.
eg. Aliases.browser.pageEpartstorePartsSearch.navigationmenu.click()
I need to the function to be more like:
Aliases.browser.GenericPage.navigationmenu.click()
I tried creating a generic name mapping for this purpose, but then all future recordings start mapping to the generic name mapping.
Any suggestions?
Thanks!
- James
Is
I am trying to automate testing of an asp.net application
There are multiple pages which TestComplete creates Aliases for.
Aliases.browser.pageUserRegistration2
Aliases.browser.pageEpartstorePartsSearch
etc...
Each of these pages contains the same navigation menu.
I would like to create a function that allows me to click one of the navigation options regardless of which page I am starting from.
To make the function truly generic and usable at any time, I do not want to use a reference to a specific page within the function.
eg. Aliases.browser.pageEpartstorePartsSearch.navigationmenu.click()
I need to the function to be more like:
Aliases.browser.GenericPage.navigationmenu.click()
I tried creating a generic name mapping for this purpose, but then all future recordings start mapping to the generic name mapping.
Any suggestions?
Thanks!
- James
Is