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

How to insert a text into the GuiOkCodeField using SapGuiLibrary from Robot Framework?

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

I'm using the SapGuiLibrary with Robot Framework and I'm trying to insert a text into the GuiOkCodeField. I've tried the Insert Text command but it didn't work as you can see below.

    *** 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

When I ran this code the log message was: ValueError: Cannot use keyword 'input text' for element type 'GuiOkCodeField'

So I don't know how to send a text value to this field. Any suggestion?

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

To run a transaction code on SAP GUI for Windows with Robot Framework, use :

run transaction fbl1n

More information about keywords for SapGuiLibrary: https://frankvanderkuur.github.io/SapGuiLibrary.html