简体   繁体   中英

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.

enter image description here

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. It would work. = symbol in front of the second parameter is not necessary.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM