Der*_*k W 7 ruby-on-rails watir-webdriver phantomjs
I currently have a rails app that uses rspec and watir-webdriver for my integration tests. I want to run my integration tests in a headless browser (for speed purposes). Since my development is done on a mac the headless gem won't work for me. I am looking to phantomjs as the solution. Whereas phantomjs works well with rspec/capybara (via poltergeist) and there are plenty of examples on how to make that work, I can't find much in the way of getting it to work well with watir-webdriver and ghostdriver.
我已经构建了ghostdriver所需的"特殊"幻像,但之后我迷失了.有没有人之前使用过这个设置(rails/watir-webdriver/ghostdriver)?
我的主要目标是加快我的集成测试.所以如果有人比我在这里描述的更好的建议,我很灵活:)
任何帮助是极大的赞赏!
Ali*_*ott 21
它现在完全由Watir-WebDriver支持并且易于运行:
开始使用OSX的步骤
Run Code Online (Sandbox Code Playgroud)require 'watir-webdriver' b = Watir::Browser.new :phantomjs b.goto "www.google.com" b.url #"http://www.google.com.au/" b.title #"Google"
请参阅此博客文章的完整详细信息:http://watirmelon.com/2013/02/05/watir-webdriver-with-ghostdriver-on-osx-headless-browser-testing/