Webdriver failed to invoke browser

Source: Internet
Author: User

An error occurred while invoking the browser with Webdriver
Tips:
Raise Webdriverexception ("Can not connect to the Service%s"% Self.path)
Selenium.common.exceptions.WebDriverException:Message:Can not connect to the Service chromedriver

The general meaning is that the link is not available and the path cannot be found
Workaround:
One, with Baidu check, and did not find similar problems, followed by Google has found the same problem, but unfortunately no one to give answers
Second, try to start from path, found all normal
It's starting to get a little panicked.
Third, view the Hosts file configuration
Cat/etc/hosts

# This is licensed under a CC BY-NC-SA 4.0 international License.
# https://creativecommons.org/licenses/by-nc-sa/4.0/

# Localhost (Do not REMOVE)
127.0.0.1tkpt450

:: 1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 Ip6-mcastprefix
Ff02::1 Ip6-allnodes
Ff02::2 ip6-allrouters

Try adding 127.0.0.1 localhost
Run the code again
#!/usr/bin/env python
#-*-Coding:utf-8-*-

From selenium import Webdriver
Firefox_driver = Webdriver. Firefox ()
Firefox_driver.get ("http://www.baidu.com")
Print Firefox_driver.title
Firefox_driver.quit ()

OK, the call succeeds.
Baidu a bit, you will know
[Finished in 5.3s]

Summary, previously modified the hosts to facilitate scientific access to the Internet, the 127.0.0.1 localhost deleted, but in fact, and eggs.

Webdriver failed to invoke browser

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.