Linux에서 간단한 스크립트를 만들었지 만 지금은 Windows에서 작동하도록 노력하고 있습니다.Watir 브라우저 프로세스가 제대로 시작되지 않음 (Windows)
코드는 다음과 같습니다
require 'watir-webdriver'
puts "Press enter when ready to continue"
gets
browser = Watir::Browser.start "http://www.google.com"
# do stuff
는 그것은 우분투에서 예상 정확히 작품으로. 그러나 Windows에서이 작업을 시도하면 Firefox 프로세스가 시작되지만 Firefox 창이 표시되기 전에 종료됩니다. 이것은이 Windows 설치에서 Ruby를 새로 설치 한 것입니다. 이전에는이 시스템에서 사용하지 않았습니다.
무엇이 문제 일 수 있습니까?
편집 : 요청한대로 명령 줄 추적.
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/selenium-webdriver-2.53.1/lib/selenium/webdriver/firefox/launcher.rb:90:in `connect_until_stable': unable to obtain stable firefox connection in 60 seconds (127.0.0.1:7055) (Selenium::WebDriver::Error::WebDriverError)
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/selenium-webdriver-2.53.1/lib/selenium/webdriver/firefox/launcher.rb:55:in `block in launch'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/selenium-webdriver-2.53.1/lib/selenium/webdriver/common/socket_lock.rb:43:in `locked'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/selenium-webdriver-2.53.1/lib/selenium/webdriver/firefox/launcher.rb:51:in `launch'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/selenium-webdriver-2.53.1/lib/selenium/webdriver/firefox/bridge.rb:43:in `initialize'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/selenium-webdriver-2.53.1/lib/selenium/webdriver/common/driver.rb:53:in `new'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/selenium-webdriver-2.53.1/lib/selenium/webdriver/common/driver.rb:53:in `for'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/selenium-webdriver-2.53.1/lib/selenium/webdriver.rb:84:in `for'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/watir-webdriver-0.9.1/lib/watir-webdriver/browser.rb:46:in `initialize'
from bot.rb:8:in `new'
from bot.rb:8:in `<main>'
예외가 있습니까? –
Justin의 질문에 추가하면 명령 줄에서 오류 추적은 무엇입니까? selenium-webdriver (WATIR)와 컴퓨터에 설치된 FF 버전 간의 비 호환성 문제가있을 수 있습니다. – Sam
두 분 모두에게 감사드립니다. 흠, 그럴 수도 있습니다. 언급해야 할 것은 Waterfox도 설치되었지만 (크롬이 아니기 때문에 설치 프로그램을 작동시킬 수 없음) 여러 FF 프로필이 있습니다 (특정 운을 선택하지는 않았지만). 나는 명령 행 추적으로 게시물을 편집했다. – Joe