<input name="namedDriverGivenName" class="form-control ng-invalid ng-invalid-required ng-dirty" id="namedDriverGivenName" required="required" type="text" placeholder="Required" data-ng-model="namedDriver.FirstName" data-ng-required="true">
当我在watir-webdriver'b.text_field(:name,'namedDriverGivenName')中编写以下代码时,前面提到的文本框有用。设置'raj'但是相同的代码在watir-classic中不起作用,任何人都可以请指导我可能是什么问题?
修改
<input name="mainContactPolicyholder" class="form-control ng-pristine ng-valid ng-valid-required" id="mainContactPolicyholder" required="required" type="text" maxlength="8" placeholder="Required" data-ng-model="phContact.PrimaryPhoneNumber" data-ng-required="true" minlength="8" data-da-hk-mobile-no="">
<input name="emailReEnterPolicyholder" class="form-control ng-isolate-scope ng-invalid ng-invalid-required ng-valid-email ng-dirty ng-valid-da-confirm-input" id="emailReEnterPolicyholder" required="required" type="email" placeholder="Required" data-ng-model="phContact.PrimaryEmailAddressReenter" data-ng-required="true" data-prevent-cut-copy-paste-input="" data-da-confirm-input-field-to-compare="phContact.PrimaryEmailAddress" data-da-confirm-input="">
把b.text_field(:id,'mainContactPolicyholder')存在? =&GT;真
put b.text_field(:id,'emailReEnterPolicyholder')。存在? =&GT;假
以上两个文本框存在于我的页面中,但第一个给出结果为true,第二个给出结果为false,但是当我使用Watir-Webdriver时,它正确识别两个文本框,为什么会这样?
答案 0 :(得分:0)
快速回答不是使用Watir经典。我们将很快更新文档,以表明其作为已弃用项目的状态。专注于让您的测试与Watir webdriver一起使用。