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 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