Integrating UIAutomationLibs into my C++ project

0

Hi all,

 

I tried to create a new DUnitX test-case using the UIAutomationLibs in a new C++-DunitX test-case.

I was able to create such a test-case in Delphi, but now I am struggling to do the same in C++.

In Delphi it was required to import UIAutomation component via import-components and add it to my project.

So I was able to something like this:

 

Just the code snippet from my Delphi test-case::

:

uses

UIAutomationClient_TLB,

:

var
  UIAuto: IUIAutomation;
  element: IUIAutomationElement;

:

 UIAuto := CoCUIAutomation.Create;
 point.x := 5;
 point.y := 5;
 UIAuto.ElementFromPoint(point, element);
element.Get_CurrentFrameworkId(fwId);
:

 

But I am not getting the same test working in the C++.

 

Could anyone point me to what I am doing wrong?

What I have done so far:

1.) I also imported the AutomationLibs as components to my project like in Delphi.

2.) I tried to implement the UIAutomation creation etc, but I don't get it working, perhaps that's just a leak of C++ knowledge.

 

Thanks in advance for your patience and Reply!

Responses (0)
  • There are no replies here yet.
Your Reply

Please login to post a reply