Created
November 20, 2014 04:33
-
-
Save brennon/12b449bc6a5c223ef230 to your computer and use it in GitHub Desktop.
Protractor conditional testing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe('conditional testing', function() { | |
it('should be able to test conditionally', function() { | |
browser.get('http://www.angularjs.org'); | |
element(by.css('.theresnowaythisclassexists')).then( | |
function elementExists() { | |
expect(false).toBe(true); | |
}, | |
function elementDoesNotExist() { | |
expect(true).toBe(true); | |
} | |
); | |
element(by.css('html')).then( | |
function elementExists() { | |
expect(true).toBe(true); | |
}, | |
function elementDoesNotExist() { | |
expect(false).toBe(true); | |
} | |
); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment