I want to learn to use Selenium but I don't really know what I'm doing wrong. When I launch my basic script, the Python shell opens and closes immediately without any error message.
I downloaded Selenium directly from https://pypi.org/project/selenium/, unzipped it and click on setup.py. No error message, just the CMD Windows with "Please press any button".
I downloaded the webdriver for:
Chrome - Version 89.
Firefox vers 78.6.1esr (64-Bit), just downloaded the last version 0.29.0 - https://github.com/mozilla/geckodriver/releases
I put everything in the same order (driver, Selenium, code to execute), see screenshot: Screenshot
Here is the code for Firefox:
from selenium import webdriver
browser = webdriver.Firefox()
browser.get('https://www.google.com')
I also tried by giving directly the path of the Driver without success :
from selenium import webdriver
browser = webdriver.Firefox('C:\Users\Bast01\Desktop\Python\Selenium Test\geckodriver.exe')
browser.get('https://www.google.com')
I even don't know if Selenium is corretly installed, for example:
Python 3.9.1 (tags/v3.9.1:1e5d33e, Dec 7 2020, 17:08:21) [MSC v.1927 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> help("selenium")
No Python documentation found for 'selenium'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.
>>> help("Selenium")
No Python documentation found for 'Selenium'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.
Thank you for your help !
