Ho utilizzato l'IDE selenio al lavoro. Ora abbiamo deciso di utilizzare il web-driver Selenium con Ruby. Sono totalmente confuso su come configurare il mio Mac, Mac Pro Yosemite 10.10.5.Impossibile impostare il visualizzatore Web di rubino-selenio su Mac
Nel mio terminale, ho eseguito questi comandi:
$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
$ brew doctor
Your system is ready to brew.
$ brew install ruby
==> Summary
/usr/local/Cellar/openssl/1.0.2d_1: 464 files, 18M
==> Installing ruby
==> Downloading https://homebrew.bintray.com/bottles/ruby-2.2.3.yosemite.bottle.100.0%
==> Pouring ruby-2.2.3.yosemite.bottle.tar.gz
/usr/local/Cellar/ruby/2.2.3: 1080 files, 20M
$ ruby -v
ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-darwin14]
$ sudo gem install selenium-webdriver
Done installing documentation for websocket, ffi, childprocess, rubyzip, multi_json, selenium-webdriver after 25 seconds
6 gems installed
ho esportato lo script registrato da IDE in uno script rubino con: export come ruby/rspec/webdriver
. Ho salvato il mio script di esempio come Exam.rb
nei documenti.
Quando eseguo rspec Exam.rb
, ottengo il seguente errore:
/usr/local/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/configuration.rb:1327:in `load': cannot load such file -- /Users/xxxx/Documents/Exam.rb (LoadError)
from /usr/local/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/configuration.rb:1327:in `block in load_spec_files'
from /usr/local/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/configuration.rb:1325:in `each'
from /usr/local/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/configuration.rb:1325:in `load_spec_files'
from /usr/local/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/runner.rb:102:in `setup'
from /usr/local/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/runner.rb:88:in `run'
from /usr/local/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/runner.rb:73:in `run'
from /usr/local/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/runner.rb:41:in `invoke'
from /usr/local/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/exe/rspec:4:in `<top (required)>'
from /usr/local/bin/rspec:23:in `load'
from /usr/local/bin/rspec:23:in `<main>'
E quando ho cheked la versione ruby:
ruby -v
ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-darwin14]
Qualche aiuto per favore? – sandy
hai controllato questo link? http://stackoverflow.com/questions/18868743/how-to-install-selenium-webdriver-on-mac-os – Sankar
@SankarRaj Chked. In realtà, il mio problema è diff. Ottengo errori quando provo ad aprire uno script rubino. Quindi penso di aver sbagliato con il mio set up – sandy