Class: TestSteps::Handlers::CaptureAlert

Inherits:
Base
  • Object
show all
Defined in:
lib/functions/handlers/capture_alert.rb

Instance Method Summary collapse

Methods inherited from Base

#login_button, #login_check, #login_process, #mem_word_check, #open_url_process, perform, #portal_mem_word, register

Instance Method Details

#perform(step_attributes) ⇒ Object



8
9
10
11
12
13
14
15
16
# File 'lib/functions/handlers/capture_alert.rb', line 8

def perform(step_attributes)
  Browser.b.div(class: 'alert').exist?
  alertmsg = Browser.b.div(class: 'alert').text
  MyLog.log.info("Alert shown: #{alertmsg}")
  true
rescue StandardError
  MyLog.log.warn('No Alert Found')
  false
end