Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Quality Assurance Introduction to Selenium Automation Nation Getting Started

Ryan Giusti
Ryan Giusti
18,082 Points

Fills out the form, but doesn't submit.

I get the following output:

DevTools listening on ws:// (node:5664) UnhandledPromiseRejectionWarning: UnknownCommandError: unknown command: Cannot call non W3C standard command while in W3C mode at Object.throwDecodedError (C:\Users\myusername\Documents\selenium-basics\node_modules\selenium-webdriver\lib\error.js:550:15) at parseHttpResponse (C:\Users\myusername\Documents\selenium-basics\node_modules\selenium-webdriver\lib\http.js:560:13) at Executor.execute (C:\Users\myusername\Documents\selenium-basics\node_modules\selenium-webdriver\lib\http.js:486:26) at process._tickCallback (internal/process/next_tick.js:68:7) (node:5664) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)(node:5664) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

2 Answers

you need to turn w3c mode off from webdriver. try change what was:

const selenium = require("selenium-webdriver");
const driver = new selenium.Builder().forBrowser("chrome").build();


const selenium = require("selenium-webdriver");
const capabilities = {
    'browserName' : 'chrome',
    'chromeOptions': {
        'w3c': false
const browser = new selenium.Builder().withCapabilities(capabilities).forBrowser("chrome");
const driver = browser.build();

good luck.

Spent the better part of a workday looking for this answer. Thank you Jiayi Liu, you are a scholar.