cannot find chrome driver in python script

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

cannot find chrome driver in python script

Sapana Devani
Hi All,

 I have written my first python script using selenium. I am using pycharm.

I got an error of chrome driver even I have downloaded chrome driver & set path in my script.


below are my script,

from selenium import webdriver


driver = webdriver.Chrome ("C:\chromedriver\chromedriver.exe")
driver.set_page_load_timeout(30)
driver.get("http://www.facebook.com")
driver.maximazie_window()
driver.implicitly_wait(20)
driver.get_screenshot_as_file("Facebook.png")
driver.quit()
I got an error like this

C:\Users\SapanaD\PycharmProjects\seleniumscripts\venv\Scripts\python.exe C:/Users/SapanaD/PycharmProjects/seleniumscripts/facebookpackage/Myfirstscript.py
Traceback (most recent call last):
  File "C:/Users/SapanaD/PycharmProjects/seleniumscripts/facebookpackage/Myfirstscript.py", line 4, in <module>
    driver = webdriver.Chrome ("C:\chromedriver\chromedriver.exe")
AttributeError: 'module' object has no attribute 'Chrome'

Process finished with exit code 1

Please help me

Thanks in advance.

Sapana

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAL4jT3tyCWJCS_COjy4qZa_6xiPou0aMkf6nrYBfTFtL3pJUPQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: cannot find chrome driver in python script

arshan khan
System.setProperty("webdriver.chrome.driver", " C:\\chromedriver\\chromedriver.exe ");
ChromeOptions options = new ChromeOptions();
options.addArguments("start-maximized");
 WebDriver driver = new ChromeDriver(options);

u can try this.


On Thu, May 10, 2018 at 3:30 AM, Sapana Devani <[hidden email]> wrote:
Hi All,

 I have written my first python script using selenium. I am using pycharm.

I got an error of chrome driver even I have downloaded chrome driver & set path in my script.


below are my script,

from selenium import webdriver


driver = webdriver.Chrome ("C:\chromedriver\chromedriver.exe")
driver.set_page_load_timeout(30)
driver.get("http://www.facebook.com")
driver.maximazie_window()
driver.implicitly_wait(20)
driver.get_screenshot_as_file("Facebook.png")
driver.quit()
I got an error like this

C:\Users\SapanaD\PycharmProjects\seleniumscripts\venv\Scripts\python.exe C:/Users/SapanaD/PycharmProjects/seleniumscripts/facebookpackage/Myfirstscript.py
Traceback (most recent call last):
  File "C:/Users/SapanaD/PycharmProjects/seleniumscripts/facebookpackage/Myfirstscript.py", line 4, in <module>
    driver = webdriver.Chrome ("C:\chromedriver\chromedriver.exe")
AttributeError: 'module' object has no attribute 'Chrome'

Process finished with exit code 1

Please help me

Thanks in advance.

Sapana

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAL4jT3tyCWJCS_COjy4qZa_6xiPou0aMkf6nrYBfTFtL3pJUPQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAG%3Dx78_i3rkBf8e06T-HUmN4iiQBLS853%3DzEMCPBjQXuwJwAVQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: cannot find chrome driver in python script

Sapana Devani
Hi


I am using python not java

On Thu, May 10, 2018 at 2:37 PM, arshan khan <[hidden email]> wrote:
System.setProperty("webdriver.chrome.driver", " C:\\chromedriver\\chromedriver.exe ");
ChromeOptions options = new ChromeOptions();
options.addArguments("start-maximized");
 WebDriver driver = new ChromeDriver(options);

u can try this.


On Thu, May 10, 2018 at 3:30 AM, Sapana Devani <[hidden email]> wrote:
Hi All,

 I have written my first python script using selenium. I am using pycharm.

I got an error of chrome driver even I have downloaded chrome driver & set path in my script.


below are my script,

from selenium import webdriver


driver = webdriver.Chrome ("C:\chromedriver\chromedriver.exe")
driver.set_page_load_timeout(30)
driver.get("http://www.facebook.com")
driver.maximazie_window()
driver.implicitly_wait(20)
driver.get_screenshot_as_file("Facebook.png")
driver.quit()
I got an error like this

