This XPath is not working as intended, unsure as to what may be causing it to not work as intended. Here is the code snippet.
<thead>
<tr><th>
<a href="ContractSearchResults.m"> Contract Number</a></th>
driver.findElement(By.xpath("//table/thead/tr/th/a
[text()='Contract Number']"));