-
-
Save carlitoescobar/88103c3833065ced274a39f259ca522d 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