Automated Test Learning (iii) Selenium command

Source: Internet
Author: User

About, Selenium command this part, in order to facilitate the novice like me to understand, I use the example to tell the way the command. Learn to summarize it! Learn from each other. Oh.

Rookie selenium commands are often referred to as Selenese, and there are a series of commands that are required to run test cases.

----//Actions

----//Actions

The actions describe what the user will do. The action takes two forms: action and actionandwait, the action executes immediately, and actionandwait assumes that it takes a long time to get the action to ring, while the open will automatically process the wait time.

================= Case 1 ================================================

Operation Description:

Open the Google homepage, enter the "Selenium Environment Configuration" field, click the "Search" button.

Command Description:

Open Open (URL)-Opens the URL in the browser and can accept both a relative and an absolute path-note: The URL must be within the same security limits as the browser

Highlight (Locator)

-Temporarily change the background color of the specified element to yellow to facilitate debugging.

Pause Pause (millisenconds)-pauses selenium script execution based on a specified time-commonly used when debugging scripts or waiting for server segment responses

Type type (inputlocator, value)-simulates the manual input process, entering values into the specified input-also suitable for assigning values to check and radio boxes

Click Click (elementlocator)-click Connect, button, check and checkbox-If you need to wait for a response after clicking, use "clickandwait"- If you need to go through the JavaScript Alert or Confirm dialog box to continue, you need to call verify or assert to tell selenium what you expect to do with the dialog box.

GoBack () analog Click on the browser's Back button close () analog Click on the Browser off button

=============== Case 2 =======================================

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.