以下是我要点击的范围。 id中的数字序列正在动态变化。
<span id="actionsButton__o3uid5535_label" class="dijitReset dijitInline dijitButtonText" data-dojo-attach-point="containerNode,_popupStateNode">Actions</span>
所以我试着用..
WebDriverWait wait = new WebDriverWait(driver, 10);
WebElement el = wait.until(ExpectedConditions.presenceOfElementLocated(By.xpath(".//span[contains(text(), 'Actions')]")));
((JavascriptExecutor)driver).executeScript("arguments[0].click()", el);
但没有成功。
有人可以帮我找到解决这个问题的方法