How do I enter data into a web page?

I have a Base table with first and last names. For each row, I need to open a URL, enter the names in their respective fields on the page and trigger a Search button. At a minimum I need to send text to the screen. If possible, I would like to load the HTML fields directly and trigger the Search button. (I’ll tackle the content extraction of the result later!)

There are different ways to get (and receive) data from the web in LO, but unless you have a specific link to a particular page you most likely will have to use a macro for the process. This seem to be the case for what is asked in your question. Here are a couple of different methods.

Most sites which require further information just pass that information along with the original URL. Case in point - Going to this site, you enter a word/phrase in the text box, and then enter to get the results. But if you enter the URL -"Hello" to begin with, it immediately returns the definition for ‘hello’. To do this in a macro:

sString = "Hello"
Shell "firefox" & sString

This uses the Shell command to display the specific URL result in Firefox. Nothing else needed.

Another method is to transmit and receive back information to be further processed. This can be done with WEBSERVICE using FILTERXML. For results on this (calc display) see this post - click here.

This is also possible to accomplish in a macro making it available in Base. The problem here is that it became broken somewhere after LO v5.2.0.4 and still hasn’t been fixed or touched as of today. When working this may be exactly what you need. See this post - click here.

There is one more process I have run across. Get the required returned page in the browser (as in first mentioned process) and then scan the page information for what you need to process. See this post - click here.

Using the Shell code above in a macro resulted in a “BASIC runtime error. File not found” error. I am using Version: on a Mac with Sierra with Firefox application loaded. Thanks.

You get that error when the program cannot be found. Either the name is misspelled or it is not in your Path statement. As I am not familiar with Mac, this post may help - click here. I have had no problem with this or similar statements on Linux Mint or even if I change to ‘google-chrome’.