automation test plan for selenium

Read about automation test plan for selenium, The latest news, videos, and discussion topics about automation test plan for selenium from alibabacloud.com

Selenium+excel implementation of parametric automation testing

Techniques used: POI parsing of Excel, selenium automated testing, JUnitTest Case: Login www.1905.com Perform login-exit operationTo perform the steps:1, first create an Excel, there is a user name and password column2. Create a new Java class to parse Excel PackageCom.m1905.java;ImportJava.io.FileInputStream;Importjava.io.FileNotFoundException;Importjava.io.IOException;ImportJava.io.InputStream;Importjava.util.ArrayList;Importjava.util.List;ImportOrg

Several common processing scenarios for Windows popup in selenium Automation implementation

I. OverviewIn the use of automation framework selenium implementation, often encounter Windows pop-up box appears, just get started web automation test small partners don't panic Oh!Two. Several common scenarios for handling Windows pop-up boxes2.1 Selenium Handling Security

Easy Automation---selenium-webdriver (python) (vii)

ifrome1 (id = f1) browser.switch_to_frame ("F1 ") # Then find the ifrome2 below it (ID =f2) browser.switch_to_frame ( "f2) # Below you can manipulate elements browser.find_element_by_id (" kw" selenium ") browser.find_element _by_id ( "su" ). Click () time.sleep (3 Browser.quit () Driver.switch_to_window ()It is possible to nest not frames, but windows, and true-to-window methods: Switch_to_windowUsage is the same as Switch_to_frame:Driver.swit

Selenium+python Automation 88-sending mail when a use case does not pass

": - Wuyi Print("QQ Exchange Group: 226296743") the - Print(Is_result_pass ()) Wu -```Operation Result:```The test process has not passed the use case: Pass 2 Failure 1 Error 1False```2. Add a judgment before the last email```1 if notIs_result_pass ():2 3 #determine if the HTML report has an error4 5 6 7 #execute the Send mail function, write your own e-mail function8 9 #send_mail (sender, PSW, receiver, Smt

Selenium+python for Web Automation testing (DEMO+API)

Selenium official websitehttp://selenium-python.readthedocs.io/Configuring the Usage environmentDownload the appropriate browser driver, Firefox is the defaultThis article is based on Chrome, placed in the scripts directoryChromedriver official: All versions of ChromedriverDocument referenceA Concise Python tutorialPython Tutorial-LiaocheOfficial document: Selenium

Selenium+python Automation 89-sending mail when a use case does not pass

failure case # coding:utf-8from bs4 import BeautifulSoupimport sysreload(sys)sys.setdefaultencoding('utf8')def is_result_pass(): try: with open("result.html", "r") as fp: f = fp.read() # 读报告 soup = BeautifulSoup(f, "html.parser") status = soup.find_all(class_="attribute") result = status[2].contents[-1] # 获取报告结果 if "Failure" in result or "Error" in result: print("测试过程有不通过用例:%s"%result) return False else: r

A design idea in the framework design of "Python+selenium Building automation Framework"--pom

positioning of the page, and the method encapsulated by the business operation code associated with those elements.4. Code reuse, which reduces the amount of test script code.5. Clear hierarchy, while supporting the development of multiple writing automation scripts, such as how many pages each person writes, does not affect others.6. It is recommended that both the page class and the business logic approa

Selenium+python Automation 81-html Report Optimization (pie chart + failed re-run + compatible python2&3)

WebdriverImport UnitTestClass Test1(UnitTest. TestCase):U ' ' Blog Park test ' @classmethodDef SetupClass(CLS): Cls.driver= Webdriver. Firefox () @classmethodDef Teardownclass(CLS): Cls.driver.quit ()Def Test_01(Self):U "" "Position failure Case" ""Self.driver.get ("Https://www.baidu.com")SELF.DRIVER.FIND_ELEMENT_BY_ID (' xxxxx '). Send_keys (U ' Baidu a bit ')SELF.DRIVER.FIND_ELEMENT_BY_ID (' Su '). Click ()Self.asserttrue (True)Def Test_02(Self):U

About reducing Selenium automation script redundancy improvements

