Skip to content

Unable to click delete link with confirm prompt #68

@nathanvda

Description

@nathanvda

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions