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?
1 Answer
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
-
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