Angular
Auto-Fill Angular Fields from VFP using Internet Explorer Automation
Gravatar is a globally recognized avatar based on your email address. Auto-Fill Angular Fields from VFP using Internet Explorer Automation
  MarshalR
  All
  Dec 3, 2018 @ 07:49pm

Am attempting to Auto-Fill-in an Angular 1.x Form from Visual FoxPro using Internet Explorer Automation. Can Set Values to Fields but need a way to trigger Angular's Change Event. Can this be done?

Gravatar is a globally recognized avatar based on your email address. re: Auto-Fill Angular Fields from VFP using Internet Explorer Automation
  Rick Strahl
  MarshalR
  Dec 6, 2018 @ 12:33am

You can probably trigger a blur() even by setting focus to another control then setting focus back to it. Basically Angular change detection kicks in when an event fires, so you need to trigger something on the control. You might also be able to trigger a KeyUp() event on the control, but not sure if that can be done directly. Worth a try.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Auto-Fill Angular Fields from VFP using Internet Explorer Automation
  MarshalR
  MarshalR
  Dec 9, 2018 @ 06:48pm

Hi Rick,

Thanks for your reply.

Even though no Error is Triggered, it appears that Focus Events don't work in Internet Explorer 11. Have Also attempted to directly use the OnBlur Event which also doesn't work.

Here's a sample Web Page I'm attempting to Fill-In via Automation. Left out the AngularJS code (sure you have a copy). Don't know how to Trigger a KeyUp Event (FireEvent('keyup') results in an Error).

Have also tried using the Windows Shell SendKeys command (works in Chrome but not in IE11).

Thanks for your help

Marshal Rosenberg

<!doctype html>
<html ng-app>
    <head>
        <title>AngularJS Fill-In Test</title>
    </head>
    <body>
       <FORM> 
        House No: <input type="text" ng-model="houseno" name="houseno" />
        <br />
     
       
		Street: <input type="text" ng-model="street" name="street" />
        <br />
        {{ houseno + ' ' + street }}
       </FORM>
        <script src="angular.js"></script>    	
    </body>
</html>
Gravatar is a globally recognized avatar based on your email address. re: Auto-Fill Angular Fields from VFP using Internet Explorer Automation
  MarshalR
  Rick Strahl
  Dec 10, 2018 @ 05:17am

Thanks for your reply Rick - am not using the Web Browser control - using Ole Automation (CREATE OBJECT("InternetExplorer.Application").

Marshal

© 1996-2018