Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/extjs/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Email Cucumber(使用watir webdriver):未定义的方法`confirmation_token';_Email_Cucumber_Watir Webdriver_Confirmation_Specifications - Fatal编程技术网

Email Cucumber(使用watir webdriver):未定义的方法`confirmation_token';

Email Cucumber(使用watir webdriver):未定义的方法`confirmation_token';,email,cucumber,watir-webdriver,confirmation,specifications,Email,Cucumber,Watir Webdriver,Confirmation,Specifications,我怎样才能在cucumber中使用确认令牌?我需要这个来测试注册,而不需要检查电子邮件 我的代码: @b.text_field(:name => 'profile[prename]').set 'Kurt' @b.text_field(:name => 'profile[surname]').set 'Russell' @b.text_field(:id => 'profile_email').set 'user@trash-mail.com' @b.te

我怎样才能在cucumber中使用确认令牌?我需要这个来测试注册,而不需要检查电子邮件

我的代码:

  @b.text_field(:name => 'profile[prename]').set 'Kurt'

  @b.text_field(:name => 'profile[surname]').set 'Russell'

  @b.text_field(:id => 'profile_email').set 'user@trash-mail.com'

  @b.text_field(:id => 'profile_password').set 'password'

  @b.text_field(:name => 'profile[password_confirmation]').set 'password'

  @b.button(:id => 'profile_submit').click

  @ctoken = Profile.last.confirmation_token

  @b.goto("http://localhost:3000/profiles/confirmation?confirmation_token=#{@ctoken}")
或:


我成为nil:NilClass(NoMethodError)的未定义方法“确认\u标记”

在我看来是
配置文件。在您的情况下,最后一个
返回
nil
,因此出现错误消息
nil:NilClass(NoMethodError)的未定义方法确认\u标记。请在定义
配置文件的位置共享代码

如何找到此确认\u令牌路径?我不知道这是什么。什么是
Profile
?它是如何定义的?
  @b.goto("http://localhost:3000/profiles/confirmation?confirmation_token=#{Profile.last.confirmation_token}")