RPA.1.桌面UI自动化RPA性能测试:影刀、微软Power Automate、uiBot、实在智能对微信和企业微信的探测

RPA对微信和企业微信的UI元素探测

元素定位原理(用.net自己写一个试一试)

windows10 下UI自动化框架存在于下列路径:

C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2

2018/03/26  16:24            46,776 UIAutomationClient.dll
2018/03/26  16:24            28,904 UIAutomationClientsideProviders.dll
2018/03/26  16:24            31,424 UIAutomationProvider.dll
2018/03/26  16:24            39,600 UIAutomationTypes.dll

早期我们去探测windows元素用SPY++或者User32.Dll调用可以很方便的获取到句柄

原理如下:鼠标坐标或者标题、类名

        [DllImport("user32.dll", EntryPoint = "WindowFromPoint")]//指定坐标处窗体句柄
        public static extern int WindowFromPoint(
            int xPoint,
            int yPoint
        );
IntPtr hwnd = WindowFromPoint(point.X, point.Y);//获取指定坐标处窗口的句柄
IntPtr hwnd = Win32.FindWindow(lpszClass, lpWindowName);

由于windows从System.Windows.Forms到Windows.UI.Core 很多自定义的控件出现了,我们无法通过句柄探测到元素。微软的自动化dll对部分UI元素不能获取。

下面是使用了微软UIAutomation 中的 AutomationElement能力对企业微信进行了探测:

AutomationElement element = AutomationElement.FromPoint(new System.Windows.Point(Cursor.Position.X, Cursor.Position.Y));

通过测试无论鼠标定位在哪里,我们探测的始终为顶层菜单。

接下来我使用(影刀、Power Automate、uiBot、实在智能)RPA工具进行了微信及企业微信测试,如下结果:

acc:Windows.UI.Core.CoreWindow
whd:windowsHandle
uia:AutomationElement
cv

 影刀

 

 

 

微软Power Automate

 

uiBot

 

 

 

实在智能

  • 0
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 6
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

功克

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值