class LibyuiClient::Widgets::Radiobutton

Class representing a RadioButton in the UI. It can be YRadioButton.

Public Instance Methods

select() click to toggle source

Sends action to select the radiobutton in UI. @return [Radiobutton] in case action is successful @example Select radiobutton with id 'test'

app.radiobutton(id: 'test').select
# File lib/libyui_client/widgets/radiobutton.rb, line 11
def select
  action(action: Actions::SELECT)
  self
end
selected?() click to toggle source

Returns the state of radiobutton (selected or not). Gets value from 'value' parameter in JSON representation of YRadioButton. @return [Boolean] true if the radiobutton is selected, false otherwise. @example Get state for radiobutton with id “manual”

{
  "class": "YRadioButton",
  "debug_label": "Manually",
  "id": "manual",
  "label": "&Manually",
  "notify": true,
  "value": false
}

@example

app.radiobutton(id: 'manual').selected? # false
# File lib/libyui_client/widgets/radiobutton.rb, line 30
def selected?
  property(:value)
end