Quality Assurance Introduction to Selenium Test Drive Selenium Installation

Kosta Kuts
Kosta Kuts
12,806 Points

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?

Kosta Kuts
Kosta Kuts
12,806 Points

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

Beau Genereux
Beau Genereux
3,902 Points

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