Unable to connect to webdriver using robotframework
On the premise of ensuring that the RF installation environment is installed correctly, I found a problem today, that is, no matter how I used open browser, I reported an error, indicating that I could not connect to webdriver. Many people on the Internet said that the downloaded webdriver version did not match. I also tried to download the latest version, but I still could not solve it. Finally, I visited a foreign website, https://stackoverflow.com/.
Solved the problem.
The reason is that native 127.0.0.1 does not match localhost
You can type: drivers on the command line
Click / etc/hosts/ to view
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a'# 'symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
#:: 1 localhost
Remove the comments and save them.
Try to run it in RF again to see if you can open the browser