In many cases, for example, if Foxtrot can’t recognize a field or button - using keyboard shortcuts instead of mouse clicking can be faster and more stable. For this purpose, Foxtrot has an excellent functionality to build any keyboard behavior in the Send Data option:
1. Target the whole window of the application to make sure that Foxtrot sends the shortcuts to the application itself.
2. Click on the symbol to open Expression Builder:
3. In Expression Builder select Keyboard menu
This menu allows you to emulate any keys and shortcuts exactly as a user can send.
Please note that you should choose the mode None when sending keystrokes, otherwise, it may cause some problems during running a script. When selecting the Send Data Action, simply choose the Keyboard within the Expression Builder:
In the attached file (find at the end of the article), you can find an example that shows how to use keyboard shortcuts in Excel. You can download the script and try to run it. Remember to save the Foxtrot Project File to the same location as your other projects, typically in this destination: C:\ProgramData\Foxtrot Suite
1. In this example, Foxtrot starts by setting up a Workbook in Excel, making some columns and formatting the first row:
2. Next, Foxtrot performs a loop, where a specific number of repeats has been defined. In this case, 10 times, and for each loop Foxtrot goes one row down and writes the data from tokens:
3. Next, Foxtrot performs actions using shortcuts to copy data from Column B and paste only values:
4. Then Foxtrot creates table using shortcuts:
5. At the end of the task Foxtrot clears the variable and saves the Workbook:
6. The result looks like this:
Please sign in to leave a comment.