The example code:
assert_select 'div#<CSS id for error explanation>'
assert_select 'div.<CSS class for field with error>'
This generates: DEPRECATION WARNING: The assertion was not run because of an invalid css selector. ] 16% Time: 00:00:01, ETA: 00:00:06 unexpected '#' after '[#]' (called from block in at /home/ubuntu/workspace/sample_app/test/integration/users_signup_test.rb:25) DEPRECATION WARNING: The assertion was not run because of an invalid css selector. unexpected '<' after '.' (called from block in at /home/ubuntu/workspace/sample_app/test/integration/users_signup_test.rb:26)
I read somewhere that versions 4.2+ need an other way to do assert_select. Is that true? And what should be used? [ I have to say; I am still an absolute beginner ]
用<CSS class...>
下的your-class
和<CSS id ...>
下的your-id
替换
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.