知らない人にとって、c9はクラウドを使用するオンラインIDEです。だから私はワチールでFirefoxを使用しようとしていると私は取得していますエラーがあるc9を使用しているときにFirefoxバイナリのパスをRailsに設定する方法は?
「Firefoxのバイナリ(OS = Linux)を見つけることができませんでした。確かFirefoxは がインストールされていることを確認したり セレンを使用して手動でパスを設定します:: webdriverを:: Firefoxの:: Binary.path =」
私は自分のPC上のFirefoxのファイルパスをチェックすると、それはこのPC/Windowsの(C:)です/プログラムファイル/ Mozilla Firefoxの
この私が使用しているコードです
コードの下に追加0def save
require 'watir'
require 'firefox'
@browser = Watir::Browser.new :firefox
@browser.goto "https://kroger.softcoin.com/programs/kroger/digital_coupons/?origin=DigitalCoupons&banner=Smiths#contentBox"
@browser.div(id: "contentBox").wait_until(&:present?).text
# Could not find Firefox binary (os=linux).
# Make sure Firefox is installed or set the path manually with
# Selenium::WebDriver::Firefox::Binary.path=
# ThisPC:WindowsC:ProgramFiles:MozillaFireFox
@products = @browser.divs
end
geckodriver –