soda 1.4.5 → 1.4.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -394,6 +394,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
394
394
  <accessor type="string">jscriptevent</accessor>
395
395
  <accessor type="string">cssprop</accessor>
396
396
  <accessor type="string">cssvalue</accessor>
397
+ <accessor type="boolean">clear</accessor>
397
398
  </soda_attributes>
398
399
  </select>
399
400
 
@@ -784,9 +784,13 @@ if (current_browser_id > -1) {
784
784
  d.setAttribute("id", "Sodahack");
785
785
  var src = "document.soda_js_result = (function(){#{escapedContent}})()";
786
786
  d.innerHTML = src;
787
- doc.body.appendChild(d);
788
- print(doc.soda_js_result);
789
- result = doc.soda_js_result;
787
+ if(typeof(doc) != "undefined" && typeof(doc.body) != "undefined")
788
+ {
789
+ doc.body.appendChild(d);
790
+ result = doc.soda_js_result;
791
+ } else {
792
+ result = "No Document Object to use";
793
+ }
790
794
  } else {
791
795
  result = "No Browser to use";
792
796
  }
@@ -835,7 +839,7 @@ def SodaUtils.WaitSugarAjaxDone(browser, reportobj)
835
839
  t1 = nil
836
840
  t2 = nil
837
841
 
838
- js = "if(SUGAR && SUGAR.util && !SUGAR.util.ajaxCallInProgress()) return 'true'; else return 'false';"
842
+ js = "if(typeof(SUGAR) != 'undefined' && SUGAR.util && !SUGAR.util.ajaxCallInProgress()) return 'true'; else return 'false';"
839
843
  reportobj.log("Calling: SugarWait.\n")
840
844
  t1 = Time.now()
841
845
 
@@ -845,6 +849,7 @@ def SodaUtils.WaitSugarAjaxDone(browser, reportobj)
845
849
 
846
850
  #Maximum 15 second wait time
847
851
  for i in 0..30
852
+ browser.wait()
848
853
  tmp = SodaUtils.execute_script(js, false, browser, reportobj)
849
854
 
850
855
  case (tmp)
@@ -870,7 +875,7 @@ def SodaUtils.WaitSugarAjaxDone(browser, reportobj)
870
875
 
871
876
  if (undef_count > 30)
872
877
  msg = "WaitSugarAjaxDone: Can't find SUGAR object after 30 tries!\n"
873
- reportobj.ReportFailure(msg)
878
+ reportobj.log(msg, SodaUtils::WARN)
874
879
  done = false
875
880
  break
876
881
  end
@@ -1,4 +1,4 @@
1
1
  require 'Soda'
2
2
 
3
- SODA_GEM_VERSION = "1.4.5"
3
+ SODA_GEM_VERSION = "1.4.7"
4
4
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: soda
3
3
  version: !ruby/object:Gem::Version
4
- hash: 13
4
+ hash: 9
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 4
9
- - 5
10
- version: 1.4.5
9
+ - 7
10
+ version: 1.4.7
11
11
  platform: ruby
12
12
  authors:
13
13
  - Trampus Richmond
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-06-22 00:00:00 Z
18
+ date: 2011-07-08 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: firewatir