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 +4 -4
- data/lib/scoutui/base/q_browser.rb +19 -0
- data/lib/scoutui/commands/type.rb +16 -0
- data/lib/scoutui/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ac5746f66a5dc3d162f95bb123752a2ccde67780
|
4
|
+
data.tar.gz: d1c901a73b3536cee603390cc2589d479815eef2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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')
|
data/lib/scoutui/version.rb
CHANGED