In the earliest contact with selenium, think can write the basic script in Java, can run, such as the following a section of the positioning element script1 driver.findelement (by.id ("name")). Click (); 2 driver.findelement (By.xpath ("//input[contains (@data-value, ' sort ')]"). Click;Seeing the above script, we can encapsulate a method separately, using the code to improve the simplicity, so we can customize a method Locatedrivereleso we can improv

Selenium+python Automation 21-txt Data parameterization

input box, the data is passed into Send_keys (Hzy). This is called by loop until all the contents of the file are read.Second, login parameterizationNow according to the above ideas, the Automation script user, the name of the password parameterized, through the Python document we found that Python read the file: The entire file read, read-line, fixed byte read.Did not find a good way to read two data at a time.Create two files, each of which holds t

Selenium+python Automation 92-Multithreading launches multiple different browsers

Hantomjs") Driver=Webdriver. PHANTOMJS ()returnDriverElse: Print("Not found this browser,you can use ' Firefox ', ' Chrome ', ' ie ' or ' phantomjs '") exceptException as msg:Print("The exception occurred when starting the browser:%s"%str (msg))Multithreading launches different browsers1. Code reference:#Coding:utf-8 fromSeleniumImportWebdriverImport Time fromTomorrowImportThreadsdefStartbrowser (name):"""Open Browser functions, "Firefox", "Chrome", "ie", "PHANTOMJS"""" Try:

Selenium+python Automation 78-autoit parameterization and batch upload "reprint"

secondiframe = Driver.find_elements_by_tag_name (' iframe ') [1]# Switch to the IFRAMEDriver.switch_to_frame (IFRAME)# Click to open the File upload buttonDriver.find_element_by_name (' file '). Click ()Time.sleep (3)# Execute AutoIt Upload filePrint IOs.system ("C:\Users\Gloria\Desktop\cmdjpg.exe%s"% i) # your own local. exe pathTime.sleep (3)Driver.switch_to_default_content () # cut back to the main page# # Method Two: Cycle Click Upload Image# for I in range (4):# # 1 O'Clock Open editor pic

Selenium+python Automation 77-autoit File Upload "reprint"

file to upload the path of the file to write dead, each time can only pass the fixed image, we actually test when we want to pass a different picture, so you need to parameterize the file path.To parameterize the passed-in parameters, you can pass the AutoIt command-line arguments: is a string parameter” 99In the script, command-line arguments can be obtained using the following variables:$CmdLine[0] ; = 3$CmdLine[1] ; = param1$CmdLine[2] ; = "Thi

Learning Python+selenium Automation Thoughts

Finally, I stepped into the path of learning automation. Originally is to exclude the code, but did not think really seriously to learn the time, found that he is interesting, finished homework feel good to have a sense of accomplishment. Learning process, also encountered a lot of problems, try to find a solution to the problem, can not find a solution, there are colleagues to ask. This kind of learning opportunity, very rare AH.Have now learned the

Python+selenium Automation Framework construction get started to practical (i)-Framework Solutions

1. The entire framework directory is as follows:Constant: Store some constants, such as the URL of the test, and the elements that some PR methods need to use;Errorpicture: Used to store errors during automatic operation;Framework: Classes and methods for storing some basic;Pages: a page class for storing pageobject;Publicmethod: Used to store some PR methods;Question: Used to store some problems encountered during the development process, and where t

Java + Selenium + TestNG + Maven framework for Web Automation

target folder like:.. \target\cpstestdemo-0.0.1.jar6. Execute. Jar without Eclipse7. LogUsing log4j2 to log console log outputXML version= "1.0" encoding= "UTF-8"?>ConfigurationStatus= "WARN"> appenders> Consolename= "Console"Target= "System_out"> Patternlayoutpattern= "%d{yyyy-mm-dd HH:mm:ss. SSS} [%-5level]%logger{-3}:%l-%msg%n " /> Console> Rollingfilename= "Rollingfile"FileName= "Log/console.log"Filepattern= "log/$${date:yyyy-mm-dd}/console-%d{mm-dd-yyyy}-

Selenium+python Automation 89-sending mail when a use case does not pass

; Strong>duration:strong> 0:00:00;, p class=" Attribute ">strong>status:strong> Pass 2 Failure 1 Error 1P>] QQ Exchange Group: 226296743 Pass 2 Failure 1 Error 1 Write a judgment function1. Judging the result, write a function that determines if there is a failure case # Coding:utf-8From BS4Import BeautifulSoupImport sysreload (SYS) sys.setdefaultencoding (' UTF8 ')DefIs_result_pass():TryWith open ("Result.html","R")As Fp:f = Fp.read ()# Read Report soup = BeautifulSoup (f,"Html.parse

SELENIUM+JDBC Implementing parameter Automation testing

); Username.sendkeys (name); //enter the corresponding password value for(intJ=0;j) {password.clear (); String Pass=Passwordlist.get (j); Password.sendkeys (pass); } login.click (); webdriverwait wait=NewWebdriverwait (driver,10); Webelement Logoutbutton= Wait.until (Expectedconditions.elementtobeclickable (By.xpath (".//*[@id = ' site_nav_md ']/ul/li[3]/a[2]"))); Logoutbutton.click (); } }}View CodeThe above code is to give yourself a recor

Selenium+python Automation 87-chrome Browser silent mode start (headless)

ObjectiveSELENIUM+PHANTOMJS can open the browser without interface, implement the silent mode to start the browser to complete the automated test, this mode is excellent, do not need to occupy the computer screen.However, phantomjs this hole is still more, and encountered problems can not see the page, unable to troubleshoot problems.In fact, the Chrome browser can also implement silent mode, do not display the page on the computer, can also implement

CSS positioning of Selenium+python automation

) to locate the child element, which is the XPath The wording is very different, in fact, very good understanding, direct translation came to the first few childrenSix, CSS: Logical Operations1.css can also implement a logical operation, matching two properties, which is not the same as XPath, no need to write the and keywordSeven, CSS: Fuzzy Matching1.css Fuzzy matching contains (' xxx '), although the Internet with a variety of data display can be used, but the small part of the

Total Pages: 10 1 .... 5 6 7 8 9 10 Go to: Go

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.