Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Web browser and others
Message
From
04/06/2017 12:37:34
 
 
To
02/06/2017 07:24:48
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Miscellaneous
Thread ID:
01651737
Message ID:
01651776
Views:
74
>>>We have the WebBrowser control to display HTML based pages in VFP. Are there any other display controls based on other web browser interfaces (Firefox, safari, chrome,etc)?
>>
>>AFAIK only IE (Edge) has an interface which you can use from VFP.
>
>Good luck, bad luck, who knows.
>I just surprised that there is no competition there. There is in everything else.

In rather distant past there was a project to give Firefox a COM interface similar to IE5 (I think that one was it, not certain). The project did reach some milestones like Navigate2, but AFAIR was never completed and probably is not supported anymore. Pretty certain that you can find it if you look far back, but would not base any effort of mine on it.


That said, in the last decade I revisited my roboting via MSHTML twice. Second time around the writing on the wall on COM, IE and vfp was clearly visible, so I switched from an embeddable HTML control to a form able to automate an IE instance, with buttons, debug help and other kinks my roboting forms used to have.

Reason was that I wanted to be able to exchange other browsers for IE, as newer versions showed some kinks and support for IE6 (more stable in COM automation, at least based on my old code) on the net was disappearing.

Perhaps your need can be rephrased to use an automated browser: on that front a whole group of routines, some would say frameworks has grown. Name springing to mind is Selenium, Google search hints would be "automating browser", "cross-browser test/validation", "selenium alternatives". With some glue such a process window could be eventbound to a form if a control-like appearance is needed.

Some of those tools have a web server in the loop, but AFAIK at least Selenium can be configured as pure client solution.
In Selenium you can automate in many languages, JS as first citizen and a lot more. I personally have not looked for a stable JS/COM bridge, which would require only a single marshalling step to connect to vfp code and therefore be the easiest/most simple solution.

But among the other languages are Python and Java, and I used COM to bind large vfp parts to those languages, and it worked without real problems even on machines of a dozen years ago.

I would search for a stable JS-COM bridge for at least a day, before basing a significant SW attempt with a bridge utilizing either JVM or Python runtime JUST FOR BRIDGING. Adding the JVM into the loop will more than double memory footprint and load times (VERY bad back then), but JACOB was rock solid. Newer versions / names should be around this time. Python COM interchange with vfp was much nicer as Python is a dynamically typed language as well, so the amount of glue code was significantly less and turnaround time was faster. If you cannot find a JS/COM bridge stable enough and no Java is currently in the project, I'd argue for Python. Good documents found back then, a OReilly book probably out of print now (blue, with alligator as animal theme, Python on Win32) helped as well. You can probably find it in a library or buy a used one for pennies at Amazon.

If you decide to follow that path, pls. keep me posted here or directly - I might come across such a project again and leaping research effort is always welcome ;-))

HTH

thomas
Previous
Reply
Map
View

Click here to load this message in the networking platform