1

having issue just trying to automate for the first time. I have access to repositories by GIT, where its python folders all use Python 2.7 syntax. I also have Google chrome driver as well(Using ubuntu). When I attempt to automate, I just get error, regarding python 2.7. Unsure if thats the issue.

So a friend of mine gave me a python code, that would use google chrome driver to test if I can automate with the python code that is scripted for use once executed. Using the command terminal, I get the following error:

traceback (most recent call last):
File "autotimesheet.py", line 254, in <module>
    processPDCI(res)
File "autotimesheet.py", line 85, in processPDCI
    driver = webdriver.Chrome('/home/myname/ChromeDriver')
File "/home/myname/.local/lib/python2.7/site-
       packages/selenium/webdriver/chrome/webdriver.py", line 62, in __init__
self.service.start()
File "/home/myName/.local/lib/python2.7/site-
       packages/selenium/webdriver/common/service.py", line 86, in start
os.path.basename(self.path), self.start_error_message)
selenium.common.exceptions.WebDriverException: Message: 'ChromeDriver' 
executable may have wrong permissions. Please see 
https://sites.google.com/a/chromium.org/chromedriver/home

So unsure how to solve it. Friend is also stumped, and suggested to ask online. I have use pip install selenium & pip install nose for set up. So any guidance/help would be appreciated. I will troubleshoot for a while to see if I can fix it.

2 Answers 2

3

When your Python Selenium bindings locate the chromedriver executable and try to execute it, they are unable to do so because of an issue with permissions.

Most likely, your chromedriver executable is missing "execute" permissions, add them:

sudo chmod +x `which chromedriver`
# or sudo chmod +x /path/to/chromedriver
1
  • Okay, will update you later
    – kay19
    Commented Jun 29, 2017 at 17:33
0

Just to update. I was able to automate the script. Here was the only step I did: In the autotimesheet.py, I change the line of code of this:

driver = webdriver.Chrome('/home/myname/ChromeDriver/)

to:

driver = webdriver.Chrome('/home/myname/ChromeDriver/chromedriver')

where the last part is the executable file. So it opened up chrome and started to automate. I also did the chmod +x chromedriver command that showed that I am able to use it. Now that I know this can automate, have to fix the issue with the repositories part.

Being able to fix the automation python script issue, I have to tackle the last issue. I will still follow the comments, and will troubleshoot. My error for this issue is as follows:

ERROR: tests.test_to_run.TestsToRun.test_run_this_test

Traceback (most recent call last):
File "/home/myName/.local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File 
"/home/myname/Automation/pdci_keyword/python/tests/test_to_run.py", 
line 25, in test_run_this_test
self.test_controller.insert_steps_from_script_into_list_array()
 File 
 "/home/myName/Automation/pdci_keyword/python/lib/
web_interface/test_controller.py", line 337, in 
insert_steps_from_script_into_list_array
self.process_msg_insert(data)
 File 
"/home/myName/Automation/pdci_keyword/python/lib/web_interface/
test_controller.py", line 200, in process_msg_insert

So that is what i'm working on. I will update hours later. But thanks alecxe for comment suggestion!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.