I'm writing an Excel VBA macro using Selenium and Chromedriver. The following code successfully opens Chrome to the desired webpage and then enters an address in the search text box. For the detailed information for that address to appear you need to press the "Enter" key (try it manually). You can see in the code below the various code approaches I've tried to press "Enter" but with no success. How can I press the "Enter" key programmatically and have the address information appear on the webpage?
Dim WDriver As New WebDriver
Sub Q_Streets_TxtBox()
' Open Chrome and navigate to assessor's E-Mapping webpage
WDriver.Start "chrome", ""
WDriver.Get "https://maps.boco.solutions/propertysearch/"
WDriver.Window.Maximize
Application.Wait (Now + TimeValue("0:00:07"))
acct_addr = "1327 AGAPE WAY"
' Focus, clear the text box and enter the acct address
WDriver.FindElementById("searchField").SendKeys ("") ' focus
WDriver.FindElementById("searchField").Clear
WDriver.FindElementById("searchField").SendKeys acct_addr
' Press the "Enter" key - the following attempts failed
' WDriver.FindElementById("searchField").SendKeys Keys.Enter
' WDriver.FindElementById("searchField").submit
' WDriver.FindElementById("searchField").SendKeys (Keys.Enter)
' WDriver.FindElementById("searchField").Click
' do stuff
End Sub
1327 AGAPE WAYin the search field and1327 AGAPE WAY LAFAYETTEappears in the list, is that what you want?