Skip to content

Commit

Permalink
test webview implicit attributes as well
Browse files Browse the repository at this point in the history
  • Loading branch information
jlipps committed Apr 5, 2013
1 parent 69e48fc commit e11294d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/templates/guinea-pig.html
Expand Up @@ -27,6 +27,11 @@ <h1>This page is a Selenium sandbox</h1>
</p>
<input type="checkbox" id="unchecked_checkbox" name="unchecked_checkbox"/>
<input type="checkbox" id="checked_checkbox" name="checked_checkbox" checked="checked"/>
<select name="selectbox">
<option value="value1">First option</option>
<option value="value2">Second option</option>
<option value="value3">Third option</option>
</select>

</form>
<span id="your_comments">
Expand Down
13 changes: 13 additions & 0 deletions test/helpers/webview.js
Expand Up @@ -170,6 +170,19 @@ module.exports.buildTests = function(webviewType) {
});
});
});
it('should return implicit attributes', function(done) {
loadWebView(h.driver, function() {
h.driver.elementsByTagName('option', function(err, els) {
should.not.exist(err);
els.length.should.equal(3);
els[2].getAttribute('index', function(err, attrVal) {
should.not.exist(err);
attrVal.should.equal('2');
done();
});
});
});
});
});

desc('getText', function(h) {
Expand Down

0 comments on commit e11294d

Please sign in to comment.