LDTP  3.5.0
 All Pages
click

Syntax

click('<window name>', '<component name>')

Description

click on radio button / check box / push button/ combo box/ radio menu item/ toggle button/ radio button.

ImplementationDetails

Radio Button

If radio button is already in checked state, then this function will uncheck(unset) it.

If radio button is already in unchecked state, then this function will check(set) it.

Refer:

Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/core.py

Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/core.py

Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Generic.cs

Check Box

If check box is already in checked state, then this function will uncheck(unset) it.

If check box is already in unchecked state, then this function will check(set) it.

Refer:

Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/core.py

Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/core.py

Push Button

If push button state is enabled, then click on the object.

Refer:

Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/core.py

Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/core.py

Toggle Button

Click on the toggle button.

Refer:

Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/core.py

Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/core.py

Combo Box

Clicks on combo box, drop down list of combo box will be visible if not already else drop down list of combo box closes.

Refer:

Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/combo_box.py

Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/combox_box.py

Examples

Example for push button(With respect to gedit open dialog)

click('dlgOpen', 'btnOpen')

For Check box, Check menu item, on doing this action, the state will be toggled.

For Radio button, Radio menu item, if they are not already selected, they are selected, otherwise silently ignored.

Author
Nagappan Alagappan nagap.nosp@m.pan@.nosp@m.gmail.nosp@m..com


Linux Desktop Testing Project