1

I am using Robot Framework and Selenium and have a drop down combo element that I need to focus on and tab off in order to fire a validation message. I cannot use Press Keys or Click Element as it will invoke the list and I cannot use Mouse Over since the only argument is location. Does anyone have suggestions to handle this scenario?

enter image description here

1
  • How would you bring the focus on the element yourself? It's either a click, or a tab based indexing. May be with mouse over with custom JS. What else? Commented Aug 19, 2022 at 6:22

1 Answer 1

0

The best KW should be

Press Keys    NONE    TAB

But if you can not use this, perhaps pyautogui can help you

*** Settings ***
Library    PyAutoGUI
*** Keywords ***
Apertar tab 3 vezes
    Press     TAB    3
  • use "pip install pyautogui" to install the library
2
  • This will not work since the lack of a locator (using NONE) sends the press keys to the browser, so nothing happens. The element must have focus and the tab off in order for the message to fire. If I tab through the form without focus on a single element the messages get fired but I do not want to do this since this same element exists in multiple forms in different places. I tried your suggestion and it failed FAIL "keys" argument can not be empty Commented Jan 26, 2023 at 20:10
  • I record a screen video to show my attempts with the 2 ways that I suggest... both work here... filetransfer.io/manage-package/sZAHj6Sg# Commented Feb 1, 2023 at 17:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.