I currently have this Selenium Java code snippet. Does anyone know how I can convert it to JavaScript?
const webdriver = require('selenium-webdriver');
const By = webdriver.By;
const firefox = require('selenium-webdriver/firefox');
(async function findAllLinks() {
let driver = await new webdriver.Builder().forBrowser('firefox').setFirefoxOptions(new firefox.Options()).build();
await driver.get("http://toolsqa.com/");
let links = await driver.findElements(By.tagName("a"));
console.log(links.length);
for (let i = 0; i < links.length; i++) {
console.log(await links[i].getText());
}
})();