|
1 | 1 | selenium-global
|
2 | 2 | ===============
|
3 | 3 |
|
4 |
| -Adds Selenium constructors to global. Useful with `mocha -r selenium-global 'test/browser/**/*.js';` etc. |
| 4 | +Adds Selenium constructors to global. |
| 5 | + |
| 6 | +##Example |
| 7 | +We can run mocha suites I.E. <code>mocha -r selenium-global -r should 'test/**/*.js'</code> |
| 8 | + |
| 9 | +Here's what the suite looks like: |
| 10 | +````javascript |
| 11 | +describe("selenium-global", function(){ |
| 12 | + it("exports Selenium objects to global", function(){ |
| 13 | + driver.get('http://google.com'); |
| 14 | + }); |
| 15 | + |
| 16 | + it("allows us to forget about setup", function(){ |
| 17 | + driver.findElements(By.name('q')).length.should.equal(1); |
| 18 | + }); |
| 19 | + |
| 20 | + before(function(){ |
| 21 | + driver = new ChromeDriver; |
| 22 | + }); |
| 23 | + |
| 24 | + after(function(){ |
| 25 | + driver.quit(); |
| 26 | + }); |
| 27 | + |
| 28 | + var driver; |
| 29 | +}); |
| 30 | +```` |
| 31 | + |
| 32 | +##Licence |
| 33 | +```` |
| 34 | +The MIT License (MIT) |
| 35 | +
|
| 36 | +Copyright (c) 2014 Joseph Spencer |
| 37 | +
|
| 38 | +Permission is hereby granted, free of charge, to any person obtaining a copy |
| 39 | +of this software and associated documentation files (the "Software"), to deal |
| 40 | +in the Software without restriction, including without limitation the rights |
| 41 | +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 42 | +copies of the Software, and to permit persons to whom the Software is |
| 43 | +furnished to do so, subject to the following conditions: |
| 44 | +
|
| 45 | +The above copyright notice and this permission notice shall be included in |
| 46 | +all copies or substantial portions of the Software. |
| 47 | +
|
| 48 | +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 49 | +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 50 | +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 51 | +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 52 | +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 53 | +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
| 54 | +THE SOFTWARE. |
| 55 | +```` |
0 commit comments