0

ステップ ファイルのコード:

  select_date user.date_of_birth, :from => "Date of birth"

セレクターの失敗

When I register with valid user credentials # features/step_definitions/authentication_steps.rb:2
  Could not find field: "user_date_of_birth_1i_1i" (Webrat::NotFoundError)
  ./features/step_definitions/authentication_steps.rb:9:in `/^I register with valid user credentials$/'
  features/authentication.feature:6:in `When I register with valid user credentials'

HTML 出力は正常なようです。

<select name="user[date_of_birth(1i)]" id="user_date_of_birth_1i">

それはバグですか、それとも何か間違ったことをしていますか

4

1 に答える 1

0

「id_prefix」引数を使用して解決

  select_date user.date_of_birth, :id_prefix => "user_date_of_birth"

それでも Webrat のバグのようです。

于 2010-05-17T20:02:24.673 に答える