【发布时间】:2020-04-30 05:38:47
【问题描述】:
只有当它具有“aria-checked ="true"”时,我才需要单击此输入
<input class="mat-checkbox-input cdk-visually-hidden" type="checkbox" id="mat-checkbox-131-input" tabindex="0" aria-checked="true" style="" xpath="1">
鲁比:
aria_checked = true
if aria_checked = true
impressora_etiqueta = "//mat-checkbox[@id='mat-checkbox-23']/label/div"
page.find(:xpath, impressora_etiqueta).click
end
【问题讨论】:
-
您可以在查询中包含选择器
[aria-checked]
标签: ruby rspec cucumber capybara