I am trying to select a textbox and enter text in it through selenium web driver. The html is as follows:
</div><div>
<input name="mLayout$ctl00$ctl00$6$16$ctl00$Database" type="text" value="Enter database name" maxlength="175" size="26" id="mLayout_ctl00_ctl00_6_16_ctl00_Database" accesskey="s" title="Go search this database" class="InputContent GhostText" onfocus="SearchBoxOnFocus('mLayout_ctl00_ctl00_6_16_ctl00_Database');" onkeypress="if(!__TextBoxOnKeyPress('mLayout$ctl00$ctl00$6$16$ctl00$GoButton',event.which)) { return false; }" /> <input type="image" name="mLayout$ctl00$ctl00$6$16$ctl00$GoButton" id="mLayout_ctl00_ctl00_6_16_ctl00_GoButton" title="Go search database" src="http://images-statcont.westlaw.com/images/go_v602.gif" alt="Go search database" align="absmiddle" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("mLayout$ctl00$ctl00$6$16$ctl00$GoButton", "", true, "", "", false, false))" style="height:18px;width:21px;border-width:0px;" />
</div><div>
I've tried the following
driver.find_element_by_id("mLayout_ctl00_ctl00_6_16_ctl00_Database")
driver.find_element_by_name("mLayout$ctl00$ctl00$6$16$ctl00$Database")
dbElement = WebDriverWait(driver, 20).until(lambda x : x.find_element_by_id("mLayout_ctl00_ctl00_6_16_ctl00_Database"))
Is there something special about the $ and _ characters is the fields? Why can't selenium locate these elements?