Class: Scoutui::Commands::Utils

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/scoutui/commands/utils.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeUtils

Returns a new instance of Utils.



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
# File 'lib/scoutui/commands/utils.rb', line 15

def initialize
  @command_list=['pause',
                 'assignvar',
                 'assignments',
                 'doUntil',
                 'existsAlert',
                 'clickJsAlert',
                 'dumpvars',
                 'fillform',
                 'frame',
                 'highlight',
                 'submitform',
                 'type',
                 'click',
                 'loaddata',
                 'connect',
                 'loaddb',
                 'loadjs',
                 'executecommands',
                 'definecommands',
                 'loadrequirements',
                 'mouseover',
                 'navigate',
                 'select',
                 'select_window',
                 'sleep',
                 'uploadfiles',
                 'verifyelt',
                 'verifyelement',
                 'verifyform',
                 'whileDo']
  @totalCommands={}
  @timeout=30
  @command_list.each do |c|
    @totalCommands[c]=0
  end

  @useFrameSearch = false


  @transList={
      '__CHAR10__' => lambda { },
      '__CITY__' => lambda { Faker::Address.city.to_s },
      '__COMPANY.NAME__' => lambda { Faker::Company.name.to_s },
      '__COMPANY.EIN__' => lambda { Faker::Company.ein.to_s },
      '__COUNTRY__' => lambda { Faker::Address.country.to_s },
      '__DATE__' => lambda { Time.now().to_s },
      '__EMAIL__' => lambda { Faker::Internet.email.to_s},
      '__DDMMYY__' => lambda { Date.parse(Time.now.to_s).strftime("%d%m%Y") },
      '__DD/MM/YYYY__' => lambda { Date.parse(Time.now.to_s).strftime("%d/%m/%Y") },
      '__DD/MM/YYYY\+\d+__' => lambda { |s|
        Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " Process s => #{s}"
        d=s.match(/__DD\/MM\/YYYY\+(\d+)__/)[1]
        d=(Date.today + d.to_i).strftime("%d/%m/%Y")
        Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + "    new date: #{d}"
        d
      },
      '__DD/MM/YYYY\-\d+__' => lambda { |s|
        Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " Process s => #{s}"
        d=s.match(/__DD\/MM\/YYYY\-(\d+)__/)[1]
        d=(Date.today - d.to_i).strftime("%d/%m/%Y")
        Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + "    new date: #{d}"
        d
      },
      '__MM/DD/YY__' => lambda { Date.parse(Time.now.to_s).strftime("%m/%d/%y") },
      '__MM/DD/YY\+\d+__' => lambda { |s|
        Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " Process s => #{s}"
        d=s.match(/__MM\/DD\/YY\+(\d+)__/)[1]
        d=(Date.today + d.to_i).strftime("%m/%d/%y")
        Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + "    new date: #{d}"
        d
      },
      '__MMDDYY__' => lambda { Date.parse(Time.now.to_s).strftime("%m%d%y") },
      '__MMDDYY\+\d+__' => lambda { |s|
        Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " Process s => #{s}"
        d=s.match(/__MMDDYY\+(\d+)__/)[1]
        d=(Date.today + d.to_i).strftime("%m%d%y")
        Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + "    new date: #{d}"
        d
      },
      '__MM/DD/YYYY__' => lambda { Date.parse(Time.now.to_s).strftime("%m/%d/%Y") },
      '__MM/DD/YYYY\+\d+__' => lambda { |s|
        Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " Process s => #{s}"
        d=s.match(/__MM\/DD\/YYYY\+(\d+)__/)[1]
        d=(Date.today + d.to_i).strftime("%m/%d/%Y")
        Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + "    new date: #{d}"
        d
      },
      '__MM/DD/YYYY\-\d+__' => lambda { |s|
        Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " Process s => #{s}"
        d=s.match(/__MM\/DD\/YYYY\-(\d+)__/)[1]
        d=(Date.today - d.to_i).strftime("%m/%d/%Y")
        Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + "    new date: #{d}"
        d
      },
      '__MMDDYYYY__' => lambda { Date.parse(Time.now.to_s).strftime("%m%d%Y") },
      '__MMDDYYYY\+\d+__' => lambda { |s|
        Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " Process s => #{s}"
        d=s.match(/__MMDDYYYY\+(\d+)__/)[1]
        d=(Date.today + d.to_i).strftime("%m%d%Y")
        Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + "    new date: #{d}"
        d
      },
      '__PARAGRAPH__' => lambda { Faker::Lorem.paragraph.to_s },
      '__PASSWORD__' => lambda { Faker::Internet.password.to_s },
      '__PHONENUMBER__' => lambda { Faker::PhoneNumber.phone_number.to_s },
      '__PHONENUMBER.AREACODE__' => lambda { Faker::Config.locale = 'en-US'; Faker::PhoneNumber.area_code.to_s },
      '__PHONENUMBER.EXCHANGE__' => lambda { Faker::Config.locale = 'en-US'; Faker::PhoneNumber.exchange_code.to_s },
      '__PHONENUMBER.SUBSCRIBER__' => lambda { Faker::PhoneNumber.subscriber_number.to_s },
      '__PHONENUMBER.EXT__' => lambda { Faker::PhoneNumber.extension.to_s },
      '__NUMBER__' => lambda { Faker::Number.number(5).to_s},
      '__NUMBER(1)__' => lambda { Faker::Number.number(1).to_s},
      '__NUMBER(2)__' => lambda { Faker::Number.number(2).to_s},
      '__NUMBER(5)__' => lambda { Faker::Number.number(5).to_s},
      '__NUMBER(8)__' => lambda { Faker::Number.number(8).to_s},
      '__NUMBER(10)__' => lambda { Faker::Number.number(10).to_s},
      '__NUMBER(1,28)__' => lambda { Faker::Number.between(1, 28).to_s },
      '__NUMBER(1, 28)__' => lambda { Faker::Number.between(1, 28).to_s },
      '__NUMBER(1,29)__' => lambda { Faker::Number.between(1, 29).to_s },
      '__NUMBER(1, 29)__' => lambda { Faker::Number.between(1, 29).to_s },
      '__NUMBER(1,30)__' => lambda { Faker::Number.between(1, 30).to_s },
      '__NUMBER(1, 30)__' => lambda { Faker::Number.between(1, 30).to_s },
      '__NUMBER(1,31)__' => lambda { Faker::Number.between(1, 31).to_s },
      '__NUMBER(1, 31)__' => lambda { Faker::Number.between(1, 31).to_s },
      '__SENTENCE__' => lambda { Faker::Lorem.sentence.to_s },
      '__STREET__' => lambda { Faker::Address.street_address.to_s},
      '__STATE__' => lambda { Faker::Address.state.to_s },
      '__TIME__' => lambda { Time.now.to_s },
      '__TIME.MMDDYY__' => lambda { Time.now.strftime "%m%d%y" },
      '__TIME.MMDDYY.HM__' => lambda { Time.now.strftime "%m%d%y.%H%M" },
      '__TIME.MMDDYY.HMS__' => lambda { Time.now.strftime "%m%d%y.%H%M%S" },
      '__USERNAME__' => lambda { Faker::Internet.user_name.to_s },
      '__ZIP__' => lambda { Faker::Address.zip_code.to_s },
  }

  @hwnds = { :current => nil, :previous => nil, :handles => [] }
