Class: Taf::TestSteps::Handlers::RadioCheckboxButton

Inherits:
Base
  • Object
show all
Defined in:
lib/taf/test_steps/handlers/base/radio_or_checkbox_button.rb

Overview

Radio or Checkbox Button function.

Instance Method Summary collapse

Methods inherited from Base

#initialize, #login_check, #login_process, perform, register, #url_check

Constructor Details

This class inherits a constructor from Taf::TestSteps::Handlers::Base

Instance Method Details

#performObject



10
11
12
13
14
15
16
17
18
# File 'lib/taf/test_steps/handlers/base/radio_or_checkbox_button.rb', line 10

def perform
  Taf::Browser.b.find_element("#{@locate}": @value).click
  Taf::Browser.b.find_element("#{@locate}": @value).selected?
  Taf::MyLog.log.info("Check box / Radio: #{@value} has been selected")
  true
rescue StandardError
  Taf::MyLog.log.warn("Check box / Radio: #{@value} does not exist")
  false
end