The error code is as follows:File "/usr/local/lib/python2.7/dist-packages/selenium-3.0.0b2-py2.7.egg/selenium/webdriver/firefox/webdriver.py ", line up, in __init__Self.service.start ()File "/usr/local/lib/python2.7/dist-packages/selenium-3.0.0b2-py2.7.egg/selenium/webdriver/common/service.py", Line +, in startOs.path.
ObjectiveMac comes with a python2.7 environment, so it's very easy to install the selenium environment on a Mac, and you can enter 2 instructions to install it.Software that needs to be installed:1.pip2.selenium2.53.63.firefox44.dmg4.Pycharm(Environment with SELENIUM2+FIREFOX46 and the following version compatible, selenium3+firefox47+geckodriver)First, selenium
ObjectiveMac comes with a python2.7 environment, so it's very easy to install the selenium environment on a Mac, and you can enter 2 instructions to install it.Software that needs to be installed:1.pip2.selenium2.53.63.firefox44.dmg4.Pycharm(Environment with SELENIUM2+FIREFOX46 and the following version compatible, selenium3+firefox47+geckodriver)First, selenium
Background to implement environment description preparation how to write code
background
Through selenium can complete the operation of the web automatically, freeing your hands. Implement Environment Introduction
Mac
Chrome version 64.0.3282.140 (official version)
Selenium-java 3.8.1
Chrome Selenium driver 2.35 prep w
Selenium2+python's environment is mainly built on Python and selenium.1.pythonThe Mac comes with Python and can view the version. Of course, you can choose to install other versions of Python.2.seleniumInstall with sudo easy_install selenium in the Mac's own terminalThrough the above two steps to complete the most basic installation of the environment. Firefox is
Automated test environment setup in a Mac environment here is a pro-measured article.But there are two points to note in this process:1. Execute command "sudo pip install–u Selenium" in terminal networking if it fails, you can try to install selenium with the command "sudo easy_install selenium";2. Install the pycharm
Mac Latest System: OS X EI CaptianPython: The python2.7 that comes with this machine. (originally want to upgrade 3.5, feel too complicated, give up)Pip:https://pypi.python.org/pypi/pip Download version pip 8.1.2.tar.gz (download, unzip, CD to directory, execute command: sudo python setup.py install)Selenium:sudo Easy_install Selenium (networked installation, default latest version, so don't worry about not
Mac environment, roborframework operation Selenium1. Installing the Selenium modulesudo pip install-t/usr/local/lib/python2.7/site-packages/selenium--Specify directory Installation2. Installing the Selenium2library modulesudo pip install-t/usr/local/lib/python2.7/site-packages/robotframework-selenium2library3. See if the installation was successfulcd/usr/local/li
Previously in the Mac's Python shell, Driver=webdriver could not be passed. Chrome () launches Google browser. Here's how to fix it:(Prerequisite: Chromedriver in the/usr/local/bin/directory)From selenium import Webdriverbrowser = Webdriver. Chrome (executable_path= "/usr/local/bin/chromedriver")Or:From selenium import Webdriverpath = "/usr/local/bin/chromedriver" Driver = webdriver. Chrome (PATH)Or:From
Installation EnvironmentMy environment is Mac + firefox42 + Selenium 2.9.1Download link for Firefox history version: http://ftp.mozilla.org/pub/firefox/releases/This experiment requires downloading a large number of jar packages, as shown inThe students who need to download the link can private me--Experimental process
Open Selenium, record a series of a
Only contact with the Mac, the following is the online search for information on my computer to install the successful process, as far as possible to attach the original address.1.selenium Installationhttps://www.zhihu.com/question/30496889Many tutorials on the web are similar to this, 1.1 download pip "Python installation package management tool"https://pypi.org/project/pip/Unzip the downloaded PIP file, o
1. Download piphttps://pypi.org/project/pip/Download the above red line marked, and then open the terminal, CD to the above file download successful setup.py directory, execute sudo python setup.py install2. Installing SeleniumNetworked execution sudo pip install–u Selenium (default is the latest 3)If you want to switch to SELENIUM2 and have installed SELENIUM3, you can enter: sudo pip uninstall selenium in
Workaround, check the environment:Python 2.7.10Firefox version 46Selenium 2.53.6Note: The Firefox automatic update is turned off, otherwise the selenium use case may not be executed after an automatic upgrade.The error is as follows:Macbookpro:github apple$ Python3 Test.pytraceback (most recent call last): File "/library/frameworks/python.framework/ versions/3.4/lib/python3.4/site-packages/selenium/webdrive
First install the environment you can refer to this article https://www.zhihu.com/question/30496889I use Chrome to browse, download Webdriver's address is http://chromedriver.storage.googleapis.com/index.html,Click to download the historical version of Chrome: https://www.chromedownloads.net/Note that the downloaded version must correspond to its own version of Chrome, or the error will be as follows: version support for Chromedriver can be viewed from http://npm.taobao.org/mirrors/chromedriver/
Selenium is the most extensive web UI Automation testing framework currently in use. This series of articles will go into the brief to explain the usage of selenium.
Reading Table of Contents
The name of the selenium
Selenium means selenium (a bit QTP the killer's meaning
Firefox window will open, and the window will remain open until all assertions are executed.Using Selenium Grid 2 for remote testingLocal or remote testing can be done in Selenium 2. For remote runs, the test requires a RemoteWebDriver WebDriver specific implementation of the interface named. You can specify that the browser run as a DesiredCapabilities class. Listing 18 shows the relevant examples.Listing
Selenium is a good automated testing framework for multiple platforms and browsers. Selenium provides two operating modes-core and remote control (RC). In addition, thoughtworks also provides Firefox's add-on -- selenium IDE and RC mode extension selenium grid for selenium.
take a look at the principles of selenium-grid communication. Assume that we have the following scenario: [One test request client, one hub node, One Windows + IE proxy, one Linux + FF proxy, One Mac + safari proxy, and one chrome proxy on any platform]. The distribution chart is as follows:
The test code is as follows:
Import Org. openqa. selenium. *; import Or
This article mainly introduces the working principle of selenium server.Interaction ModeStart.
In the first selenium RC test case, we started selenium server with the command "Java-jar selenium-server.jar". In fact, when we started selenium server, you can also add parameter
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.