Keyboard Action Is Not Working As Expected
Last updated
Last updated
If you use keyboard commands and they are not producing the effect you need, here are some common problems and how to solve them:
Increase delays, as keyboard commands may take longer to take effect. See Delay Times between the Building Blocks. Ensure to increase the delay in the preceding building block, so that there is enough time for the website to load after the previous action.
If you have multiple keys in the Keyboard Action building block and you need them to be hit sequentially (as opposed to a shortcut), separate each key into a separate building block and add some delay between the building blocks. For example, if you need your TaskBot to hit Tab twice, it is better to have two separate building blocks.
❌ Might work but not recommended: Hitting Tab twice in one 'go' might be interpreted as a shortcut.
✅ Better: Two separate Keyboard Action building blocks, each hitting Tab once.
For shortcuts, order matters! For example, to select a piece of text with Shift + A, you need to adhere to the order of the keys.
❌ Won't work - wrong order
✅ Works - order is correct
Using native browser commands. ZeroWork can operate within the website context, but not within the native browser commands. So, say, if you want to hit CTRL/CMD+P (to print something), CTRL/CMD+F (to search for something), CTRL/CMD+S (to save website as html) or use a browser shortcut command to maximize a window, that won't work.
Use Click Web Element with a selector instead of keyboard commands. Selectors are generally more reliable than keyboard commands.