는 기본적으로 난 그냥 레일 3에 사용 셀레늄을 배우기 시작, 내가 셀레늄 IDE 시작 나는이 스크립트를 실행하기 전에 RSpec에 형식LoadError 셀레늄을 사용하여 :로드 해당 파일 - 스펙
에서 스크립트를 생성 나는 selenium-client
, Selenium
, selenium-rails
및 selenium-webdriver
에 대한 보석을 설치하지만이 스크립트를 실행하는 RSpec에 명령을 사용하여, 나는이
C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:58:in `require': no such file to load -- spec (LoadError)
from C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:58:in `rescue in require'
from C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/selenium-client-1.2.18/lib/selenium/rspec/spec_helper.rb:2:in `<top (required)>'
from C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from C:/Users/qsang/Desktop/Code/NextBigThing/spec/Selenium/create_new_user.rb:5:in `<top (required)>'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.5.1/lib/rspec/core/configuration.rb:386:in `load'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.5.1/lib/rspec/core/configuration.rb:386:in `block in load_spec_files'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.5.1/lib/rspec/core/configuration.rb:386:in `map'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.5.1/lib/rspec/core/configuration.rb:386:in `load_spec_files'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.5.1/lib/rspec/core/command_line.rb:18:in `run'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.5.1/lib/rspec/core/runner.rb:55:in `run_in_process'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.5.1/lib/rspec/core/runner.rb:46:in `run'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.5.1/lib/rspec/core/runner.rb:10:in `block in autorun'
내가 검색하는 것을 시도했다 있어요 대답, 내 주변에있는 유일한 사례는 누구도 아직 대답하지 않은 Selenium Can't Find 'spec' Folder입니다.
누군가 제가 미리 감사드립니다.
Rspec이 설치되어 있고,'rils generate rspec : install'을 실행하여 프로젝트 폴더 아래 spec 폴더를 생성했습니다. 'spec_helper' 파일은이 파일에 포함되어 있으며, 필자의 대답은 http://stackoverflow.com/questions/5330867/loaderror-when-using-selenium-no-such-file-to-load-spec입니다./5341873 # 5341873 – Souloikj
spec_helper 설명에 감사드립니다. 비록이 하이브리드 (레일/IIS) 사이트의 추가 개발을 위해 오이와 RSpec을 사용하려고합니다. Selenium은 RSpec뿐만 아니라 테스트/유닛으로 변환 할 수 있기 때문에 로우 테크와 테스트/유닛을 사용하기로 결정했습니다. 기존의 Selenium 테스트는 "RSpec-like"가 아닌 "test/unity"가 더 많기 때문에 괜찮습니다. 이렇게하면 루비 또는 플롭으로 완전히 독립 실행 형 테스트를 실행할 수 있습니다. 레이크 앱 구조에서 레이크로 실행할 수 있습니다. – danv