From 87be5fb9386dc00846ac20854e1b216688fea362 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Fri, 13 Sep 2019 16:31:00 +0200 Subject: [PATCH] try to fix selecting all text in Field components --- src/session.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/session.js b/src/session.js index 8e85509b82..f91bce5a46 100644 --- a/src/session.js +++ b/src/session.js @@ -108,6 +108,9 @@ module.exports = class RiotSession { async replaceInputText(input, text) { // click 3 times to select all text await input.click({clickCount: 3}); + // waiting here solves not having selected all the text by the 3x click above, + // presumably because of the Field label animation. + await this.delay(300); // then remove it with backspace await input.press('Backspace'); // and type the new text