I have text,which is not enclosed inside any of the HTML tag but is wrapped in between two HTML tag as shown in below image, how do I get the value 38 in this case, through selenium in java.
below is my code, which I tried but it's only giving the label value of
<b> attribute and not the desired value i.e. 38 in this case
String ageAtAdmission=driver.findElement(By.xpath("//a[@name='profile']//b")).getAttribute("innerHTML"); AR_Utils.logMsg("Age at Admission "+ageAtAdmission);
OUTPUT : Age at Admisson Age at Admission