2017-02-20 6 views
1
I am trying to run this below code, then I got code error: 

ルビー/ 2.3.0/RubyGemsの/ core_ext /kernel_require.rb:55:in ` 'が必要です。そのようなファイルをロードすることはできません - セレンwebdriverを(とLoadError)ルビー/ 2.3.0/RubyGemsの/ core_ext/kernel_require.rb:55: ` '必要で:そのようなファイルをロードすることはできません - セレンwebdriverを(とLoadError)を

私は、私が行方不明です何を見つけることができないのですが、この

require "selenium-webdriver" 

# Firefox browser instantiation 
driver = Selenium::WebDriver.for :firefox 

#Loading the assertselenium URL 
driver.navigate.to "http://www.assertselenium.com" 

#Clicking on the Follow link present on the assertselenium home page 
FollowButton = driver.find_element(:link, "Follow") 
FollowButton.click 

#Typing the UserName 
LoginButton = driver.find_element(:id, "user_login") 
LoginButton.send_keys "sampleuser77dff27" 

#Typing the Email-Id 
EmailId = driver.find_element(:id, "user_email") 
EmailId.send_keys "[email protected]" 

#Clicking on the Submit Button 
SubmitButton = driver.find_element(:id, "wp-submit") 
SubmitButton.click 

#Asserting whether the registration success message is diaplyed 
SuccessMessage = driver.find_element(:css, "p.message") 
"Registration complete. Please check your e-mail.".eql? SuccessMessage.text 
puts "Successfully completed the user registration and validated the Success message" 
#Quitting the browser 
driver.quit 
で私を助けてください
+0

グーグルが見つけられる可能性のある回答はたくさんあります。なぜ彼らがあなたを助けないのか教えていただけますか? – Burki

答えて

0

お試しください。

require 'rubygems' 

このスクリプトの先頭にそれでも同じエラーが発生した場合は、宝石をインストールしてください。

gem install selenium-webdriver 

希望します。

-1

私は "Kernel-require"エラーが発生したときに複数のプロジェクトを開いていました。その後、別のウィンドウでプロジェクトを開き、requireステートメントを再度使用しました。 それは私のために働いた。

関連する問題