Hi I'm trying to select the name "Saleem" from the HTML. It is inside a table, but I don't know how if that is relevant. The name might not always be there, so I'm trying to find a way to select the element if the name is included in the table. For example "Liam" does not appear when searched, but "saleem" does. How do I click the link that appears when saleem is searched? For some reason, Selenium can't find the element with the code I wrote below.
Here is the website (I just put Saleem in the name category and searched): https://sanctionssearch.ofac.treas.gov/default.aspx
I tried the code below, but unfortunately does not work.
driver.find_element_by_id("btnDetails").click()
<a> id="btnDetails" href="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl00$MainContent$gvSearchResults$ctl02$btnDetails", "", false, "", "Details.aspx?id=5839", false, true))" style="color:Blue">AL-IFRI, Saleem </a>
Any help is appreciated!