考虑以下HTML
示例:
<select class="form-control form-input-toggle ng-pristine ng-invalid ng-invalid-required ng-touched" ng-model="form.fields['ReportingParty.Contact.Title.Text'].value" ng-change="run()" required="" ng-disabled="!editable(form)">
<option value="">Select...</option>
<optgroup label="----------">
<option value="MR">Mr</option>
<option value="MRS">Mrs</option>
</optgroup>
<optgroup label="----------">
<option value="2LT">Second Lieutenant</option>
<option value="AB">Able Seaman</option>
<option value="ABBOT">Abbot</option>
</optgroup>
</select>
如何选择值作为MR
,或Second Lieutenant
使用 WebdriverIO?
我试过使用.selectByValue([ng-model="form.fields[\'ReportingParty.Contact.Title.Text\'].value "], "MR" )
,但没有用。