C:\Users\SapanaD\PycharmProjects\seleniumscripts\venv\Scripts\python.exe C:/Users/SapanaD/PycharmProjects/seleniumscripts/facebookpackage/Myfirstscript.py
Traceback (most recent call last):
  File "C:/Users/SapanaD/PycharmProjects/seleniumscripts/facebookpackage/Myfirstscript.py", line 4, in <module>
    driver = webdriver.Chrome ("C:\chromedriver\chromedriver.exe")
AttributeError: 'module' object has no attribute 'Chrome'

Process finished with exit code 1

Please help me

Thanks in advance.

Sapana

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAL4jT3tyCWJCS_COjy4qZa_6xiPou0aMkf6nrYBfTFtL3pJUPQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAG%3Dx78_i3rkBf8e06T-HUmN4iiQBLS853%3DzEMCPBjQXuwJwAVQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAL4jT3tOMZfZ8FhcEWL8R2OfbADE%2B8U16bWEZZvNRpMNJwoNTQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: cannot find chrome driver in python script

Deebesh S
go to the chrome folder and press shiftkey and then right click and select the option select as path

and run

On Thu, May 10, 2018 at 2:45 PM, Sapana Devani <[hidden email]> wrote:
Hi


I am using python not java

On Thu, May 10, 2018 at 2:37 PM, arshan khan <[hidden email]> wrote:
System.setProperty("webdriver.chrome.driver", " C:\\chromedriver\\chromedriver.exe ");
ChromeOptions options = new ChromeOptions();
options.addArguments("start-maximized");
 WebDriver driver = new ChromeDriver(options);

u can try this.


On Thu, May 10, 2018 at 3:30 AM, Sapana Devani <[hidden email]> wrote:
Hi All,

 I have written my first python script using selenium. I am using pycharm.

I got an error of chrome driver even I have downloaded chrome driver & set path in my script.


below are my script,

from selenium import webdriver


driver = webdriver.Chrome ("C:\chromedriver\chromedriver.exe")
driver.set_page_load_timeout(30)
driver.get("http://www.facebook.com")
driver.maximazie_window()
driver.implicitly_wait(20)
driver.get_screenshot_as_file("Facebook.png")
driver.quit()
I got an error like this

C:\Users\SapanaD\PycharmProjects\seleniumscripts\venv\Scripts\python.exe C:/Users/SapanaD/PycharmProjects/seleniumscripts/facebookpackage/Myfirstscript.py
Traceback (most recent call last):
  File "C:/Users/SapanaD/PycharmProjects/seleniumscripts/facebookpackage/Myfirstscript.py", line 4, in <module>
    driver = webdriver.Chrome ("C:\chromedriver\chromedriver.exe")
AttributeError: 'module' object has no attribute 'Chrome'

Process finished with exit code 1

Please help me

Thanks in advance.

Sapana

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAL4jT3tyCWJCS_COjy4qZa_6xiPou0aMkf6nrYBfTFtL3pJUPQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAG%3Dx78_i3rkBf8e06T-HUmN4iiQBLS853%3DzEMCPBjQXuwJwAVQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAL4jT3tOMZfZ8FhcEWL8R2OfbADE%2B8U16bWEZZvNRpMNJwoNTQ%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAOFr%3DpRKNVNRV%3DvCnE8xYjxc5_gNK63Y3RHc8XysYjX6VV91cw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: cannot find chrome driver in python script

Wayne
In reply to this post by Sapana Devani
try place chromedriver.exe in the same folder as your python program.

On Thu, May 10, 2018 at 3:30 AM, Sapana Devani <[hidden email]> wrote:
Hi All,

 I have written my first python script using selenium. I am using pycharm.

I got an error of chrome driver even I have downloaded chrome driver & set path in my script.


below are my script,

from selenium import webdriver


driver = webdriver.Chrome ("C:\chromedriver\chromedriver.exe")
driver.set_page_load_timeout(30)
driver.get("http://www.facebook.com")
driver.maximazie_window()
driver.implicitly_wait(20)
driver.get_screenshot_as_file("Facebook.png")
driver.quit()
I got an error like this

C:\Users\SapanaD\PycharmProjects\seleniumscripts\venv\Scripts\python.exe C:/Users/SapanaD/PycharmProjects/seleniumscripts/facebookpackage/Myfirstscript.py
Traceback (most recent call last):
  File "C:/Users/SapanaD/PycharmProjects/seleniumscripts/facebookpackage/Myfirstscript.py", line 4, in <module>
    driver = webdriver.Chrome ("C:\chromedriver\chromedriver.exe")
AttributeError: 'module' object has no attribute 'Chrome'

Process finished with exit code 1

Please help me

Thanks in advance.

Sapana

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAL4jT3tyCWJCS_COjy4qZa_6xiPou0aMkf6nrYBfTFtL3pJUPQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAE4iJQ1XhGp7K2XWAG-NsMtVc%3D5HhMnAy%2BbdGOg%3DD3EMqDKtOw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: cannot find chrome driver in python script

Doug Dragon
In reply to this post by Sapana Devani
It looks like there's a space in your command.

This is from the chromedriver docs for Python:

driver = webdriver.Chrome('/path/to/chromedriver')  # Optional argument, if not specified will search path.

I believe you need to escape the slashes on a Windows system.

Hope this helps,

-Doug


On Thursday, May 10, 2018 at 3:31:13 AM UTC-4, Sapana Devani wrote:
Hi All,

 I have written my first python script using selenium. I am using pycharm.

I got an error of chrome driver even I have downloaded chrome driver & set path in my script.


below are my script,

from selenium import webdriver


driver = webdriver.Chrome ("C:\chromedriver\chromedriver.exe")
driver.set_page_load_timeout(30)
driver.get("<a href="http://www.facebook.com" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.facebook.com\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHV-roEEQhbBt2kebp7oN7wDhDm0w&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.facebook.com\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHV-roEEQhbBt2kebp7oN7wDhDm0w&#39;;return true;">http://www.facebook.com")
driver.maximazie_window()
driver.implicitly_wait(20)
driver.get_screenshot_as_file("Facebook.png")
driver.quit()
I got an error like this

C:\Users\SapanaD\PycharmProjects\seleniumscripts\venv\Scripts\python.exe C:/Users/SapanaD/PycharmProjects/seleniumscripts/facebookpackage/Myfirstscript.py
Traceback (most recent call last):
  File "C:/Users/SapanaD/PycharmProjects/seleniumscripts/facebookpackage/Myfirstscript.py", line 4, in <module>
    driver = webdriver.Chrome ("C:\chromedriver\chromedriver.exe")
AttributeError: 'module' object has no attribute 'Chrome'

Process finished with exit code 1

Please help me

Thanks in advance.

Sapana

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/81ac830e-4256-4f13-b79c-ec19df5e51e8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: cannot find chrome driver in python script

Sapana Devani
Hi,

I have tried above all the solutions but didn't work.


Thanks,
Sapana

On Thu, May 10, 2018 at 11:17 PM, Doug Dragon <[hidden email]> wrote:
It looks like there's a space in your command.

This is from the chromedriver docs for Python:

driver = webdriver.Chrome('/path/to/chromedriver')  # Optional argument, if not specified will search path.

I believe you need to escape the slashes on a Windows system.

Hope this helps,

-Doug



On Thursday, May 10, 2018 at 3:31:13 AM UTC-4, Sapana Devani wrote:
Hi All,

 I have written my first python script using selenium. I am using pycharm.

I got an error of chrome driver even I have downloaded chrome driver & set path in my script.


below are my script,

from selenium import webdriver


driver = webdriver.Chrome ("C:\chromedriver\chromedriver.exe")
driver.set_page_load_timeout(30)
driver.get("http://www.facebook.com")
driver.maximazie_window()
driver.implicitly_wait(20)
driver.get_screenshot_as_file("Facebook.png")
driver.quit()
I got an error like this

C:\Users\SapanaD\PycharmProjects\seleniumscripts\venv\Scripts\python.exe C:/Users/SapanaD/PycharmProjects/seleniumscripts/facebookpackage/Myfirstscript.py
Traceback (most recent call last):
  File "C:/Users/SapanaD/PycharmProjects/seleniumscripts/facebookpackage/Myfirstscript.py", line 4, in <module>
    driver = webdriver.Chrome ("C:\chromedriver\chromedriver.exe")
AttributeError: 'module' object has no attribute 'Chrome'

Process finished with exit code 1

Please help me

Thanks in advance.

Sapana

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/81ac830e-4256-4f13-b79c-ec19df5e51e8%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAL4jT3vT67d56anWvqWMw_vohxG5ABV8%3Dax%3DpYZBVk03APUOeA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: cannot find chrome driver in python script

punkaaj chavaan
Hi,

1) Update chrome driver to the latest version - 2.38
2) Keep chromedriver.exe folder path at the start of the PATH variable.
3) Use below code and let me know the result.

