Below is my element location, i need to find the id from this link.
<a href="bnf_view.aspx?QBnfId=BGOOE00003" class="case-hdr" xpath="1">Dean Ambrose</a>
Expecting this output-BGOOE00003
WebElement Clientlist = driver.findElement(By.xpath("//a[@id='MnClient']"));
Clientlist.click();
WebElement Clientclick = driver.findElement(By
.xpath("//*[@id='ctl00_MainContent_ctl00_RadGridList_ctl00__0']/td[2]/a"));
Clientclick.click();
Thread.sleep(2000);
String attribute = driver.findElement(By.xpath("//a[@class='case-hdr']")).getText();
//WebElement attribute= driver.findElement(Clienthover);
//String attribute = Clienthover.getAttribute("href");
System.out.println(attribute);