Created
August 14, 2017 13:21
-
-
Save joelwatson/659e2e735377148446a04336058b5e16 to your computer and use it in GitHub Desktop.
Choose HTML <select> option
This file contains 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
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select |
This file contains 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("HTML Select", function() { | |
it('should choose 3rd option', function () { | |
// inspect here | |
var locator = '[name=select]'; | |
ST.defaultContext.driver.selectByVisibleText(locator, 'Value 3'); | |
ST.element(locator) | |
.down('option:nth-child(3)') | |
.get('selected') | |
.wait(3000) | |
.and(function () { | |
expect(this.future.data.selected).toBe(true) | |
}); | |
}) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment