Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to click delete link with confirm prompt #68

Open
nathanvda opened this issue May 6, 2011 · 1 comment
Open

Unable to click delete link with confirm prompt #68

nathanvda opened this issue May 6, 2011 · 1 comment

Comments

@nathanvda
Copy link

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?

@Nerian
Copy link
Contributor

Nerian commented Oct 16, 2011

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants