How to Send Keys in LeanFT | UFT Developer

LeanFT now known as UFT Developer is loaded with lots of features and has been specially designed for continuous integration and continuous testing. It has a very strong mechanism to identify test objects. Having that said, sometimes we come across some weird situations wherein the inbuilt features of the tool don’t help us, and to figure it out we have to look for a workaround. One such strange scenario could be like clicking on a submit button, post-submission action is not being performed. Here we will take a look at such a few scenarios and learn how to resolve them.

send Keys in Leanft

In real-life automation scenarios sometimes we come across such objects on which if you perform a click operation it does not work. This is not just the case with buttons. In my automation career, I have also seen list boxes on which the automation tool is not able to select any item even though it is able to identify the list box. In such a tricky situation we need to simulate a human-like keypress or send keystrokes if the LeanFT is not able to click on a button or select an item from a list box, etc.

If you have also come across such a situation wherein you need to send keystrokes in LeanFT, you can use the following example. In this example, we will set the value in the first and last name field in a form of w3school. The link for that is mentioned in the code. After that, we will press the ENTER key rather than clicking on the submit button.
send Keystrokes in Leanft to submit a form

Example-Send Keystrokes In LeanFT | UFT Developer

Code Explanation

After entering values for first and last name the Enter key is being pressed instead of using the click() method. 

Recommended Posts

Leave a Reply