Calabash-android pre-defined steps

Source: Internet
Author: User

A series of predefined steps are listed in Canned_steps.md in the Calabash-android directory, and these steps are defined in the Calabash-android\steps\ directory. This article describes these steps and usage.

1. Assert steps: Defined in ASSERT_STEPS.RB

The assertion sees the text:

Then/^i see the text "([^\]]*)" $/then/^i See "([^\]]*)" $/then/^i should See "([^\]]*)" $/then/^i should see text Contai Ning "([^\"]*) "$/

Cases:

Feature:hello word  scenario:see Hello word   the I see the text "Hello World"
Assertion does not see text:

Then /^I should not see "([^\"]*)"$/Then /^I don‘t see the text "([^\"]*)"$/Then /^I don‘t see "([^\"]*)"$/  

2. Enter steps: Defined in

Click the check box

Then /^I toggle checkbox number (\d+)$/ do |index|
Cases:
#点击第一个checkboxThen I togle checkbox number 1

Context_menu_steps:

Then/^i Long Press "([^\]"]*) "$/do |text| example: then I long presses" Stop "in its properties text=" Stop "view

3. Button

Click the Back button:

Then I go back
Click menu

Then I press the Menu key
Impersonate the user to enter Entey on the keyboard

Then I Press the Enter button

4. Gestures

Swipe left

Then I Swipe left
Swipe to the right

Then I swipe right

Swipe up and down for the list control

Then I scroll downthen i scroll up

Select Menu_item from the menu

#从menu中选择quitThen I Select "Quit" from the menu

Drag from one point to another

Then/^i drag from (\d+):(\d+) to (\d+):(\d+) moving with (\d+) steps$/do |from_x, from_y, to_x, To_y, steps|


Calabash-android pre-defined steps

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.