1. Add c and C + + development plug-ins for eclipse: http://www.eclipse.org/cdt/downloads.php2, install CygwinThe NDK needs to run in a Linux environment, and Cygwin is a tool for simulating Linux under Windows.Cygwin is a program that supports many plugins.Installation Address: http://www.cygwin.com/ Note: The installed path cannot have spaces and ChineseSelect the response plug-in.Plugins must be installed: Devel,shell two.The first boot will be ini
Python automated testing: setUp and tearDown instances, pythonteardown
This article describes how to use setUp and tearDown for python automated testing. The details are as follows:
The instance code is as follows:
class RomanNumeralConverter(object): def __init__(self): self.digit_map = {"M":1000, "D":500, "C":1
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 Selenium Import webdriverdriver = Webdriver.
, 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 the Selenium-server-standalone-xxx.jar directory, use the command Java-jar Selenium-server-
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 is added to the Apitry: Browser.find_eleme
Selenium is a Web automated testing tool. Many students who learn the automation of learning functions have begun to prefer selenium because it has many advantages over qtp:
* Free, and no longer have to worry about cracking qtp
* Small, it is only a package for different languages, and qtp needs to download and install one multi-GProgram.
* This is also the most important point. Whether you are familiar with C, Java, Ruby, Python, or C # before
/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 has been set before (setuptools installation
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 example of this paper describes the use of the setup and teardown of the automated testing of Python, which is shared for everyone's reference. Specific as follows:
The instance code is as follows:
Class Romannumeralconverter (object): def __init__ (self): Self.digit_map = {"M": +, "D": $, "C": +, "L": 50 , "X": Ten, "V": 5, "I": 1} def convert_to_decimal (self, roman_numeral):
latest version of Google ChromeTwo. Download the latest version of the Chromedriver.exe driverThree. Download Drive address: http://blog.csdn.net/huilan_same/article/details/52615123Key steps: Four. Unzip the downloaded driver package Chromedriver.exe and put it in the application directory under the Google Chrome installation directory (my installation path is: C:\Program files\google\chrome\Application, depending on the path you installed, then configure the environment variable to add Chrome
Importandroid.support.test.uiautomator.UiObjectNotFoundException;7 ImportAndroid.support.test.uiautomator.UiSelector;8 Importandroid.view.KeyEvent;9 Ten ImportOrg.junit.Before; One Importorg.junit.Test; A ImportOrg.junit.runner.RunWith; - - /** the * Created by tianxing on 2017/8/15. - */ - -@RunWith (ANDROIDJUNIT4.class) + Public classHelloWorld { - + Uidevice Uidevice; A instrumentation instrumentation; at - @Before - Public voidsetUp () { -instrumentation =instrumentationregistry.
) {Console.log (' Title was: ' + res.value);}). end ();#$ node Baidu-test.jsTitle was: Baidu a bit, you knowIf you're interested in Coffeescript, you can test it with coffee.Baidu-test.coffee#Webdriverio = Require ' Webdriverio 'Options =Desiredcapabilities:Browsername: ' Firefox 'Webdriverio. Remote Options. Init (). url ' https://www.baidu.com '. Title (Err, RES)Console.log ' Title was: ' + res.value. End ()# This is a comments#$ NPM install-g Coffee (install)$ Coffee Baidu-test.coffeeTitle wa
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
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 driver is installed to test the work using i
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 command installation again under D:\Python\Scripts: Pip install-u Selenium prompt selenium has
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 InstallTool Address:Https://yunpan.cn/cx5AyvERt
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.