From 68403fa6819bfac2b9c0af1ff64e5f356ca03860 Mon Sep 17 00:00:00 2001 From: Callan Bryant Date: Thu, 26 Jul 2018 14:31:19 +0100 Subject: [PATCH] tests: ensure password field is cleared before typing password --- test/features/support/world.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/features/support/world.ts b/test/features/support/world.ts index c1127dc7..b848f643 100644 --- a/test/features/support/world.ts +++ b/test/features/support/world.ts @@ -78,6 +78,10 @@ function CustomWorld() { return that.driver.findElement(seleniumWebdriver.By.id("username")) .sendKeys(username); }) + .then(function () { + return that.driver.findElement(seleniumWebdriver.By.id("password")) + .clear(); + }) .then(function () { return that.driver.findElement(seleniumWebdriver.By.id("password")) .sendKeys(password);