Alibabacloud.com offers a wide variety of articles about selenium test case example, easily find your selenium test case example information here online.
Look at Selenium's website documentation, there are some small points in the automation use case design is very reliable. Learn a lot and can be used to optimize your code.1. Test Type:Testing Static ContentTesting LinksFunction TestsTesting Dynamic ElementsAjax TestsAssert vs. VerifyThe difference between assert and verify: If the assert is wrong, the subsequent content will be stopped, verify if wrong, it
Article 7 python Automated test application-selenium Advanced article--lamecho1.1 OverviewHello everyone! I am lamecho (spicy ugly), this article will be our introduction selenium use of the last advanced article, will bring you some dry food to help everyone can deal with the actual problems encountered in the real combat.1.2
course, you can also set additional parameters as required. A test case example:
Package Com.example.tests;import Com.thoughtworks.selenium.*;import Org.junit.before;import org.junit.Test;import Org.junit.after;public class Selenium extends Selenesetestcase {@Beforepublic void SetUp () throws Exception
Firefox browser https://addons.mozilla.org/en-US/firefox/addon/selenium-ide/ or https://github.com/SeleniumHQ/selenium/wiki/SeIDEReleaseNotes Download the installation Selenium IDE.Open the Selenium IDE first, click the red dot to open the script recording feature, then enter www.boobooke.com/in Firefox, open the site
This test framework can execute the written test case in a custom order, taking the selenium webdriver automated test case as an example:1. Create a new Java project named Fortestng, an
UnitTest Unit Test Framework and assertionsI. Introduction to the UNITTEST Unit testing framework1. Import UnitTest ModuleImport UnitTest2. Define test classClass Login (UnitTest. TestCase):3. Pre-conditions def setUp (self): u' no preconditions can write pass' 4. Test Case plus assertion # The
test scripts, such as common Java and Python language to write Selenium automated test scripts.Webdriver : in the Selenium 2.0 version, the new Webdriver was added. Webdriver is developed specifically for individual browsers, replacing JavaScript embedded in the Web application under
, the test script that clicks this button (Selenium Server) looks like this:
Selenium.click ("Adminhomeform");
However, your application may generate Dynamic HTML identifiers. In different instances of the page, the identifiers change. For example, an HTML element of a dynamic page might look like this:
This
typically need more than one test case. This is why Selenium uses a test suite. Test suites are used to group a number of test cases with similar functionality so that they run sequentially.Test suites, like
Automation test basics-Selenium browser operations, basics-seleniumSelenium mainly provides methods for operating various elements on the page, but it also provides methods for operating the browser itself, such as the browser size, browser back-up, forward button, and so on. I. Control the browser window size. Sometimes we want to open it in a browser size so that the accessed page can run in this size. Fo
tools exist problems. Then, as an example of a traditional test case written by a tester, demonstrates how to use Selenium to write an automated test script file for it. Then, it introduces how to develop the Selenium Automation
The project consultant suggested using selenium for automated testing of Web applications, and decided to automate testing of functional modules with simple business logic and stable functions, such as simple login modules. The following is a brief summary of the process.
I ran selenium on Ubuntu.1. Prepare the 1.1 Java environment
Install JDK on/usr/local/jdk1.6.0 _ 24Java ide 1.2
Because
operation interface to manipulate page elements.On the other hand, Webdriver can interact with the system bottom and send the action signal directly. such as what keys to press, where to move the mouse and so on. Visible selenium2.0 is much more powerful than 1.0. Here is a brief talk about Webdriver:Webdriver My understanding:He's kind of an API, a specification.A variety of browser vendors refer to this specification to give the selenium the inter
PHANTOMJS (. exe)
Opera
Operadriver (. exe)
Safari
Safaridriver.safariextz
You'll need to download additional, and the major browsers. The drivers for Chrome, Firefox, Phantomjs, Opera, and Microsoft ' s IE and Edge Web browsers is all standalone executables That should is placed on your system PATH. The Safaridriverbrowser extension should is installed in your browser before using Selenium; We reco
http://blogs.360.cn/360qtest/2014/04/01/%E5%88%A9%E7%94%A8selenium%E8%87%AA%E5%8A%A8%E5%8C%96%E6%B5%8B%E8%AF% 95android-wap%e9%a1%b5/There are two main types of automated testing for smartphone-side applications: One is app-based APK automation test and the other is the WAP page test of the browser. At present, more is the first case, the application of automated
test case run.
Explains that client library files pass commands to the server. The server then uses the Selenium-core JavaScript command to pass to the browser, which uses its own JavaScript translator to execute the selenium command. This means that the Selenese actions and validations in the
UnitTest is a unit test framework that is a unit test framework for Python programming. Sometimes it is called "Pyunit", which is the Python language version of JUnit. Here, JUnit is the Java Language Unit test framework, Java has a very useful unit test framework called TESTNG, this series only learn python, so only n
In the production environment, QA will run dozens of hundred test case at the same time. If you use a single machine serial, it is a very time-consuming thing, estimated than the hand point is not much faster. With parallel scenarios, there are two ways to write your own parallel framework, one to use a ready-made selenium Grid.Write your own parallel framework,
values entered in the retrieval6. Running in eclipseTo export files from the Selenium IDEExport Test Case as ... ->junit3 (Remote Control), exported as a Java file (e.g. Test.java)Eclipse new test Project, introducing the newly exported Test.java fileProject references related library files, add jar packages, and JUni
under the Scripts folder2. Input directive:Pip.exe Install selenium If the progress bar is shown to 100%, it is already installed (if the abnormal cause is exited and you know the progress is up to 100%)3. Selenium can support a lot of browsers, but to install the corresponding browser driver , such as My computer's browser is v56, the corresponding download chromedriver version v2.29(Chrome is used in the
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.