Facing Issue with 'Press Key' Keyword to set the value in Input box in Robot Framework.

7 views
Skip to first unread message

madhuri katragadda

unread,
Jun 30, 2022, 3:11:56 PM6/30/22
to robotframework-users
Hi

For a webpage, which has a Dropdown, I need to select a value from the Dropdown box.
I have written the code like this by Inspecting.
Here in this case, the values in the dropdown are not getting displayed  by default, only after clicking on dropdown, we could see. I tried using the keywords,
`Select from list by value/Index/name' .

but nothing helped here.

So I tried with `Input text` keyword.

Though the given value is entered, I am not able to set the value using "Press Keys" keyword.

    Click Element    XPATH=//div[@class='v-filterselect v-widget v-required v-filterselect-required v-has-width']
    ${"country"}    Set Variable    id:gwt-uid-24
    Element Should Be Visible    ${"country"}
    Element Should Be Enabled    ${"country"}
    Input Text    ${"country"}    United States
    Sleep   10
    Press Keys    ${"country"}    ENTER
    Sleep     5


Can you please help me here in resolving this.
Attached the screen capture here for Reference.

dropdown.png
Reply all
Reply to author
Forward
0 new messages