如何在 google chrome 和 firefox 中使用水豚控制台?
How to use capybara console with google chrome and firefox too?
我想将 capybara-console
与 google chrome 和 firefox 一起使用。
如果我 运行 我的测试使用 rspec,我使用环境变量 JS_DRIVER=chrome
或 firefox,它运行良好。当我开始 capybara-console
时,我也想使用这种语义。
我尝试了很多设置,但我在控制台 运行 中的命令仅在 firefox 中。
所以我想用这个。 JS_DRIVER=chrome rake capypara:console
或 JS_DRIVER=firefox rake capypara:console
您需要添加一个名为 capybara:prepare_console
的 rake 任务,它根据 ENV['JS_DRIVER']
设置 Capybara.default_driver(也许 Capybara.current_driver)
我想将 capybara-console
与 google chrome 和 firefox 一起使用。
如果我 运行 我的测试使用 rspec,我使用环境变量 JS_DRIVER=chrome
或 firefox,它运行良好。当我开始 capybara-console
时,我也想使用这种语义。
我尝试了很多设置,但我在控制台 运行 中的命令仅在 firefox 中。
所以我想用这个。 JS_DRIVER=chrome rake capypara:console
或 JS_DRIVER=firefox rake capypara:console
您需要添加一个名为 capybara:prepare_console
的 rake 任务,它根据 ENV['JS_DRIVER']