我需要在下面的代码中通过id或类获得一个元素,我相信这是在function getActualWords(node) {部分,我尝试了使用function getActualWords(".newsitem_text").get(0),但没有成功。这个类是newsitem_text,这里是,下面是代码:// from the supplied textNode (though this should work for
f
element = new WebDriverWait(firefoxDriver, 20).until(ExpectedConditions.presenceOfElementLocated(new By.ByClassName("button_id"))); String title = String.valueOf(js.executeS