如何获取此元素的文本:
<div class="status-value" id="divdoctyp" xpath="1">AADHAAR CARD</div>
我尝试过此
WebElement doctype= driver.findElement(By.xpath("//div[@id='divdoctyp']"));
String type=doctype.getAttribute("type");
String label=doctype.getText();
Thread.sleep(5000);
System.out.print("doctype is "+type +"\n"+label);
要从元素中提取文本AADHAAR CARD