UiPath检测到的ctrlid格式为什么在XSLT表示形式中与记录的格式不同? [英] Why does the ctrlid format detected by UiPath differs from the documented format in their XSLT representation?

查看:372
本文介绍了UiPath检测到的ctrlid格式为什么在XSLT表示形式中与记录的格式不同?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么 UiPath Studio 检测到的ctrlid格式与文档记录的 XSLT 格式不同?

Why does the ctrlid format detected by UiPath Studio differs from the documented format in their XSLT representation?

当前,我正在使用UiPath来自动化一些工作流程.

Currently I am working with UiPath to automate a few workflows.

环境详细信息:

SAP客户端:IDES ECC 6.0含EhP7

SAP Client: IDES ECC 6.0 incl. EhP7

  • 主机:具有64位的Intel Core i3 CPU-Windows 8系统.

    Host machine: Intel Core i3 CPU with 64 bit - Windows 8 system.

  • 在尝试标识SAPTreeList/SAP's Advanced Treelist中的元素时,UiPath似乎检测到以下格式的ctrlid:

    While trying to identify an element in SAPTreeList / SAP's Advanced Treelist it seems UiPath detects the ctrlid in the following formats:

    • <wnd ctrlid='74372104' />
    • <wnd ctrlid='59648' idx='1' />
    • <wnd ctrlid='59648' />
    • <wnd ctrlid='74937216' />
    • <wnd ctrlid='100' title='SAP&apos;s Advanced Treelist' />
    • <wnd ctrlid='74372104' />
    • <wnd ctrlid='59648' idx='1' />
    • <wnd ctrlid='59648' />
    • <wnd ctrlid='74937216' />
    • <wnd ctrlid='100' title='SAP&apos;s Advanced Treelist' />

    快照:

    CtrlId 在 msdn.microsoft.com 提到:

    CtrlId属性的值必须在1到255个字符之间,必须以字母字符开头,并且必须仅包含字母数字和下划线字符.

    The value of the CtrlId attribute MUST range from 1 through 255 characters, MUST begin with an alphabetic character, and MUST contain only alphanumeric and underscore characters.

  • 以下W3C XML模式( XMLSCHEMA1 )片段指定了此内容元素.

    The following W3C XML Schema (XMLSCHEMA1) fragment specifies the contents of this element.

    <xsd:element name="CtrlId" type="xsd:string"/>
    

  • 因此 UiPath Studio 检测到的 ctrlid 格式似乎与记录的格式和规范不同.

    So the ctrlid format detected by UiPath Studio seems to be different from the documented format and specification.

    我在这里想念东西吗?

    根据中的Execution.log这个问题:

    Error {"message":"Click Text 'SAPTreeList': Cannot find the UI element corresponding to this selector: <wnd ctrlid='90279688' /><wnd ctrlid='100' title='SAP&apos;s Advanced Treelist' />","level":"Error","logType":"Default","timeStamp":"2019-02-06T13:16:44.295729+05:30","fingerprint":"bec67d2a-14d1-4b93-ac06-03156aea69fe","windowsIdentity":"AtechM-03\\AtechM_03","machineName":"ATECHM-03","processName":"LearningUiPath","processVersion":"1.0.0.0","jobId":"e7f88d9e-e485-4eee-8a54-7450771238f3","robotName":"ATECHM_03","machineId":0,"fileName":"Main"}
    

    错误详细信息还包含以下字段:

    The error details also contains the following fields:

    • level
    • logType
    • timeStamp
    • fingerprint
    • windowsIdentity
    • machineName
    • processName
    • processVersion
    • jobId
    • robotName
    • machineId
    • fileName
    • level
    • logType
    • timeStamp
    • fingerprint
    • windowsIdentity
    • machineName
    • processName
    • processVersion
    • jobId
    • robotName
    • machineId
    • fileName

    所以我的问题是:

    • 元素的 ctrlid 对这些参数中的任何一个有依赖性吗?
    • ctrlid 是每个系统唯一的元素吗?
    • ctrlid 在同一个jobId中是动态的吗?
    • Does the ctrlid of an element have any dependency on any of these parameters?
    • Is ctrlid of an element unique to each system?
    • Is ctrlid dynamic within the same jobId?

    推荐答案

    我将尝试提供一些有关我如何理解问题的答案:

    I will try to provide some answers as to how i understood the questions:

    • 元素的ctrlid对这些参数中的任何一个有依赖性吗?

    • Does the ctrlid of an element have any dependency on any of these parameters?

    UiPath创建一个选择器,该选择器提供一些依赖关系,这些依赖关系并不总是最佳的,因为其中一些依赖关系可能在每次应用程序运行或加载另一个元素时动态变化. 因此,是的,在创建元素时(当由UiPath指示时)元素依赖于这些特定参数,但是在执行过程中它们可能会更改,从而导致选择器挂起"

    UiPath creates a selector providing some dependencies, which are not always the optimal one, since some of these might change dynamically every time the application runs or another element loads. So yes the element has dependencies on these specific parameters at the time of its creation (when indicated by UiPath) but during the execution these might change, causing the selector to 'hung'

    ctrlid是每个系统唯一的元素吗?

    Is ctrlid of an element unique to each system?

    某些元素ctrlid对于每个系统来说都是唯一的,具体取决于您指向

    Some ctrlid of elements are unique to each system as per your link to CtrlId

    此属性的值对于表单中的每个按钮控件和图片按钮控件都应该是唯一的.

    • ctrlid在同一个jobId中是动态的吗?
    • Is ctrlid dynamic within the same jobId?

    在其他情况下,ctrlid的值可能是动态的.在这种情况下,例如您的示例图片(突出显示的值):

    In other cases the value of ctrlid might be dynamic. In such cases as per your example image (highlighted values):

    1. UiPath最佳做法建议在构建稳定的选择器时避免使用它们
    2. 但是,如果要使用它们,则需要使用通配符使它们动态化(尝试"*"),或者每次都检索动态值并在选择器设置中使用它(尝试"+ dynamicValue +")
    3. 最后,您始终需要测试选择器,通过反复试验,您将增强您的解决方案.

    希望您会发现这些信息很有用.

    Hope you will find these information useful.

    这篇关于UiPath检测到的ctrlid格式为什么在XSLT表示形式中与记录的格式不同?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