How can I register webdrivers for python-selenium?

0 votes
May 15, 2019 in Selenium by Shelly
55 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 15, 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 27, 2018 in Selenium by nsv999
• 5,510 points
9,694 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
332 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
2,097 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,010 points
110 views
0 votes
1 answer

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,510 points
1,534 views
0 votes
1 answer
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,850 points
1,484 views
0 votes
1 answer

How to use such xpath to find web elements

It's much simpler to use: #MyDiv123 > div.super or ...READ MORE

answered Jun 14, 2018 in Selenium by Samarpit
• 5,850 points
1,257 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 13, 2019 in Selenium by Pratibha
• 3,690 points
392 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 8, 2019 in Selenium by Pratibha
• 3,690 points
157 views