Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.Start your free trial
diana osmani1,082 Points
const driver = new selenium.Builder().forBrowser("chrome").build();
When I run this:
const driver = new selenium.Builder().forBrowser("chrome").build(); undefined
I get this:
(node:73779) UnhandledPromiseRejectionWarning: WebDriverError: unknown error: cannot find Chrome binary (Driver info: chromedriver=2.22.397929 (fb72fb249a903a0b1041ea71eb4c8b3fa0d9be5a),platform=Mac OS X 10.13.3 x86_64) at Object.checkLegacyResponse (/Users/dianaosmani/selenium-basics/node_modules/selenium-webdriver/lib/error.js:585:15) at parseHttpResponse (/Users/dianaosmani/selenium-basics/node_modules/selenium-webdriver/lib/http.js:533:13) at Executor.execute (/Users/dianaosmani/selenium-basics/node_modules/selenium-webdriver/lib/http.js:468:26) at <anonymous> at process._tickCallback (internal/process/next_tick.js:118:7) (node:73779) 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:73779) [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.
How do I solve this?
Joseph Wasden20,406 Points
Have you installed selenium in the project yet? Perhaps share a but more of your code so we can get a closer look.