aboutsummaryrefslogtreecommitdiff
path: root/e2e/lib
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2019-09-21 15:32:30 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2019-09-21 16:33:14 +0900
commit4d36a203c09d2e04bf4304ba4a5b63f66b3e2adf (patch)
tree780d19a0f13041e20206925a3c2c4d12ee53fa54 /e2e/lib
parent0fc2eea7431649f85c6e5d57cca66457f24bb14d (diff)
Use latest lanthan
Diffstat (limited to 'e2e/lib')
-rw-r--r--e2e/lib/Console.js12
1 files changed, 7 insertions, 5 deletions
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');