;
Similarly, add the junit-4.7.jar under the next JUnit to the library,
Then, import the two jar files to classpath;
4. Set selenium resource file connection
Select a project, right-click build path-> link source, select the selenium-Java-client-driver-1.0.3 folder under selenium-remote-control-1.0.1, and finish.
5. Create a new test class and enter the test code
here.1. Download unzip, you will get a Chromedriver.exe file (I click to open, run hint started no prot 9515, what is this? Is port 9515 accounted for? In the middle of the day), only then know the need to put this guy in the Chrome installation directory ... \google\chrome\application\, then set the PATH environment variable, put Chrome's installation directory (my: C:\Program files\ Google\chrome\application), and then call run:# coding = Utf-8from Seleni
decompress it to the C: \ pip-1.3.1 directory.
4. Open the command prompt (start --- cmd press Enter) to enter the c: \ pip-1.3.1 directory and enter:
C: \ pip-1.3.1> Python setup. py install
(If you are prompted that python is not an internal or external command! Don't worry, configure the environment variable)
Modify my computer> Properties> advanced> environment variables> path in system variables:Variable name: PathVariable
, the following two steps can be omitted =============7. Download and install (Http://www.java.com/zh_CN/download/chrome.jsp?locale=zh_CN) what? You have not done Java, refer to other documents! It's not hard.8. Download Selenium server (https://code.google.com/p/selenium/) found in the list on the left side of the pageSelenium-server-standalone-xxx.jarRight! This is the thing, download it and unzip it;In t
call run:# coding = Utf-8From selenium import WebdriverDriver = Webdriver. Chrome ()Driver.get (' http://radar.kuaibo.com ')Print Driver.titleDriver.quit ()And made a mistake:Chrome version must be >= 27.0.1453.0\n (Driver info:chromedriver=2.0,platform=windows NT 5.1 SP3 x86)said that my Chrome version is not larger than 27.0.1453.0 , this good to do, update to the latest version can be. Installing IE DriverIn the new version of Webdriver , only IE
Selenium + python Development Environment setup, seleniumpython
Introduction to web debugging tools and development environment setup
Python and selenium development environment:
1. Download python software: https://www.python.org/
After the download is complete, install it. After the installation is successful, open
Original URL: https://www.guru99.com/selenium-python.htmlHow to use Selenium with Python:complete TutorialSelenium supports Python and thus can be utilized with Selenium for testing.
Python is easy compared-to-other programming languages, has far less verbose.
The Python APIs empower you-to-connect with the browser through
website:From selenium import webdriverfrom selenium.common.exceptions import Nosuchelementexceptionfrom Selenium.webdriver.common.keys import Keysimport timebrowser = Webdriver. Firefox () # Get Local Session of Firefoxbrowser.get ("http://www.yahoo.com") # Load Pageassert "Yahoo!" in Browser.titleele m = Browser.find_element_by_name ("P") # Find the query Boxelem.send_keys ("SELENIUMHQ" + Keys.return) Time.sleep (0.2) # Let The page load, would be
1. First you need to install Python, the installation procedure is not described in detail, please refer to: http://www.cnblogs.com/jinshengshun/p/6102012.html2. When installing Python, the PIP is already included, so use Pip to install selenium directly. Enter the command installation directly under D:\Python\Scripts: Pip Install-u Selenium. (which is the Python installation path)3. When you enter the comm
> project> ?
Getting Started with WebdriverBefore using Webdriver, we need to do some background learning of the language first. It mainly includes object-oriented concept, basic use of Python and several parts of basic Java usage.
Object-oriented philosophyClasses, class, refers to a template, a design template.
Object : An object is an instance of a class, with 状态 and 行为 . For example, a panda is an object whose state is: name, age, gender, behavior: s
SELENIUM2 (webdirver) Getting Started Environment Building (Java Edition)First, the development environment:1, JDK1.62. Eclipse:Version:Kepler Service Release 1,:http://www.eclipse.org/downloads/3, selenium:selenium-java-2.52.0.zip,:http://docs.seleniumhq.org/download/Unpack the Selenium-java package, which contains four parts, such as: Second, create a new Java Project:1, then the above extracted files copied to the new project directory, directory
-click to run after downloading well.After the installation is complete, go to cmd to see if the Python installation is successful and if the Python version information is successfully printed, the installation is successful.-Configure Environment variablesRight-click My Computer-Properties-Advanced system settings-environment variable-pathTo write the installation path of PythonC:\xxx\Python\Python352. Installing SeleniumThere are many ways to install the s
/wKioL1j2DUPyp9RyAABIWks3_Cg729.png-wh_500x0-wm_ 3-wmp_4-s_2637081708.png "title=" Python installation succeeded. png "alt=" wkiol1j2dupyp9ryaabiwks3_cg729.png-wh_50 "/>Ok , Get here python The installation was successful. But to do the selenium test, you also need to install setuptools(to install other plug-in modules),directly run the line of sight download a good installation package, follow the prompts to install successfully. Environment variable
IEDriverServer.exe. Put the browser driver directly in the Python installation directory.Four, Eclipse+pydev plug-in installation1. Install Eclipse(1) Eclipse does not need to install, unzip folder, click Eclipse.exe to use2. Install Pydev plug-in(1) Decompression Pydev can see features and plugins two directories, and then copy the contents of the two directories to ecplise corresponding directory(2) Then ecplise Configure the installed Pydev plug-in:Ecplise->window->prefrences->pydev->interpr
view the running state of the build, as shown in:14) Click on the project that is running in the build History section to open the page as shown.15) In addition to the execution status and progress bar on the Jenkins page, you can also view and execute the information by opening the console output link. The "Console output" page with command output information.16) Once Jenkins finishes the build process, you will see a build page similar to the one shown below.() Jenkins displays test results a
the environment variable.)
Modify My Computer, properties, advanced-environment variable--the path in the system variable is:Variable name: PATHVariable value:; C:\Python27
3, install PIP, I am the default decompression in the C:\pip-1.3.1 directory4. Open a command prompt (start---cmd return) Enter the C:\pip-1.3.1 directory:C:\pip-1.3.1 > python setup.py install5, then switch to the C:\Python27\Scripts directory input:C:\Python27\Scripts > easy_install pip6, Install
Environment Preparation:1. Download the Learning installation package:Setuptoolshttps://pypi.python.org/packages/2.7/s/setuptools/SeleniumHttps://pypi.python.org/pypi/selenium2. Installation1). Install Setuptools (Note that this must be installed, otherwise the installation selenium will be error)python2.7 Enter the Windows command prompt to execute ez_setup.py:To this setuptools installation succeeded2). Install SeleniumPython 3.5Python setup.py In
Company Environment: centos6.9: python2.6-->2.7I. Linux local Selenium service build: (Continuous Integration: Using Xvfb+selenium+firefox to build an automated test environment under a Linux server)1.XVFB Installation:wgethttp://vault.centos.org/6.5/os/x86_64/Packages/xorg-x11-server-Xvfb-1.13.0-23.el6.centos.x86_64.rpm① wget online installation, copy URL download to local upload ② InstallationYum Lo
Selenium _ page element locating and operation steps tutorial, selenium operation steps
[Basic steps]
1. Open the browser;
2. Open the webpage;
3: positioning elements and operations;
[Element positioning is the core part of automated testing]
Element name
Webdriver API
Id
Find_element_by_id ()
Name
Find_element_by_name ()
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.