mirror of
https://github.com/TracksApp/tracks.git
synced 2026-03-08 05:32:37 +01:00
Introduced user-extensions.js file for selenium to clean up a few selenium tests. This is a powerful concept and could be used to really help the clarity and maintainability of the selenium tests in the future.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@585 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
parent
c6b3e1c0b8
commit
5cb42946c1
4 changed files with 54 additions and 4 deletions
24
tracks/vendor/selenium/scripts/user-extensions.js
vendored
Normal file
24
tracks/vendor/selenium/scripts/user-extensions.js
vendored
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
/*
|
||||
* By default, Selenium looks for a file called "user-extensions.js", and loads and javascript
|
||||
* code found in that file. This file is a sample of what that file could look like.
|
||||
*
|
||||
* user-extensions.js provides a convenient location for adding extensions to Selenium, like
|
||||
* new actions, checks and locator-strategies.
|
||||
* By default, this file does not exist. Users can create this file and place their extension code
|
||||
* in this common location, removing the need to modify the Selenium sources, and hopefully assisting
|
||||
* with the upgrade process.
|
||||
*
|
||||
* You can find contributed extensions at http://wiki.openqa.org/display/SEL/Contributed%20User-Extensions
|
||||
*/
|
||||
|
||||
// All get* methods on the Selenium prototype result in
|
||||
// store, assert, assertNot, verify, verifyNot, waitFor, and waitForNot commands.
|
||||
// E.g. add a getTextLength method that returns the length of the text
|
||||
// of a specified element.
|
||||
// Will result in support for storeContextCount, assertContextCount, etc.
|
||||
Selenium.prototype.getContextCount = function() {
|
||||
return this.browserbot.getCurrentWindow().$$('.context').length;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue