How can I register webdrivers for python-selenium

0 votes
May 15, 2019 in Selenium by Shelly
1,037 views

1 answer to this question.

0 votes

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
answered May 16, 2019 by Pratibha
• 3,690 points

Related Questions In Selenium

+2 votes
2 answers

How can I press ENTER key with the execute_script in selenium python?

The below code containing Keys.ENTER might just ...READ MORE

answered Mar 28, 2018 in Selenium by nsv999
• 5,500 points
27,417 views
+4 votes
1 answer

How can I configure Eclipse for using Selenium?

Follow the following steps to configure your ...READ MORE

answered Dec 12, 2018 in Selenium by Nabarupa
1,904 views
+1 vote
2 answers

How can I delete an element in Selenium using Python?

You can directly delete the node using ...READ MORE

answered Sep 14, 2019 in Selenium by tonystark
• 500 points
19,902 views
0 votes
1 answer

How can I write test scripts in Selenium with python?

Hey Khushi, writing test scripts in Selenium ...READ MORE

answered May 9, 2019 in Selenium by Anvi
• 14,150 points
913 views
0 votes
2 answers

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,500 points
13,763 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

enable trusted connection  in internet explorer by ...READ MORE

answered Aug 31, 2020 in Selenium by Sri
• 3,190 points
9,184 views
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,910 points
7,258 views
0 votes
2 answers

How to use such xpath to find web elements

xpath are two types. 1) Absolute XPath:    /html/b ...READ MORE

answered Sep 3, 2020 in Selenium by Sri
• 3,190 points
7,896 views
0 votes
1 answer

How can I scroll a web page in Mozilla Firefox using Selenium?

Hi Rohan, steps to scroll a webpage in ...READ MORE

answered May 14, 2019 in Selenium by Pratibha
• 3,690 points
3,221 views
0 votes
1 answer

Can anyone explain how an AJAX call can be handled in Selenium webdriver?

Hello Megha, to demonstrate how AJAX calls are ...READ MORE

answered May 9, 2019 in Selenium by Pratibha
• 3,690 points
1,438 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP