Selenium2lib library keyboard commonly used keywords combat

Source: Internet
Author: User

Press key keyword

Press F5 to view a description of the presses key keyword, such as:

Press Key keywords are user keys that are used to simulate elements determined by the locator through the keyboard. ' Value ' is a single character, a string or numeric ASCII code "\ \" value, need to pass 2 parameters (element positioning and value), the Help document provides 3 examples of instructions.

The usual special codes are as follows:

0:keys.null,

8:keys.back_space,

9:keys.tab,

10:keys.return,

13:keys.enter,

24:keys.cancel,

27:keys.escape,

32:keys.space,

42:keys.multiply,

43:keys.add,

44:keys.separator,

45:keys.subtract,

56:keys.decimal,

57:keys.divide,

59:keys.semicolon,

61:keys.equals,

127:keys.delete

Project Example one (single character):

Code implementation:

Operation Result:

Project Example Two (string):

Code implementation:

Operation Result:

Project Example Three (Chinese):

Code implementation:

Operation Result:

Project example four (special code):

Code implementation:

Operation Result:

Selenium2lib library keyboard commonly used keywords combat

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.