akephalos icon indicating copy to clipboard operation
akephalos copied to clipboard

Unable to click delete link with confirm prompt

Open nathanvda opened this issue 13 years ago • 1 comments

Hi, I have the following step definition:

When /^I click on the operator delete button$/ do
  node = page.find(:xpath, '//a[contains(@class, "delete")]')
  page.evaluate_script('window.confirm = function() { return true; }')
  click_link(node.text)
end

While this step definition works in selenium and capybara-webkit, it does not seem to work in akephalos.

The error I receive is the following:

    When I click on the operator delete button                             # features/step_definitions/operators_step.rb:74
      com.gargoylesoftware.htmlunit.ScriptException: Exception invoking jsxFunction_getComputedStyle (NativeException)
      (druby://127.0.0.1:41317) org/jruby/RubyKernel.java:2064:in `send'
      (druby://127.0.0.1:41317) org/jruby/RubyKernel.java:1418:in `loop'
      (druby://127.0.0.1:41317) org/jruby/RubyProc.java:268:in `call'
      (druby://127.0.0.1:41317) org/jruby/RubyProc.java:232:in `call'
      ./features/step_definitions/operators_step.rb:85:in `/^I click on the operator delete button$/'
      features/managing_operators_and_roles.feature:77:in `When I click on the operator delete button'

Does anybody have any idea why not?

nathanvda avatar May 06 '11 11:05 nathanvda

Hi Nathan,

Does it give you any error using #confirm_dialog?

https://github.com/Nerian/akephalos2/blob/master/spec/integration/confirm_dialog_spec.rb#L10

Nerian avatar Oct 16 '11 12:10 Nerian