Here's working version code:
from selenium import webdriver

driver = webdriver.Chrome("C:\\bin\\chromedriver.exe")
driver.set_page_load_timeout(30)
driver.get("http://www.facebook.com")
driver.maximize_window()
driver.implicitly_wait(20)
driver.get_screenshot_as_file("Facebook.png")
driver.quit()


Regards,
Punkaaj

On Friday, May 11, 2018 at 11:50:03 AM UTC+5:30, Sapana Devani wrote:
Hi,

I have tried above all the solutions but didn't work.


Thanks,
Sapana

On Thu, May 10, 2018 at 11:17 PM, Doug Dragon <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="zFnBEpULAwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">thatd...@...> wrote:
It looks like there's a space in your command.

This is from the chromedriver docs for Python:

driver = webdriver.Chrome('/path/to/chromedriver')  # Optional argument, if not specified will search path.

I believe you need to escape the slashes on a Windows system.

Hope this helps,

-Doug



On Thursday, May 10, 2018 at 3:31:13 AM UTC-4, Sapana Devani wrote:
Hi All,

 I have written my first python script using selenium. I am using pycharm.

I got an error of chrome driver even I have downloaded chrome driver & set path in my script.


below are my script,

from selenium import webdriver


driver = webdriver.Chrome ("C:\chromedriver\chromedriver.exe")
driver.set_page_load_timeout(30)
driver.get("<a href="http://www.facebook.com" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.facebook.com\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHV-roEEQhbBt2kebp7oN7wDhDm0w&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.facebook.com\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHV-roEEQhbBt2kebp7oN7wDhDm0w&#39;;return true;">http://www.facebook.com")
driver.maximazie_window()
driver.implicitly_wait(20)
driver.get_screenshot_as_file("Facebook.png")
driver.quit()
I got an error like this

C:\Users\SapanaD\PycharmProjects\seleniumscripts\venv\Scripts\python.exe C:/Users/SapanaD/PycharmProjects/seleniumscripts/facebookpackage/Myfirstscript.py
Traceback (most recent call last):
  File "C:/Users/SapanaD/PycharmProjects/seleniumscripts/facebookpackage/Myfirstscript.py", line 4, in <module>
    driver = webdriver.Chrome ("C:\chromedriver\chromedriver.exe")
AttributeError: 'module' object has no attribute 'Chrome'

Process finished with exit code 1

Please help me

Thanks in advance.

Sapana

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="zFnBEpULAwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">selenium-user...@googlegroups.com.
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="zFnBEpULAwAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">seleniu...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/selenium-users/81ac830e-4256-4f13-b79c-ec19df5e51e8%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/selenium-users/81ac830e-4256-4f13-b79c-ec19df5e51e8%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/selenium-users/81ac830e-4256-4f13-b79c-ec19df5e51e8%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/selenium-users/81ac830e-4256-4f13-b79c-ec19df5e51e8%40googlegroups.com.

For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/101321a7-01db-4917-9069-316b3424014c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: cannot find chrome driver in python script

Sapana Devani
the same code is working on eclipse but didn't work in pycharm





On Fri, May 11, 2018 at 12:19 PM, Punkaaj Chavaan <[hidden email]> wrote:
Hi,

1) Update chrome driver to the latest version - 2.38
2) Keep chromedriver.exe folder path at the start of the PATH variable.
3) Use below code and let me know the result.

Here's working version code:
from selenium import webdriver

driver = webdriver.Chrome("C:\\bin\\chromedriver.exe")
driver.set_page_load_timeout(30)
driver.get("http://www.facebook.com")
driver.maximize_window()
driver.implicitly_wait(20)
driver.get_screenshot_as_file("Facebook.png")
driver.quit()


Regards,
Punkaaj

On Friday, May 11, 2018 at 11:50:03 AM UTC+5:30, Sapana Devani wrote:
Hi,

I have tried above all the solutions but didn't work.


Thanks,
Sapana

