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! While you're at it, check out some resources Treehouse students have shared here.
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 trialBrendan Whiting
Front End Web Development Techdegree Graduate 84,738 PointsSelenium is running test just in Safari as opposed to Chrome and Firefox
at 4:55 I have the same code as the video:
const { Browser, By, Key, until } = require('selenium-webdriver');
const { suite } = require("selenium-webdriver/testing");
const assert = require('assert');
suite(function(env) {
describe('RSVP site', function() {
it('has invitee', function() {
assert(1 == 1);
})
})
});
But when I run the code it only runs it in Safari, not in Chrome and Firefox as in the video.
[safari]
RSVP site
✓ has invitee
1 passing (5ms)
Why is that?
1 Answer
Jay McGavren
Treehouse TeacherDo you have the drivers for those browsers installed? Once you do, they'll be run automatically.
npm install -g chromedriver
npm install -g geckodriver
Brendan Whiting
Front End Web Development Techdegree Graduate 84,738 PointsBrendan Whiting
Front End Web Development Techdegree Graduate 84,738 PointsAh. I ran those commands but didn't realize that they had failed with permission denied. Not sure what to do about it, this is using sudo:
Jay McGavren
Treehouse TeacherJay McGavren
Treehouse TeacherGoogling for "npm install g Error: EACCES: permission denied" returned this page; looks like it might be helpful. https://docs.npmjs.com/getting-started/fixing-npm-permissions Let us know what results you get!
Brendan Whiting
Front End Web Development Techdegree Graduate 84,738 PointsBrendan Whiting
Front End Web Development Techdegree Graduate 84,738 PointsSorry it took me so long to respond. I went through the suggestion "Manually change npm’s default directory" at the link and it worked. Although when I run the tests, it still runs with just Safari, not sure why. At any rate, I was able to complete the course without issues.
Thanks.