【问题标题】:Robot Framework using FlaUILibraray XPath could not be found无法找到使用 FlaUILibraray XPath 的机器人框架
【发布时间】:2020-12-16 02:51:42
【问题描述】:

Robot Developer,现在进入 Windows 应用程序自动化的世界,使用 FlaUI 库编写一个简单的演示

Test Case FLA
    FlaUILibrary.Launch Application    notepad.exe
    FlaUILibrary.Attach Application By Name    Notepad
    FlaUILibrary.Set Text To Textbox    Name="Text Editor"    Robot Automation POC
    FlaUILibrary.Click    Name=Edit

“将文本设置为文本框”测试失败:FlaUiError:无法找到 XPath 'Name="Text Editor"' 中的元素

当我使用 XPath "AutomationId=15" 时出现同样的错误

我正在使用 Automation Spy 来检查 GUI 元素。 谢谢。

【问题讨论】:

    标签: automation robotframework flaui


    【解决方案1】:

    XPath 规范在 FlaUI 中更复杂...

    FlaUILibrary.Set Text To Textbox    /Window[@Name='Untitled - Notepad']/Document[@Name='Text Editor']    Robot Automation POC
    FlaUILibrary.Click    /Window[@Name='Untitled - Notepad']/MenuBar/MenuItem[@Name='Edit']
    

    【讨论】:

    猜你喜欢
    • 2014-09-29
    • 2018-08-16
    • 2021-03-16
    • 2021-11-22
    • 2019-02-18
    • 1970-01-01
    • 2017-04-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多