#100DaysOfCode in Python Transcripts
Chapter: Days 73-75: Automate tasks with Selenium
Lecture: Setup: install Selenium and ChromeDriver

Login or purchase this course to watch this video and the rest of the course contents.
0:00 Alright, o get started, you need to install Selenium. So I suggest you make a virtual environment. So I made a selenium subdirectory.
0:10 And I'm using Anaconda. So I have a special alias to do this. If you're on a typical Python 3 installation, you probably use something like this.
0:19 Which is fine, right? It's not working for me. So, I'm using... all right. That makes my venv, and let's enable it. I have an alias for that.
0:34 Because I'm working with virtual environments all the time. And deactivate is under tabs. and activate is not. So, that that,
0:49 There's nothing installed. So now I'm doing pip install selenium. And that should be all we need. No dependencies, just a clean install one package.
1:04 All right, one other thing though is, before I was using PhantomJS. But using Selenium again after awhile, I got this Selenium support for
1:14 PhantomJS has been deprecated error. So I downloaded this Chrome driver. And the only thing you have to do is put that in your path.
1:24 So here you download the binary. So with that driver downloaded, I can extract that somewhere that's under my path.
1:39 And if that directory's not in your path, you can put it there by doing in your batch rc just for now here on the command line.
1:47 export path = whatever is in path already. Appending home/bin. Now I'll do a which Chrome driver, you see it's in my path.
1:59 That's all you need so that Selenium can work with a headless browser. And with that, you should be all set up.

Talk Python's Mastodon Michael Kennedy's Mastodon