Warm tip: This article is reproduced from serverfault.com, please click

RobotFramework-如何使用Robot Framework中的SapGuiLibrary将文本插入GuiOkCodeField?

(RobotFramework - How to insert a text into the GuiOkCodeField using SapGuiLibrary from Robot Framework?)

发布于 2020-12-04 11:54:30

我正在将SapGuiLibrary与Robot Framework一起使用,并且尝试将文本插入GuiOkCodeField。我已经尝试了“插入文本”命令,但如你在下面看到的那样,它不起作用。

    *** Settings ****
Library     Process
Library     SapGuiLibrary
Variables   ../Data/SAP.py

*** Test Cases ***
Conect SAP GUI
  Start Process      ${Winium}
  Start Process      ${Saplogon}
  Wait Until Keyword Succeeds    30s    1s    Connect To Session
  Open Connection    ${Con_Name}
  Input Text         ${GuiOkCodeField}    Fbl1n

当我运行此代码时,日志消息为:ValueError:不能为元素类型'GuiOkCodeField'使用关键字'input text'

因此,我不知道如何向该字段发送文本值。有什么建议吗?

Questioner
Joseilton
Viewed
11
Sandra Rossi 2020-12-09 04:48:14

要在带有Robot Framework的Windows的SAP GUI上运行事务代码,请使用:

run transaction fbl1n

有关SapGuiLibrary关键字的更多信息:https ://frankvanderkuur.github.io/SapGuiLibrary.html