【发布时间】:2018-02-01 19:27:01
【问题描述】:
我的 Selenium Web 驱动程序没有单击此树节点。我不确切知道我们所说的树节点或其他东西,所以这是图像,我突出显示了元素。
我要点击的右箭头部分
这是我的代码:
//wait.until(ExpectedConditions.elementToBeClickable(By.id("iconDiv")));
WebElement taskdropElementid = driver.findElement(By.id("iconDiv"));
System.out.println(taskdropElementid.getAttribute("class"));
if(taskdropElementid.getAttribute("class").equals("RightArrow"))
taskdropElementid.click();
打印语句给了我输出下拉菜单。我认为它应该给 RightArrow 并且当我取消注释等待部分时,它会不断等待元素可点击。
我做错了什么?
【问题讨论】:
标签: selenium drop-down-menu automation treenode