Ruby on rails 找不到字段“;内容“;(水豚::ElementNotFound)

Ruby on rails 找不到字段“;内容“;(水豚::ElementNotFound),ruby-on-rails,ruby,automation,cucumber,bdd,Ruby On Rails,Ruby,Automation,Cucumber,Bdd,这是我的Write_blog.feature文件 Feature: Write blog As a Blog Owner I can write new blog post Scenario: Write Blog Given I am on the Blog Homepage When I click on the "New Post" Link And I fill "My first blog" as Title And I fill "Test content" as content A

这是我的Write_blog.feature文件

Feature: Write blog
As a Blog Owner
I can write new blog post
Scenario: Write Blog
Given I am on the Blog Homepage
When I click on the "New Post" Link
And I fill "My first blog" as Title
And I fill "Test content" as content
And I click on "Post" button 
Then I should see the blog i just posted
这是我写博客的步骤。功能步骤

Given(/^I am on the Blog Page$/) do
  visit ("/posts")
end

When(/^I click on the "([^"]*)" Link$/) do |arg1|
  click_on "New Post"
end

When(/^I fill "([^"]*)" as title$/) do |title|
  @title = title
  fill_in  "Title", :with => title 
end

When(/^I fill "([^"]*)" as content$/) do |content|
  fill_in "Content", :with => content
end

When(/^I click on "([^"]*)" button$/) do |btn|
  click_button  btn
end

Then(/^I should see the blog i just posted$/) do
  page_should have_content(@title)
end
当我试着运行它时:#cumber features/write#u steps.feature 这是以下错误

我把“内容”填为内容特征/步骤定义/写文章步骤。rb:14 找不到字段“内容”(Capybara::ElementNotFound) /features/step_definitions/write_post_steps.rb:15:in
/^I将“([^“]*)”作为内容填写$/”
功能/写文章。功能:8:在
中,我填写“测试内容”作为内容
这里的错误是什么?

你看了吗?好的,那么你的一个测试失败了。你明白这个测试在做什么吗?它似乎在做一些前端自动化(访问网站,解析HTML并检查一些字符串)。要回答这个问题,需要查看模板和生成的HTML(即,在浏览器中访问页面后查看页面源代码)您查看了吗?好的,那么您的一个测试失败了。您了解此测试在做什么吗?它似乎在做一些前端自动化(访问网站、解析HTML和检查一些字符串)。要查看您的模板和生成的HTML,必须回答此问题(即在浏览器中访问页面后查看页面源)