Class: TestSteps::Handlers::HandleBrowserWindow

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

Overview

Handle Browser Window function.

Instance Method Summary collapse

Methods inherited from Base

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

Constructor Details

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

Instance Method Details

#performObject



11
12
13
14
15
16
17
18
19
20
# File 'lib/functions/handlers/handle_browser_window.rb', line 11

def perform
  Browser.b.window(title: @value.to_s).use
  sleep 3
  Browser.b.title.eql?(@value.to_s)
  MyLog.log.info("Window title: #{@value} is correct")
  true
rescue StandardError
  MyLog.log.warn("Window not found: #{@value}")
  false
end