Python Forum

Full Version: Migrating Selenium from Windows 7 to 10
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Doh! Sorry but I had a typo. It is working now Thanks.

However, why did it matter where the gecko driver lived as long as the path in the service call was correct?
(Apr-08-2022, 06:11 PM)gw1500se Wrote: [ -> ]Doh! Sorry but I had a typo. It is working now Thanks.
👍

(Apr-08-2022, 06:11 PM)gw1500se Wrote: [ -> ]However, why did it matter where the gecko driver lived as long as the path in the service call was correct?
Because Selenium also dos a check that driver most be in OS Path.
Something like this.
>>> import os
>>> 
>>> path = r'C:\cmder\bin'
>>> if path in os.environ['PATH']:
...     print('In OS Path')
...     
In OS Path
>>> path = r'C:\foo'
>>> if path in os.environ['PATH']:
...     print('In OS Path')
...    # Give a error message eg (Executable needs to be in PATH)  
 
Pages: 1 2