Not identifying drivers when drivers and configured in environment variables. | Selenium Python Forum
M
Mohan Posted on 22/04/2020

Question #1:  When drivers are configured at environment variables system is not identifying drivers and throwing console errors.  Error details are attached.

browserName="Chrome"

webdriver.driver = None

if(browserName=="Chrome"):
driver = webdriver.Chrome()

elif(browserName=="Firefox"):
driver = webdriver.Firefox(

elif(browserName=="Edge"):
driver = webdriver.Edge()

elif(browserName=="ie"):
driver=webdriver.Ie()

else:
print("No browser is specified")

driver.get("https://www.facebook.com/")
driver.implicitly_wait(5)

fbLogo=driver.find_element_by_xpath("//div[@id='blueBarDOMInspector']/div/div/div/div/h1/a").text
print(fbLogo)
driver.close()


J
Jaspreet Replied on 23/04/2020

Hey, Please make sure that the driver classes whih is extracted are not edited nor even the name.

After adding the driver classes in the environment variable, restart the system. 

Then in eclipse, before running the test case just follow the path : project(in the tab)<clean <clean all projects and simply restart eclipse.

Then try to run the code.


M
Mohan Replied on 29/07/2020

This is still not working with Edge browser.


J
Jaspreet Replied on 30/07/2020

Hey, 

For the edge browser, there is a issue while running and we need to provide the path of driver to the command explicitly to work with egde


Related Posts