Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 97762

selenium-webdriver can't find the driver in javascript?

$
0
0
const {Builder, By, Key, util} = require("selenium-webdriver/Firefox");
async function example(){
let driver = await new Builder().forBrowser('Firefox').build();
await driver.get("https://www.google.com");
await driver.findElement(By.name("q")).sendKeys("Selenium", Key.RETURN);

Hello, I am constantly getting these errors, although I added the webdriver path in the system and I cant execute the test. Has anyone experienced something like that?

(node:15844) UnhandledPromiseRejectionWarning: Error: Do not know how to build driver: Firefox
(node:4764) UnhandledPromiseRejectionWarning: TypeError: Builder is not a constructor

Viewing all articles
Browse latest Browse all 97762

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>