On Thu, May 10, 2018 at 11:17 PM, Doug Dragon <[hidden email]> wrote:
It looks like there's a space in your command.

This is from the chromedriver docs for Python:

driver = webdriver.Chrome('/path/to/chromedriver')  # Optional argument, if not specified will search path.

I believe you need to escape the slashes on a Windows system.

Hope this helps,

-Doug



On Thursday, May 10, 2018 at 3:31:13 AM UTC-4, Sapana Devani wrote:
Hi All,

 I have written my first python script using selenium. I am using pycharm.

I got an error of chrome driver even I have downloaded chrome driver & set path in my script.


below are my script,

from selenium import webdriver


driver = webdriver.Chrome ("C:\chromedriver\chromedriver.exe")
driver.set_page_load_timeout(30)
driver.get("http://www.facebook.com")
driver.maximazie_window()
driver.implicitly_wait(20)
driver.get_screenshot_as_file("Facebook.png")
driver.quit()
I got an error like this

C:\Users\SapanaD\PycharmProjects\seleniumscripts\venv\Scripts\python.exe C:/Users/SapanaD/PycharmProjects/seleniumscripts/facebookpackage/Myfirstscript.py
Traceback (most recent call last):
  File "C:/Users/SapanaD/PycharmProjects/seleniumscripts/facebookpackage/Myfirstscript.py", line 4, in <module>
    driver = webdriver.Chrome ("C:\chromedriver\chromedriver.exe")
AttributeError: 'module' object has no attribute 'Chrome'

Process finished with exit code 1

Please help me

Thanks in advance.

Sapana

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/81ac830e-4256-4f13-b79c-ec19df5e51e8%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/101321a7-01db-4917-9069-316b3424014c%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAL4jT3stBK8g64W6FkAc5PRoZz%3Dqk-0%2Bsv7HiHQ2pxqBLB_iCQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: cannot find chrome driver in python script

punkaaj chavaan
I'm using pycharm only and it run successfully...

Check pycharm preferences for python version and valid installation...
You may have multiple versions of python installed.

On Fri, May 11, 2018 at 12:23 PM, Sapana Devani <[hidden email]> wrote:
the same code is working on eclipse but didn't work in pycharm





On Fri, May 11, 2018 at 12:19 PM, Punkaaj Chavaan <[hidden email]> wrote:
Hi,

1) Update chrome driver to the latest version - 2.38
2) Keep chromedriver.exe folder path at the start of the PATH variable.
3) Use below code and let me know the result.

Here's working version code:
from selenium import webdriver

driver = webdriver.Chrome("C:\\bin\\chromedriver.exe")
driver.set_page_load_timeout(30)
driver.get("http://www.facebook.com")
driver.maximize_window()
driver.implicitly_wait(20)
driver.get_screenshot_as_file("Facebook.png")
driver.quit()


Regards,
Punkaaj

On Friday, May 11, 2018 at 11:50:03 AM UTC+5:30, Sapana Devani wrote:
Hi,

I have tried above all the solutions but didn't work.


Thanks,
Sapana

On Thu, May 10, 2018 at 11:17 PM, Doug Dragon <[hidden email]> wrote:
It looks like there's a space in your command.

This is from the chromedriver docs for Python:

driver = webdriver.Chrome('/path/to/chromedriver')  # Optional argument, if not specified will search path.

I believe you need to escape the slashes on a Windows system.

Hope this helps,

-Doug



On Thursday, May 10, 2018 at 3:31:13 AM UTC-4, Sapana Devani wrote:
Hi All,

 I have written my first python script using selenium. I am using pycharm.

I got an error of chrome driver even I have downloaded chrome driver & set path in my script.


below are my script,

from selenium import webdriver


driver = webdriver.Chrome ("C:\chromedriver\chromedriver.exe")
driver.set_page_load_timeout(30)
driver.get("http://www.facebook.com")
driver.maximazie_window()
driver.implicitly_wait(20)
driver.get_screenshot_as_file("Facebook.png")
driver.quit()
I got an error like this

C:\Users\SapanaD\PycharmProjects\seleniumscripts\venv\Scripts\python.exe C:/Users/SapanaD/PycharmProjects/seleniumscripts/facebookpackage/Myfirstscript.py
Traceback (most recent call last):
  File "C:/Users/SapanaD/PycharmProjects/seleniumscripts/facebookpackage/Myfirstscript.py", line 4, in <module>
    driver = webdriver.Chrome ("C:\chromedriver\chromedriver.exe")
