Class: Taf::TestSteps::Handlers::ListAllDropdownValues

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

Overview

List all Dropdown Values function.

Instance Method Summary collapse

Methods inherited from Base

#initialize, #login_check, #login_process, perform, #portal_mem_word, 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
19
# File 'lib/taf/test_steps/handlers/base/list_all_dropdowns_values.rb', line 10

def perform
  Taf::Browser.b.element("#{@locate}": @value).wait_until(&:exists?)
  Taf::Browser.b.select_list("#{@locate}": @value).options.each do |i|
    Taf::MyLog.log.info("List of dropdown for #{@value} are: #{i.text}")
    return true
  end
rescue StandardError
  Taf::MyLog.log.warn("List dropdown: #{@value} does not exist")
  false
end