简体   繁体   中英

How to use capybara console with google chrome and firefox too?

I would like to use capybara-console with google chrome and firefox too. If I run my test with rspec, I use environment variable JS_DRIVER=chrome or firefox and it works good. I would like to use this semantics too when I start my capybara-console . I tried a lot of settings, but my commands in console run only in firefox. So I want to use this. JS_DRIVER=chrome rake capypara:console or JS_DRIVER=firefox rake capypara:console

你需要添加一个名为capybara:prepare_console的rake任务capybara:prepare_console ,根据ENV ['JS_DRIVER']设置Capybara.default_driver(也许是Capybara.current_driver)

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