const is better than var (even in Selenium)

This commit is contained in:
soulgalore 2018-08-18 18:18:09 +02:00
parent b7d472d583
commit 0e30b89393
1 changed files with 1 additions and 1 deletions

View File

@ -110,7 +110,7 @@ module.exports = {
const loginForm = driver.findElement(By.name('userlogin'));
driver.findElement(By.id('wpName1')).sendKeys(userName);
driver.findElement(By.id('wpPassword1')).sendKeys(password);
var loginButton = driver.findElement(webdriver.By.id('wpLoginAttempt'));
const loginButton = driver.findElement(webdriver.By.id('wpLoginAttempt'));
loginButton.click();
// we wait for something on the page that verifies that we are logged in
return driver.wait(until.elementLocated(By.id('pt-userpage')), 3000);