Hello Shelly, to register webdrivers like Chrome driver, Gecko Driver etc with Python-Selenium, you can use following line of codes:
1. Chrome Driver: These lines of code can be used in Pydev (Eclipse) to connect with Chrome browser :
driver = webdriver.Chrome("C:\\\\Users\\\\Pratibha\\\\Downloads\\\\chromedriver_win32\\\\chromedriver.exe") //Pass your chrome driver .exe file path here
driver.maximize_window() // to open browser in fullscreen
driver.implicitly_wait(2) // wait for 2 second to load the page completely
driver.get("https://www.google.com") // use get() function to open specific url
2. Gecko Driver (Firefox): Following lines of code will connect your test scripts with Firefox browser:
drv = webdriver.Firefox(executable_path=r"C:\Users\Pratibha\Downloads\ExtractedFiles\geckodriver-v0.24.0-win64\geckodriver.exe") //Pass Gecko driver .exe file path here
drv.implicitly_wait(2) // wait for 2 second to load the page completely
drv.maximize_window() // to open browser in fullscreen
drv.get(r"https://www.google.com") // open your desired url with get() method
3. IE Driver: Follow these lines of code to connect with Internet Explorer browser:
drv = webdriver.Ie(r"C:\Users\Pratibha\Downloads\ExtractedFiles\IEDriverServer_x64_3.14.0\IEDriverServer.exe") // Set your IE driver .exe file path here
drv.implicitly_wait(2) //wait for 2 second to load the page completely
drv.maximize_window() // open browser in fullscreen
drv.get(r"https://www.google.com") // open desired url with get() method