0
我已經寫了一小段代碼,只是推出了瀏覽器,但我得到這個錯誤:頂端所需錯誤 - 無法執行代碼
C:/Users/KASTURIPARIDA/RubymineProjects/Project1/features/support/driversettings.rb:6:in
<top (required)>' C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.3.17/bin/cucumber:13:in
' C:/Ruby193/bin/cucumber:23:inload' C:/Ruby193/bin/cucumber:23:in
' -e:1:in `load'
這裏下面是所有的代碼:
支持:
require 'rubygems'
require 'watir-webdriver'
Selenium::WebDriver::Chrome::Service.executable_path = 'C:\Ruby193\bin\chromedriver.exe'
$driver=watir::Browser.new :Chrome
wait 5
特點:
Feature: Application
Scenario: Login to Open
And I have account with Opencart and launch page
步驟定義:
And(/^I have account with Opencart and launch page$/) do
puts "browser loading"
$driver.goto("https://www.facebook.com/")
end
沒有工作。可能是其他問題。 – kasturi
@kasturi,你得到什麼錯誤? –