From 4d36a203c09d2e04bf4304ba4a5b63f66b3e2adf Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Sat, 21 Sep 2019 15:32:30 +0900 Subject: Use latest lanthan --- e2e/lib/Console.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'e2e/lib') diff --git a/e2e/lib/Console.js b/e2e/lib/Console.js index 3a39b64..6016de1 100644 --- a/e2e/lib/Console.js +++ b/e2e/lib/Console.js @@ -1,22 +1,24 @@ +const { By } = require('selenium-webdriver'); + class Console { - constructor(session) { - this.session = session; + constructor(webdriver) { + this.webdriver = webdriver; } async sendKeys(...keys) { - let input = await this.session.findElementByCSS('input'); + let input = await this.webdriver.findElement(By.css('input')); input.sendKeys(...keys); } async currentValue() { - return await this.session.executeScript(() => { + return await this.webdriver.executeScript(() => { let input = document.querySelector('input'); return input.value; }); } async getCompletions() { - return await this.session.executeScript(() => { + return await this.webdriver.executeScript(() => { let items = document.querySelectorAll('.vimvixen-console-completion > li'); if (items.length === 0) { throw new Error('completion items not found'); -- cgit v1.2.3