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 trial

Quality Assurance Introduction to Selenium Test Drive Selenium Installation

can't install Selenium webdriver, "gyp: No Xcode or CLT version detected!"

Hello there, Is it a requirement to have Xcode installed in my system? First time then I tried to install via command "npm install selenium-webdriver" it has created two folders inside of the selenium-basics folder. However, after that I have tried to troubleshoot some errors in Node code and now I'm not able to even install webdriver inside the folder at all. Any thoughts/suggestions?

After installing Xcode I still have had some hard times with installing webdriver. However, after all the reinstallation of Node JS worked out for me.

Here's a guide on how to uninstall it completely: https://www.positronx.io/how-to-uninstall-node-js-and-npm-from-macos/

Install it again from the official website: https://nodejs.org/en/

Note: don't forget to allow the persimmon in System settings to install third-party software on your Mac.

1 Answer

Just in case others run into this issue as well. After struggling with the chromedriver, I got stuck with the selenium-webdriver... Instructions in this video is to install with npm but.. the course I was taking is in python so I kept getting this:

python3 -i horse_test_selenium.py
Traceback (most recent call last):
  File "horse_test_selenium.py", line 2, in <module>
    from selenium import webdriver
ModuleNotFoundError: No module named 'selenium'
>>> 

Which was resolved as soon as I installed the module with pip3 :sweat_smile:

$ pip3 install selenium