scoutui 2.0.3.40.pre → 2.0.3.41.pre

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cde554dc3abdd091326a306b8081d0238f7600d1
4
- data.tar.gz: 79992a934285ab8ff26402cfb38aeeaa73ceaede
3
+ metadata.gz: ac5746f66a5dc3d162f95bb123752a2ccde67780
4
+ data.tar.gz: d1c901a73b3536cee603390cc2589d479815eef2
5
5
  SHA512:
6
- metadata.gz: 05b7fef396b7022b454558852f425bb0d5cef219c51682bbd9ba2cf5bc8d1f23e1bce30d762e179d3c8f6e09227cb99c9bf6929857c4003b0b2290fb509d6571
7
- data.tar.gz: 1be89b9263aa403af4febb2e91a99b292ffa892dfd95e0f69a71e761d1db6878f6c93f075880809be2c8631a9786bfd3deb4e092edc2d6d620ac56fcbc6de147
6
+ metadata.gz: 2d4e34121dcc3c9f71a488e798873e7a8b1d86cc0dd13152c25db9b92f9ef3bdb3a1c56c98c52dde991ff1520bd03884d8c9b836388f3ec7a12bf0c6399c439d
7
+ data.tar.gz: 31c3927913965b23fa6e70156b51efd8edef9640f44094502380d1c0c088141f31cd1361e8ab9ebdbbe629d1d682e5b8f1ccf34bab7de55c44f84ec8dde332a1
@@ -255,6 +255,25 @@ module Scoutui::Base
255
255
  end
256
256
  end
257
257
 
258
+ def self.isStale?(_obj)
259
+ rc=false
260
+
261
+ begin
262
+
263
+ if _obj.is_a?(Selenium::WebDriver::Element)
264
+ _obj.enabled?
265
+ end
266
+
267
+ rescue Selenium::WebDriver::Error::NoSuchElementError
268
+ rc=true
269
+
270
+ rescue Selenium::WebDriver::Error::StaleElementReferenceError
271
+ rc=true
272
+ end
273
+
274
+ rc
275
+ end
276
+
258
277
  def self.findElement(drv, _locator, _frames, _timeout=nil)
259
278
 
260
279
  Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " findElement(#{_locator}, #{Scoutui::Commands::Utils.instance.getFrameSearch})"
@@ -84,6 +84,14 @@ module Scoutui::Commands
84
84
 
85
85
  obj = Scoutui::Base::QBrowser.findElement(@drv, _xpath, Scoutui::Commands::Utils.instance.getFrameSearch(), Scoutui::Commands::Utils.instance.getTimeout)
86
86
 
87
+ wait = Selenium::WebDriver::Wait.new(:timeout => Scoutui::Commands::Utils.instance.getTimeout)
88
+ isDisplayed = wait.until {
89
+ if Scoutui::Base::QBrowser.isStale?(obj)
90
+ obj = Scoutui::Base::QBrowser.findElement(@drv, _xpath, Scoutui::Commands::Utils.instance.getFrameSearch(), Scoutui::Commands::Utils.instance.getTimeout)
91
+ end
92
+ true if obj.displayed?
93
+ }
94
+
87
95
  Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " type(#{_val})"
88
96
  Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " tag : #{obj.tag_name}" if obj.is_a?(Selenium::WebDriver::Element)
89
97
 
@@ -98,6 +106,9 @@ module Scoutui::Commands
98
106
  begin
99
107
  wait = Selenium::WebDriver::Wait.new(:timeout => Scoutui::Commands::Utils.instance.getTimeout)
100
108
  isDisplayed = wait.until {
109
+ if Scoutui::Base::QBrowser.isStale?(obj)
110
+ obj = Scoutui::Base::QBrowser.findElement(@drv, _xpath, Scoutui::Commands::Utils.instance.getFrameSearch(), Scoutui::Commands::Utils.instance.getTimeout)
111
+ end
101
112
  true if obj.displayed?
102
113
  }
103
114
  rescue Selenium::WebDriver::Error::TimeOutError => ex
@@ -153,6 +164,11 @@ module Scoutui::Commands
153
164
  Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " rawText : #{_text_to_type}"
154
165
  _text_to_type = Scoutui::Commands::Utils.instance.expandMacro(_text_to_type)
155
166
  Scoutui::Logger::LogMgr.instance.debug __FILE__ + (__LINE__).to_s + " Text to type : #{_text_to_type}"
167
+
168
+ if Scoutui::Base::QBrowser.isStale?(obj)
169
+ obj = Scoutui::Base::QBrowser.findElement(@drv, _xpath, Scoutui::Commands::Utils.instance.getFrameSearch(), Scoutui::Commands::Utils.instance.getTimeout)
170
+ end
171
+
156
172
  obj.send_keys(_text_to_type)
157
173
 
158
174
  if !pageElt.nil? && pageElt['page'].has_key?('then')
@@ -1,3 +1,3 @@
1
1
  module Scoutui
2
- VERSION = "2.0.3.40.pre"
2
+ VERSION = "2.0.3.41.pre"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scoutui
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.3.40.pre
4
+ version: 2.0.3.41.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Kim