AttributeError: 'module' object has no attribute 'Chrome'

Process finished with exit code 1

Please help me

Thanks in advance.

Sapana

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/81ac830e-4256-4f13-b79c-ec19df5e51e8%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/101321a7-01db-4917-9069-316b3424014c%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Selenium Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/selenium-users/Df-iAERCOJo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAL4jT3stBK8g64W6FkAc5PRoZz%3Dqk-0%2Bsv7HiHQ2pxqBLB_iCQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CALFoc5bM3jo0tN6v52k3aTya4mAVve8PbZLx_w7W8PsF_fWT_g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: cannot find chrome driver in python script

Sapana Devani
@punkaaj

I use python 3.4 which version have you used?

On Fri, May 11, 2018 at 12:34 PM, Punkaaj Chavaan <[hidden email]> wrote:
I'm using pycharm only and it run successfully...

Check pycharm preferences for python version and valid installation...
You may have multiple versions of python installed.

On Fri, May 11, 2018 at 12:23 PM, Sapana Devani <[hidden email]> wrote:
the same code is working on eclipse but didn't work in pycharm





On Fri, May 11, 2018 at 12:19 PM, Punkaaj Chavaan <[hidden email]> wrote:
Hi,

1) Update chrome driver to the latest version - 2.38
2) Keep chromedriver.exe folder path at the start of the PATH variable.
3) Use below code and let me know the result.

Here's working version code:
from selenium import webdriver

driver = webdriver.Chrome("C:\\bin\\chromedriver.exe")
driver.set_page_load_timeout(30)
driver.get("http://www.facebook.com")
driver.maximize_window()
driver.implicitly_wait(20)
driver.get_screenshot_as_file("Facebook.png")
driver.quit()


Regards,
Punkaaj

On Friday, May 11, 2018 at 11:50:03 AM UTC+5:30, Sapana Devani wrote:
Hi,

I have tried above all the solutions but didn't work.


Thanks,
Sapana

On Thu, May 10, 2018 at 11:17 PM, Doug Dragon <[hidden email]> wrote:
It looks like there's a space in your command.

This is from the chromedriver docs for Python:

driver = webdriver.Chrome('/path/to/chromedriver')  # Optional argument, if not specified will search path.

I believe you need to escape the slashes on a Windows system.

Hope this helps,

-Doug



On Thursday, May 10, 2018 at 3:31:13 AM UTC-4, Sapana Devani wrote:
Hi All,

 I have written my first python script using selenium. I am using pycharm.

I got an error of chrome driver even I have downloaded chrome driver & set path in my script.


below are my script,

from selenium import webdriver


driver = webdriver.Chrome ("C:\chromedriver\chromedriver.exe")
driver.set_page_load_timeout(30)
driver.get("http://www.facebook.com")
driver.maximazie_window()
driver.implicitly_wait(20)
driver.get_screenshot_as_file("Facebook.png")
driver.quit()
I got an error like this

C:\Users\SapanaD\PycharmProjects\seleniumscripts\venv\Scripts\python.exe C:/Users/SapanaD/PycharmProjects/seleniumscripts/facebookpackage/Myfirstscript.py
Traceback (most recent call last):
  File "C:/Users/SapanaD/PycharmProjects/seleniumscripts/facebookpackage/Myfirstscript.py", line 4, in <module>
    driver = webdriver.Chrome ("C:\chromedriver\chromedriver.exe")
AttributeError: 'module' object has no attribute 'Chrome'

Process finished with exit code 1

Please help me

Thanks in advance.

Sapana

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/81ac830e-4256-4f13-b79c-ec19df5e51e8%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/101321a7-01db-4917-9069-316b3424014c%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Selenium Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/selenium-users/Df-iAERCOJo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAL4jT3stBK8g64W6FkAc5PRoZz%3Dqk-0%2Bsv7HiHQ2pxqBLB_iCQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CALFoc5bM3jo0tN6v52k3aTya4mAVve8PbZLx_w7W8PsF_fWT_g%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAL4jT3simcTGbMR6%2BiidaD47T4zOAY%3DQPrkj-w14OEDz1pfQ_w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.