I have this problem show me error :
TypeError: 'module' object is not callable
How to solve that?
I use pycharm and try to change path for C:\Users\MOSTAFA\Desktop\chromedriver.exe and not working.
I have this problem show me error :
TypeError: 'module' object is not callable
How to solve that?
I use pycharm and try to change path for C:\Users\MOSTAFA\Desktop\chromedriver.exe and not working.
Single "\" as strings are considered escape sequences.
To avoid this, you need to use "\\" so python will consider it as "\".
driver = webdriver.chrome("C:\\Users\\MOSTAFA\\Desktop\\webdrivers\\chromedriver.exe")
or just use "/" instead of "\"
driver = webdriver.chrome("C:/Users/MOSTAFA/Desktop/webdrivers/chromedriver.exe")
You were close enough. You need to replace the lowercase c with uppercase C to initiate a ChromeDriver controlled Chrome browsing context. So your effective line of code will be:
driver = webdriver.Chrome(executable_path=r'C:\Users\MOSTAFA\Desktop\chromedriver.exe')
You can find detailed discussion in: