webdriver io - Webdriverio -- Elements doesn't work -
i trying use elements array of elements, doesn't work here.
any 1 can me that? lots.
here code:
<select name="test" id="select"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> </select> now trying option elements:
client.url('www.somesite.com')   .elements('#select>option').then(function(res){        console.log(res.length);     }) but got 'undefined' result 'res.length' .
if use gettext can correct result:
 client.url('www.somesite.com')   .gettext('#select>option').then(function(res){        console.log(res.length);     }) 
you need access value property.
console.log(res.value.length); 
Comments
Post a Comment