Re: Euphoria CGI
- Posted by jmduro Apr 22, 2017
- 3990 views
Here is the basic principle of the web display server:
- The OpenEuphoria program acts as a client to send orders to the display server and as a server to listen for events.
- Each command (for example Create Button) is sent as a POST request to the Web display server on a dedicated port, let's say 10000.
- The server updates the page and sets the Refresh field in the header.
When the user submits a form, the client program does not know anything happened, so the server has to send a frame to inform the client program.
The problem is that a browser is needed to display pages. Either we need to write a browser in Euphoria or we need to drive a browser with Euphoria.
Second option needs:
- either a wrapper on the selenium2 library (www.seleniumhq.org)
- or to drive Firefox through MozREPL (addons.mozilla.org/fr/firefox/addon/mozrepl)
- or to drive geckodriver (github.com/mozilla/geckodriver) or chromedriver (sites.google.com/a/chromium.org/chromedriver) via WebDriver's wire protocol
I already tried different ways to drive a webbrowser via Euphoria but I have never been able to get it work as I needed. WebDriver's wire protocol seems to be the way to go but I was not able to communicate correctly with either chromedriver or geckodriver because of missing information in headers or whatever else.
Jean-Marc