Just starting to learn selenium using python and running into trouble with the basics of finding elements. This is a search/text box that I am trying to click into and send text to it.
Here is the code of the element I got from Edge.
<div class="box" id="ClinicSrch" style="display:block">
<span align="lb">Last:</span>
<input type="search" name="NameLast" size="15" class="white1" value="" maxlength="25">
First: <input type="search" name="NameFirst" size="15" class="white1" value="" maxlength="25"><br>
Here is my code:
driver.find_element(By.XPATH, '//*[@id="ClinicSrch"]/input[1]').click()
The xpath that I get when copying the element from edge inspect tool is:
//*[@id="ClinicSrch"]/input[1]
Full xpath is:
/html/body/form/div[1]/div[1]/input[1]
I've been trying with other fields and buttons where I have similar xpaths but nothing is working. I always get no such element.