aboutsummaryrefslogtreecommitdiff
path: root/e2e/lib
diff options
context:
space:
mode:
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');