diff --git a/apps/remix-ide-e2e/src/commands/clickFunction.ts b/apps/remix-ide-e2e/src/commands/clickFunction.ts index e84be6a0d0..e19426db6a 100644 --- a/apps/remix-ide-e2e/src/commands/clickFunction.ts +++ b/apps/remix-ide-e2e/src/commands/clickFunction.ts @@ -4,16 +4,8 @@ import EventEmitter from 'events' class ClickFunction extends EventEmitter { command (this: NightwatchBrowser, fnFullName: string, expectedInput?: NightwatchClickFunctionExpectedInput): NightwatchBrowser { this.api.waitForElementPresent('.instance button[title="' + fnFullName + '"]') - .perform(function (client, done) { - client.execute(function () { - document.querySelector('#runTabView').scrollTop = document.querySelector('#runTabView').scrollHeight - }, [], function () { - if (expectedInput) { - client.setValue('#runTabView input[title="' + expectedInput.types + '"]', expectedInput.values, _ => _) - } - done() - }) - }) + .scrollInto('#runTabView input[title="' + expectedInput.types + '"]') + .setValue('#runTabView input[title="' + expectedInput.types + '"]', expectedInput.values, _ => _) .scrollAndClick('.instance button[title="' + fnFullName + '"]') .pause(2000) .perform(() => {