I'm attempting to automate a repetitive data-entry task on a webpage. I need to enter text into a series of text fields that appear in a sidebar, which means that I have to
- click on the visible text field
- send text data from Excel to that text field
- click on a button so that the next text field is displayed
- repeat 1-3
The problem is that in this particular case I have to log in to the webpage manually, so Excel doesn't have control of the browser, which means that I can't use most of the Selenium commands.
I managed to enter some of the data into different region of the webpage using the AppActivate statement and a series of SendKeys commands:
AppActivate ("Title")
Dim cellValue As Variant
cellValue = Range("B2").Value
SendKeys cellValue, True
SendKeys "{DOWN}"
cellValue = Range("B3").Value
SendKeys cellValue, True
SendKeys "{DOWN}"
I tried to rig up something like this for the text fields mentioned above, but SendKeys won't TAB over to the sidebar (despite the fact that I can TAB over manually).
I don't care at all if the solution is odd or inelegant, as long as it works! I'm new at this, so I may be making obvious mistakes and/or overlooking an obvious solution.