Forum Discussion
- Philip_BairdCommunity ExpertHi, just as a matter of interest, I thought I would share an approach we used based on the Selenium Page Object, where a single Class is used to model and control access to a Web Page under test, to provide access to UI Screenss under test in our JScript Script Units.
This approach mitigates, to an extent, the issue of having to maintain multiple Scripts when changing an Alias by minimising the points in code where an Alias is referenced.
1. A model for each Screen in the application under test is created as a JScript prototype.
2. Access to each control is controlled by fields and functions defined as part of the JScript prototype, this includes references to Aliases.
3. Then, if a test script needs to drive a Screen, it creates an instance of the JScript prototype and drives the screen via that instance, this provides the following benefits:
i. A level of control over how controls on a Screen can be accessed
ii. Aliases are only referenced ONCE in the entire code base
This means, if an Alias is changed, there is only a single point in the code base, the JScript prototype, that needs to be changed.
As long as they use the JScript prototypes, the Test Scripts themselves will not require any changes.
If they do not use the JScript prototypes, well, then the developer gets a severe rap over the knuckles and a support to ticket to change the code so they do ;)
Regards,
Phil Baird
Hi,
We have such a suggestion in our database, and your request has increased its rating.- gentleseaFrequent Contributor
Still the same problem in the new version.
Hello Ernst,
The requested functionality has not been implemented yet. Currently, we cannot provide any time estimates regarding when the feature will be implemented. Your request has increased its rating. Thank you.- AKarandjeffContributorI'll second that request. I'm primarily doing script based test cases and it's a bit of a pain to track down where the aliases exist across multiple scripts. If I keep posting replies, will the rating increase to the point that it will be delivered tomorrow? :)
Hello Andrew,
Your request has increased the suggestion's rating. Thank you. However, one person can increase the rating only once.- Manfred_FRegular ContributorI'd also appreciate such a function..
- tonydugayContributorI vote for this too.
- Colin_McCraeCommunity HeroAnother vote from me.
- TanyaYatskovskaSmartBear Alumni (Retired)Hi Guys,
I've added your votes. Thanks!
Some clarification is needed here, thought. The references to the Name Mapping objects will be automatically updated in keyword tests. This suggestion is only about changes in the Script Editor.
Related Content
- 12 years ago
- 13 years ago
- 5 years ago
- 2 years ago
Recent Discussions
- 12 hours ago
- 12 hours ago