隐藏元素无法通过gettext()获取其文本内容,须用javascript来获取
String actualDataPointName = (String) ((JavascriptExecutor) driver).executeScript(
"return jQuery(arguments[0]).text();", element);
时间: 2024-12-30 14:01:42
隐藏元素无法通过gettext()获取其文本内容,须用javascript来获取
String actualDataPointName = (String) ((JavascriptExecutor) driver).executeScript(
"return jQuery(arguments[0]).text();", element);