Class: YuiRestClient::Widgets::Richtext

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

Overview

Class representing a richtext in the UI. It can be YRichText.

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

Sends action to click a link inside a richtext control in the UI.

Examples:

Click link with value ‘test’

items.click_link('test')

Parameters:

  • value (String)

    href

Returns:

  • (Richtext)

    in case action is successful



12
13
14
15
# File 'lib/yui_rest_client/widgets/richtext.rb', line 12

def click_link(value)
  action(action: Actions::PRESS, value: value)
  self
end

#textString

Returns text value for the richtext.

Examples:

Get text value for YRichText

{
  "class": "YRichText",
  "enabled": false,
  "hstretch": true,
  "id": "test",
  "text": "<small>Select something here</small>",
  "vstretch": true,
  "vweight": 25
}
text = app.richtext(id: 'test').text # "<small>Select something here</small>"

Returns:

  • (String)

    value



31
32
33
# File 'lib/yui_rest_client/widgets/richtext.rb', line 31

def text
  property(:text)
end