I recently needed to update an old FoxPro legacy application that uses Internet Explorer Automation to drive the content of a Web page by clicking some href links and entering data into a form and submitting.
This used to work just fine but checking on recent versions of Windows with IE 11 (windows 10) and also with IE 10 (Windows 7) I'm seeing that any click event calls on elements have no effect and they fail silently - no error, but also no click.
o = CREATEOBJECT('InternetExplorer.Application')
o.visible = .t.
o.Navigate('http://test.com/ControlBasics.wcsx')
wait window 'page loading...' timeout 1.5
* Target object has no id so navigate DOM to get object reference
oLinks = o.Document.getElementsByTagName('a')
oLink = oLinks.item(0)
oLink.Click()
* o.navigate(oLing.href) && works but not sufficient
o.document.getElementById('txtName').value = 'Rick'
oButton = o.document.getElementById('btnSubmit')
oButton.Click()
In the code above neither of the .click() event triggers have any effect. The assignment to the textbox however works fine, so the page is scripted.
Does anybody know what has changed or what might affect the behavior so that automating event code that previously worked no longer works?