akephalos icon indicating copy to clipboard operation
akephalos copied to clipboard

Cucumber scenario fails with spork and akephalos

Open stmichael opened this issue 14 years ago • 3 comments

I have the following setup for my project: I'm using cucumber, spork and akephalos. I have a cucumber scenario where I fill a value into a text field with a certain id, press a submit button and then check the content of the website that should have been updated by AJAX. Since the website is using AJAX, this scenario is annotated with @javascript.

Unfortunately this combination of gems doesn't work for me. I'm getting the following error in the step that tries to fill in the value to the text field: "cannot fill in, no text field, text area or password field with id, name, or label 'email' found"

As soon as a scenario fails, cucumber saves the content of the page that caused the failure to a file. I can open this file with my browser and I actually do see a text field with id='email'. So the failure cannot be caused by the absence of such a text field. So I experimented a bit further and I got the following interesting results:

  • If I run the test without spork, it works.
  • If I run the test with another javascript driver, it works.
  • If I run the test without the @javascript annotation, it works (actually just the fill in step of the text field works, the whole scenario will fail obviously).

Can you please help me with this issue?

I'm using Ruby 1.9.2-p136, cucumber 0.10.0, spork 0.9.0.rc3 and akephalos 0.2.5.

stmichael avatar Feb 22 '11 13:02 stmichael

I am having the exact same issue as stmichael.

My environment: ruby 1.9.2p0 cucumber (0.10.0) spork (0.9.0.rc2) akephalos (0.2.5)

I've tried nearly identical alternative setups as the OP as well:

  • akephalos without spork => works
  • selenium with spork => works
  • akephalos with spork => none of the fields get filled in, same errors as above.

What kind of debug info can I provide?

Thanks for the great gem btw! =)

clemensp avatar Feb 23 '11 03:02 clemensp

Yeah, I was playing around in the same environment, using this project on github: git://github.com/mattheworiordan/Full-stack-testing.git. It's not quite configured for spork, so I fixed that, and presto same results.

I just mention it b/c it makes it really easy to reproduce the problem.

robmathews avatar Apr 30 '11 18:04 robmathews

Hello guys,

You may want to use https://github.com/Nerian/akephalos2 and check the section "Running akephalos with Spork"

Nerian avatar Oct 16 '11 10:10 Nerian