(helper)
| 12 | } |
| 13 | |
| 14 | export async function checkFocusBeforeType(helper) { |
| 15 | if (!helper.options.strict && !store.debugMode) return |
| 16 | if (!await isNoElementFocused(helper)) return |
| 17 | |
| 18 | const message = 'No element is in focus. Use I.click() or I.focus() to activate an element before typing.' |
| 19 | if (helper.options.strict) throw new NonFocusedType(message) |
| 20 | helper.debugSection('Warning', message) |
| 21 | } |
| 22 | |
| 23 | export async function checkFocusBeforePressKey(helper, originalKey) { |
| 24 | if (!helper.options.strict && !store.debugMode) return |
no test coverage detected