我有应用按钮的问题。我有组合框过滤器,一切都很好,它是在square之间切换的。但是当它想要应用时,不知何故,它只是继续,因为它没有被选择任何东西,并且测试成功完成,但没有我需要的过滤。Selenium应用按钮无法在组合框上工作?
有人可以用检查器错误检查我的代码和部分。也许我错过了什么?
我的Java代码:
if (type.equals("")) {
elementList = driver.findElements(By.xpath("//div[@id='" + id + "_menu']//a[@class='FIText']"));
if (elementList.size() > 0) {
if (driver.findElements(By.xpath("//div[@id='" + id + "_menu']//div[@class='CFApplyButtonContainer']//button[@class='tab-button']//span[@class='label'][text()='Apply']/..")).size() > 0) {
type = "multi_checkbox_with_apply";
}else {
type = "multi_checkbox_without_apply";
}
}
}
检查错误:
<div class="CFApplyButtonConatiner" style="height: 21px;">
<button class="tab-button tab-widget disabled" type="button" style="max-width: 56px" disabled="">
<span class="icon"></span>
<span class="label">Cancel</span>
</button>
<button class="tab-button tab-widget focus disabled" type="button" style="max-width: 56px" disabled="">
<span class="icon"></span>
<span class="label">Apply</span>
</button>
有人可以检查此吗? 我不知道为什么它不工作?也许有人知道如何测试它。
BR, Marija的
如果你认为这有帮助请给大拇指! –