Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

Commit 75545c4

Browse files
committed
For specs run with the protractor binary, move the singleton grabber
inside a beforeEach block. This may help #14
1 parent b15b7bd commit 75545c4

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

example/onProtractor.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@ var protractor = require('../lib/protractor.js');
33

44

55
describe('angularjs homepage', function() {
6-
var ptor = protractor.getInstance();
6+
var ptor;
77

88
it('should greet using binding', function(done) {
9+
ptor = protractor.getInstance();
10+
911
ptor.get('http://www.angularjs.org');
1012

1113
ptor.findElement(protractor.By.input("yourName")).sendKeys("Julie");

spec/testAppSpec.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,10 @@ it = function(desc, testFn, timeout) {
1919
}
2020

2121
describe('test application', function() {
22-
var ptor = protractor.getInstance();
23-
22+
var ptor;
2423
describe('finding elements in forms', function() {
24+
ptor = protractor.getInstance();
25+
2526
beforeEach(function() {
2627
ptor.get('app/index.html#/form');
2728
});

0 commit comments

Comments
 (0)