0

Oh masters of screen scraping. I'm using jruby and Celerity (both newest versions), and I CANNOT figure out how to click this button. Here is the HTML code:

<div class="chart-toolbar noprint" style="float: left;">
<ul>
<li>
</li>
<li>
<span class="btn-export icon-24 download-24" title="Export"></span>

I've tried everything, I cannot get it to click. Here is my current code:

browser.button(:class, "btn-export icon-24 download-24").click

Here is the error:

Celerity::Exception::UnknownObjectException: Unable to locate Button, using :class and "btn-export icon-24 download-24" assert_exists at /opt/jruby/lib/ruby/gems/1.8/gems/celerity-0.9.1/lib/celerity/element.rb:179 assert_exists_and_enabled at /opt/jruby/lib/ruby/gems/1.8/gems/celerity-0.9.1/lib/celerity/clickable_element.rb:69 click at /opt/jruby/lib/ruby/gems/1.8/gems/celerity-0.9.1/lib/celerity/clickable_element.rb:9 (root) at ./test.rb:17

Any ideas?

animuson
  • 53,861
  • 28
  • 137
  • 147
awojo
  • 907
  • 3
  • 11
  • 21

1 Answers1

0

instead of

browser.button(:class, "btn-export icon-24 download-24").click

try

browser.span(:class, "btn-export icon-24 download-24").click

hope this helps!!

kmad
  • 624
  • 2
  • 6
  • 13