[英]Why am I getting this error in my step file of my ruby watir cucumber framework
I'm building my first automation framework with Ruby, Watir and cucumber now I'm getting this error on the step file and I can't tell why.我正在用 Ruby、Watir 和 Cucumber 构建我的第一个自动化框架,现在我在 step 文件中遇到了这个错误,我不知道为什么。
First off, never give the image here, people can't take your code and execute it to check what went wrong.首先,永远不要在此处提供图像,人们无法获取您的代码并执行它来检查出了什么问题。
And your problem is,而你的问题是,
@browser.a(text: 'click here').click
a()
receives the hash as the parameter, first one should be the symbol(it's the key of the hash) and second one has to be the string here(it's the value of the hash), So please enclose the second parameter in Quotes. a()
接收散列作为参数,第一个应该是符号(它是散列的键),第二个必须是这里的字符串(它是散列的值),所以请将第二个参数括在引号中. It would work.它会工作。 =
symbol in front of the second parameter is not necessary. =
在第二个参数前面的符号不是必需的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.