end

Instance Attribute Details

#hwndsObject

Returns the value of attribute hwnds.



12
13
14
# File 'lib/scoutui/commands/utils.rb', line 12

def hwnds
  @hwnds
end

#timeoutObject

Returns the value of attribute timeout.



11
12
13
# File 'lib/scoutui/commands/utils.rb', line 11

def timeout
  @timeout
end

#totalCommandsObject

Returns the value of attribute totalCommands.



10
11
12
# File 'lib/scoutui/commands/utils.rb', line 10

def totalCommands
  @totalCommands
end

#useFrameSearchObject

Returns the value of attribute useFrameSearch.



13
14
15
# File 'lib/scoutui/commands/utils.rb', line 13

def useFrameSearch
  @useFrameSearch
end

Instance Method Details

#enableFrameSearchObject



211
212
213
214
# File 'lib/scoutui/commands/utils.rb', line 211

def enableFrameSearch()
  Scoutui::Logger::LogMgr.instance.debug "EnableFrameSearch(true)"
  setEnableFrameSearch(true)
end

#expandMacro(_text_to_type) ⇒ Object



154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
# File 'lib/scoutui/commands/utils.rb', line 154

def expandMacro(_text_to_type)

  Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " expandMacro(#{_text_to_type})"

  if _text_to_type.nil? || _text_to_type.empty?
    return ""
  end

  @transList.each_pair do |_k, _v|

    if _text_to_type.include?(_k.to_s)
      _dynamicStr = _v.call.to_s
      _text_to_type.gsub!(_k.to_s, _dynamicStr)
    elsif _text_to_type.match(/#{_k.to_s}/)
      _dynamicStr = _v.call(_text_to_type.to_s)
      _text_to_type.gsub!(/#{_k.to_s}/, _dynamicStr)
    end
  end

  Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " expandMacro : #{_text_to_type}"

  _text_to_type.to_s

end

#getFrameSearchObject



203
204
205
# File 'lib/scoutui/commands/utils.rb', line 203

def getFrameSearch()
  @userFrameSearch
end

#getTimeoutObject



251
252
253
# File 'lib/scoutui/commands/utils.rb', line 251

def getTimeout()
  @timeout.to_i
end

#isAssignments?(_action) ⇒ Boolean

Returns:

  • (Boolean)


263
264
265
# File 'lib/scoutui/commands/utils.rb', line 263

def isAssignments?(_action)
  _action.is_a?(String) &&  !_action.match(/^\s*(assignments)\s*$/).nil?
end

#isAssignVar?(_action) ⇒ Boolean

Returns:

  • (Boolean)


267
268
269
# File 'lib/scoutui/commands/utils.rb', line 267

def isAssignVar?(_action)
  _action.is_a?(String) &&  !_action.match(/assign\(([\w]+)\s*\,(.*)\)\s*$/i).nil?
end

#isClick?(_action) ⇒ Boolean

Returns:

  • (Boolean)


291
292
293
# File 'lib/scoutui/commands/utils.rb', line 291

def isClick?(_action)
  _action.is_a?(String) &&  !_action.match(/click\(/i).nil?
end

#isConnect?(_action) ⇒ Boolean

Returns:

  • (Boolean)


303
304
305
# File 'lib/scoutui/commands/utils.rb', line 303

def isConnect?(_action)
  _action.is_a?(String) &&  !_action.match(/^\s*connect\s*$/i).nil?
end

#isCSS(_locator) ⇒ Object



220
221
222
223
224
225
226
227
228
229
230
# File 'lib/scoutui/commands/utils.rb', line 220

def isCSS(_locator)
  rc=nil

  if _locator.match(/^css\=/i)
    rc = _locator.match(/\s*(css\=.*)/i)[1].to_s.strip
  elsif _locator.match(/^#/i)
    rc=_locator.strip
  end

  rc
end

#isDefineCommands?(_action) ⇒ Boolean

Returns:

  • (Boolean)


319
320
321
# File 'lib/scoutui/commands/utils.rb', line 319

def isDefineCommands?(_action)
  _action.is_a?(String) && !_action.match(/^\s*definecommand[s]*\s*$/i).nil?
end

#isDoUntil?(_action) ⇒ Boolean

Returns:

  • (Boolean)


255
256
257
# File 'lib/scoutui/commands/utils.rb', line 255

def isDoUntil?(_action)
  _action.is_a?(Hash) && _action.has_key?('do') && !_action.has_key?('while')
end

#isDumpVars?(_action) ⇒ Boolean

Returns:

  • (Boolean)


307
308
309
# File 'lib/scoutui/commands/utils.rb', line 307

def isDumpVars?(_action)
  _action.is_a?(String) &&  !_action.match(/^\s*dumpvars\s*$/i).nil?
end

#isExecuteCommands?(_action) ⇒ Boolean

Returns:

  • (Boolean)


315
316
317
# File 'lib/scoutui/commands/utils.rb', line 315

def isExecuteCommands?(_action)
  _action.is_a?(String) && !_action.match(/^\s*executecommand[s]*\s*$/i).nil?
end

#isExistsAlert?(_action) ⇒ Boolean

Returns:

  • (Boolean)


275
276
277
# File 'lib/scoutui/commands/utils.rb', line 275

def isExistsAlert?(_action)
  _action.is_a?(String) &&  !_action.match(/[!]*(exist[s]*_*alert|existAlert|existsAlert|existsJsAlert|existsJsConfirm|existsJsPrompt)\(/i).nil?
end

#isFillForm?(_action) ⇒ Boolean

Returns:

  • (Boolean)


299
300
301
# File 'lib/scoutui/commands/utils.rb', line 299

def isFillForm?(_action)
  _action.is_a?(String) &&  !_action.match(/fillform\(/i).nil?
end

#isFrame?(_action) ⇒ Boolean

Returns:

  • (Boolean)


279
280
281
# File 'lib/scoutui/commands/utils.rb', line 279

def isFrame?(_action)
  _action.is_a?(String) &&  _action.match(/^\s*(frame|switchframe|switch_frame)\s*\(/i)
end

#isFrameSearch?Boolean

Returns:

  • (Boolean)


216
217
218
# File 'lib/scoutui/commands/utils.rb', line 216

def isFrameSearch?()
  @userFrameSearch.is_a?(TrueClass) || (@userFrameSearch.is_a?(String) && @userFrameSearch.match(/true/i))
end

#isGetAlert?(_action) ⇒ Boolean

Returns:

  • (Boolean)


295
296
297
# File 'lib/scoutui/commands/utils.rb', line 295

def isGetAlert?(_action)
  _action.is_a?(String) &&  !_action.match(/(get_*alert|clickjsconfirm|clickjsprompt|clickjsalert)/i).nil?
end

#isHighlight?(_action) ⇒ Boolean

Returns:

  • (Boolean)


283
284
285
# File 'lib/scoutui/commands/utils.rb', line 283

def isHighlight?(_action)
  _action.is_a?(String) &&   _action.match(/^\s*(highlight)/i)
end

#isLoadData?(_action) ⇒ Boolean

Returns:

  • (Boolean)


323
324
325
# File 'lib/scoutui/commands/utils.rb', line 323

def isLoadData?(_action)
  _action.is_a?(String) && !_action.match(/^\s*loaddata\s*$/i).nil?
end

#isLoadDB?(_action) ⇒ Boolean

Returns:

  • (Boolean)


311
312
313
# File 'lib/scoutui/commands/utils.rb', line 311

def isLoadDB?(_action)
  _action.is_a?(String) &&  !_action.match(/^\s*loaddb\s*$/i).nil?
end

#isLoadJs?(_action) ⇒ Boolean

Returns:

  • (Boolean)


327
328
329
# File 'lib/scoutui/commands/utils.rb', line 327

def isLoadJs?(_action)
  _action.is_a?(String) && !_action.match(/^\s*loadjs\s*$/i).nil?
end

#isLoadRequirements?(_action) ⇒ Boolean

Returns:

  • (Boolean)


332
333
334
# File 'lib/scoutui/commands/utils.rb', line 332

def isLoadRequirements?(_action)
  _action.is_a?(String) && !_action.match(/^\s*loadrequirements\s*$/i).nil?
end

#isMouseOver?(_action) ⇒ Boolean

Returns:

  • (Boolean)


336
337
338
# File 'lib/scoutui/commands/utils.rb', line 336

def isMouseOver?(_action)
  _action.is_a?(String) && !_action.match(/mouseover\(/).nil?
end

#isNavigate?(_action) ⇒ Boolean

Returns:

  • (Boolean)


368
369
370
# File 'lib/scoutui/commands/utils.rb', line 368

def isNavigate?(_action)
  !_action.nil? && _action.is_a?(String) && _action.match(/(navigate|url)\(/i)
end

#isPause?(_action) ⇒ Boolean

Returns:

  • (Boolean)


352
353
354
# File 'lib/scoutui/commands/utils.rb', line 352

def isPause?(_action)
  _action.is_a?(String) && !_action.match(/pause/).nil?
end

#isSelect?(_action) ⇒ Boolean

Returns:

  • (Boolean)


356
357
358
# File 'lib/scoutui/commands/utils.rb', line 356

def isSelect?(_action)
  !_action.nil? && _action.is_a?(String) && _action.match(/^\s*select\s*\(/i)
end

#isSelectWindow?(_action) ⇒ Boolean

Returns:

  • (Boolean)


271
272
273
# File 'lib/scoutui/commands/utils.rb', line 271

def isSelectWindow?(_action)
  _action.is_a?(String) &&  !_action.match(/^\s*select_window/i).nil?
end

#isSleep?(_action) ⇒ Boolean

Returns:

  • (Boolean)


360
361
362
# File 'lib/scoutui/commands/utils.rb', line 360

def isSleep?(_action)
  !_action.nil? && _action.is_a?(String) && _action.match(/^\s*sleep\s*\(\s*\d+\s*\)\s*$/i)
end

#isSubmitForm?(_action) ⇒ Boolean

Returns:

  • (Boolean)


344
345
346
# File 'lib/scoutui/commands/utils.rb', line 344

def isSubmitForm?(_action)
  _action.is_a?(String) && !_action.match(/submitform\(/).nil?
end

#isSwitchFrame?Boolean

Returns:

  • (Boolean)


207
208
209
# File 'lib/scoutui/commands/utils.rb', line 207

def isSwitchFrame?()
  @userFrameSearch.is_a?(String) && @userFrameSearch.match(/^\s*frame\s*\(/i)
end

#isType?(_action) ⇒ Boolean

Returns:

  • (Boolean)


340
341
342
# File 'lib/scoutui/commands/utils.rb', line 340

def isType?(_action)
  _action.is_a?(String) && !_action.match(/type[\!]*\(/).nil?
end

#isUploadFiles?(_action) ⇒ Boolean

Returns:

  • (Boolean)


364
365
366
# File 'lib/scoutui/commands/utils.rb', line 364

def isUploadFiles?(_action)
  !_action.nil? && _action.is_a?(String) && _action.match(/^\s*uploadfiles\s*$/i)
end

#isValid?(cmd) ⇒ Boolean

Returns:

  • (Boolean)


372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
# File 'lib/scoutui/commands/utils.rb', line 372

def isValid?(cmd)

  rc=true

  if isDoUntil?(cmd)
    @totalCommands['doUntil']+=1
  elsif isWhileDo?(cmd)
    @totalCommands['whileDo']+=1
  elsif isPause?(cmd)
    @totalCommands['pause']+=1
  elsif isAssignVar?(cmd)
    @totalCommands['assignvar']+=1
  elsif isAssignments?(cmd)
    @totalCommands['assignments']+=1
  elsif isExistsAlert?(cmd)
    @totalCommands['existsAlert']+=1
  elsif isFrame?(cmd)
    @totalCommands['frame']+=1
  elsif isGetAlert?(cmd)
    @totalCommands['clickJsAlert']+=1
  elsif isHighlight?(cmd)
    @totalCommands['highlight']+=1
  elsif isVerifyElt?(cmd)
    @totalCommands['verifyelt']+=1
  elsif isVerifyForm?(cmd)
    @totalCommands['verifyform']+=1
  elsif isFillForm?(cmd)
    @totalCommands['fillform']+=1
  elsif isSubmitForm?(cmd)
    @totalCommands['submitform']+=1
  elsif isType?(cmd)
    @totalCommands['type']+=1
  elsif isClick?(cmd)
    @totalCommands['click']+=1
  elsif isDumpVars?(cmd)
    @totalCommands['dumpvars']+=1
  elsif isMouseOver?(cmd)
    @totalCommands['mouseover']+=1
  elsif isConnect?(cmd)
    @totalCommands['connect']+=1
  elsif isExecuteCommands?(cmd)
    @totalCommands['executecommands']+=1
  elsif isDefineCommands?(cmd)
    @totalCommands['definecommands']+=1
  elsif isLoadDB?(cmd)
    @totalCommands['loaddb']+=1
  elsif isLoadData?(cmd)
    @totalCommands['loaddata']+=1
  elsif isLoadJs?(cmd)
    @totalCommands['loadjs']+=1
  elsif isLoadRequirements?(cmd)
    @totalCommands['loadrequirements']+=1
  elsif isSelect?(cmd)
    @totalCommands['select']+=1
  elsif isNavigate?(cmd)
    @totalCommands['navigate']+=1
  elsif isSelectWindow?(cmd)
    @totalCommands['select_window']+=1
  elsif isSleep?(cmd)
    @totalCommands['sleep']+=1
  elsif isUploadFiles?(cmd)
    @totalCommands['uploadfiles']+=1
  else
    rc=false
  end

  rc
end

#isVerifyElt?(_action) ⇒ Boolean

Returns:

  • (Boolean)


287
288
289
# File 'lib/scoutui/commands/utils.rb', line 287

def isVerifyElt?(_action)
  _action.is_a?(String) && !_action.match(/(verify[eE]lt|verify[eE]lement)\(/i).nil?
end

#isVerifyForm?(_action) ⇒ Boolean

Returns:

  • (Boolean)


348
349
350
# File 'lib/scoutui/commands/utils.rb', line 348

def isVerifyForm?(_action)
  _action.is_a?(String) && !_action.match(/verifyform\(/).nil?
end

#isWhileDo?(_action) ⇒ Boolean

Returns:

  • (Boolean)


259
260
261
# File 'lib/scoutui/commands/utils.rb', line 259

def isWhileDo?(_action)
  _action.is_a?(Hash) && _action.has_key?('while') && _action.has_key?('do')
end

#reset(stanza = nil) ⇒ Object



180
181
182
183
184
185
186
187
188
189
190
191
192
# File 'lib/scoutui/commands/utils.rb', line 180

def reset(stanza=nil)

  Scoutui::Utils::TestUtils.instance.setTC(nil)

  setEnableFrameSearch(false)

  if stanza.is_a?(Hash) && stanza.has_key?('page') && stanza['page'].has_key?('frames')
    Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " frames => #{stanza['page']['frames']}";

    setEnableFrameSearch(stanza['page']['frames'])
#        setEnableFrameSearch(!stanza['page']['frames'].to_s.match(/true/i).nil?)
  end
end

#resetFrameSearchObject



194
195
196
# File 'lib/scoutui/commands/utils.rb', line 194

def resetFrameSearch()
  setEnableFrameSearch(false)
end

#resetTimeout(t = 30) ⇒ Object



243
244
245
# File 'lib/scoutui/commands/utils.rb', line 243

def resetTimeout(t=30)
  setTimeout(t)
end

#setCurrentWindow(_w) ⇒ Object



233
234
235
236
237
238
239
240
241
# File 'lib/scoutui/commands/utils.rb', line 233

def setCurrentWindow(_w)
  if @hwnds[:previous].nil?
    @hwnds[:previous]=_w
  else
    @hwnds[:previous]=@hwnds[:current]
  end

  @hwnds[:current]=_w
end

#setEnableFrameSearch(b) ⇒ Object



198
199
200
201
# File 'lib/scoutui/commands/utils.rb', line 198

def setEnableFrameSearch(b)
  Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " setEnabledFrameSearch(#{b})"
  @userFrameSearch=b
end

#setTimeout(_t) ⇒ Object



247
248
249
# File 'lib/scoutui/commands/utils.rb', line 247

def setTimeout(_t)
  @timeout=_t.to_i
end