const {Builder, By} = require("selenium-webdriver"); require('chromedriver'); async function loginTest() { let driver = await new Builder().forBrowser("chrome").build(); await driver.get("http://localhost:8000"); await driver.findElement( By.name("user")).sendKeys('janos'); await driver.findElement( By.name("pass")).sendKeys('titok'); await driver.findElement( By.id("loginButton")).click(); } loginTest();