Class: YuiRestClient::Widgets::Button

Inherits:
Base
  • Object
show all
Defined in:
lib/yui_rest_client/widgets/button.rb

Overview

Class representing a button in UI. It can be YQWizardButton, YPushButton.

Instance Method Summary collapse

Methods inherited from Base

#action, #collect_all, #debug_label, #enabled?, #exists?, #initialize, #property

Methods included from YuiRestClient::Waitable

#wait_until, #wait_while

Constructor Details

This class inherits a constructor from YuiRestClient::Widgets::Base

Instance Method Details

#clickButton

Sends action to click the button in UI.

Examples:

Click button with id ‘test’

app.button(id: 'test').click

Returns:

  • (Button)

    in case action is successful



11
12
13
14
# File 'lib/yui_rest_client/widgets/button.rb', line 11

def click
  action(action: Actions::PRESS)
  self
end

#fkeyInteger

Returns fkey value for the button.

Examples:

Get fkey value for YQWizardButton

{
  "class": "YQWizardButton",
  "debug_label": "Cancel",
  "fkey": 9,
  "id": "cancel",
  "label": "&Cancel"
}
fkey = app.button(id: 'cancel').fkey

Returns:

  • (Integer)

    F (function) key that can be used as shortcut to press the button.



28
29
30
# File 'lib/yui_rest_client/widgets/button.rb', line 28

def fkey
  property(:fkey)
end