如何通过占位符在Protractor中定位元素

时间:2018-06-13 05:49:44

标签: protractor

如何通过占位符在Protractor中定位元素。我试过$(' [占位符=文章名称]')。click();

它显示错误"失败:选择器无效:指定了无效或非法的选择器"`



<input _ngcontent-c30="" class="mat-input-element mat-form-field-autofill-control ng-pristine ng-invalid ng-touched" matinput="" required="" maxlength="80" pattern="[A-Za-z0-9 ]{1,80}" id="mat-input-51" placeholder="Article name" aria-invalid="true" aria-required="true" aria-describedby="mat-error-0">
&#13;
&#13;
&#13;

`

0 个答案:

没有答案