Stop a findInPage call by specifying any of these actions:
- clearSelection - Clear the selection.
- keepSelection - Translate the selection into a normal selection.
- activateSelection - Focus and click the selection node.
Example
const win = fin.Window.getCurrentSync();
win.addListener('found-in-page', (event) => {
setTimeout(() => {
win.stopFindInPage('clearSelection');
}, 5000);
});
win.findInPage('a').then(results => {
console.log(results);
});