Changelog 2023.01
2023.01
Modifier Keys
Some web applications support clicking with modifier keys, like a spreadsheet that lets you Shift+Click to select multiple rows. You can now do this in a code block by passing an array of modifier key codes:
browser.click('.row:nth-child(2) .cell:nth-child(5)', { modifiers: ['Shift'] });Similarly, for keyboard actions, you can string the key codes together like this:
browser.keyboard.press('Control+F');Other Improvements & Bug Fixes
- Fixed a browser memory leak in the script editor, which caused the editor to become sluggish after playing a long browser script with many screenshots.
- Fixed a problem with the right and left cursor errors when editing a wait time.
Further Reading
Most Browser Bot scripts consist of recorded steps like clicks, typing, and navigation. But real web applications sometimes need more nuanced interactions – holding Shift while clicking to select a range of rows, pressing Ctrl+A to select all text, or using keyboard shortcuts that the application recognizes. These kinds of interactions go beyond what you can capture with a simple recording, hence the need for scripting individual keypresses.