哦,屏幕抓取大师。我正在使用 jruby 和 Celerity(都是最新版本),但我不知道如何单击此按钮。这是HTML代码:
<div class="chart-toolbar noprint" style="float: left;">
<ul>
<li>
</li>
<li>
<span class="btn-export icon-24 download-24" title="Export"></span>
我已经尝试了一切,我无法让它点击。这是我当前的代码:
browser.button(:class, "btn-export icon-24 download-24").click
这是错误:
Celerity::Exception::UnknownObjectException: Unable to 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 在 /opt/jruby/lib/ruby/gems/1.8/gems/celerity-0.9.1/lib/celerity/clickable_element.rb:69 点击 /opt/jruby/lib /ruby/gems/1.8/gems/celerity-0.9.1/lib/celerity/clickable_element.rb:9(根)在./test.rb:17
有任何想法吗?