Selenium allows its functionality to be extended to provide additional features.
UI-Elements is an extension for the Selenium IDE and Remote Control that makes it possible to define a mapping between semantically meaningful names of elements on webpages, and the elements themselves.
e.g. instead of having a ‘click’ statement of
selenium.Click( “//ul/li[contains(@class, 'sharedspacespwd')]/a”);
It could be written:
selenium.Click( “ui=allPages::MySharedSpace()”)
This is VERY important as:
1. It makes the tests much more readable
2. It substantially reduces the maintenance overhead of the tests – e.g. if a link on the page changes, only the elements file would normally need to be updated, as opposed to having to update a large number of tests. It also makes it easier to define ‘locators’ for elements that are less likely to change.
The great thing about UI-elements is that it works with Selenium IDE, so when you record your tests, the UI-Element names are automatically recorded for use in your tests.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment