2012-08-06 1 views
1

이후, 내 오이 코드에서 오류가 다음 무엇입니까 -셀레늄 Webdriver 오류 코드 오늘부터 어떻게 든 502

셀레늄 :: WebDriver :: 오류 :: WebDriverError : 예기치 않은 응답 코드 = (502), 콘텐츠 유형 = " text/html " 다음 페이지의 전체 HTML 텍스트.

</html> 
from C:/jruby-1.6.5/lib/ruby/gems/1.8/gems/selenium-webdriver-2.24.0/lib/selenium/webdriver/remote/http/common.rb:66:in `create_response' 
from C:/jruby-1.6.5/lib/ruby/gems/1.8/gems/selenium-webdriver-2.24.0/lib/selenium/webdriver/remote/http/default.rb:59:in `request' 
from C:/jruby-1.6.5/lib/ruby/gems/1.8/gems/selenium-webdriver-2.24.0/lib/selenium/webdriver/remote/http/common.rb:40:in `call' 
from C:/jruby-1.6.5/lib/ruby/gems/1.8/gems/selenium-webdriver-2.24.0/lib/selenium/webdriver/remote/bridge.rb:598:in `raw_execute' 
from C:/jruby-1.6.5/lib/ruby/gems/1.8/gems/selenium-webdriver-2.24.0/lib/selenium/webdriver/remote/bridge.rb:92:in `create_session' 
from C:/jruby-1.6.5/lib/ruby/gems/1.8/gems/selenium-webdriver-2.24.0/lib/selenium/webdriver/remote/bridge.rb:68:in `initialize' 
from C:/jruby-1.6.5/lib/ruby/gems/1.8/gems/selenium-webdriver-2.24.0/lib/selenium/webdriver/ie/bridge.rb:43:in `initialize' 
from C:/jruby-1.6.5/lib/ruby/gems/1.8/gems/selenium-webdriver-2.24.0/lib/selenium/webdriver/common/driver.rb:35:in `for' 
from C:/jruby-1.6.5/lib/ruby/gems/1.8/gems/selenium-webdriver-2.24.0/lib/selenium/webdriver.rb:65:in `for' 
from C:/jruby-1.6.5/lib/ruby/gems/1.8/gems/watir-webdriver-0.5.8/lib/watir-webdriver/browser.rb:35:in `initialize' 
from (irb):7:in `evaluate' 
from org/jruby/RubyKernel.java:1088:in `eval' 
from C:/jruby-1.6.5/lib/ruby/1.8/irb.rb:158:in `eval_input' 
from C:/jruby-1.6.5/lib/ruby/1.8/irb.rb:271:in `signal_status' 
from C:/jruby-1.6.5/lib/ruby/1.8/irb.rb:155:in `eval_input' 
from org/jruby/RubyKernel.java:1420:in `loop' 
from org/jruby/RubyKernel.java:1192:in `catch' 
from C:/jruby-1.6.5/lib/ruby/1.8/irb.rb:154:in `eval_input' 
from C:/jruby-1.6.5/lib/ruby/1.8/irb.rb:71:in `start' 
from org/jruby/RubyKernel.java:1192:in `catch' 
from C:/jruby-1.6.5/lib/ruby/1.8/irb.rb:70:in `start' 
from C:/jruby-1.6.5/bin/jirb:13:in `(root)' 
from org/jruby/RubyKernel.java:1063:in `load' 
from -e:1:in `(root)'>> 

- 나는 끝에 여기

&을 붙여 있지 않다

C:\jruby-1.6.5\bin\jruby.exe --1.8 -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) C:/jruby-1.6.5/bin/jirb - prompt simple 
>> require "rubygems" 
=> true 

?> require "watir-webdriver" 
=> true 

?> @browser = Watir::Browser.new :ie 
Started InternetExplorerDriver server (32-bit) 
2.25.2.0 
Listening on port 5555 
Selenium::WebDriver::Error::WebDriverError: unexpected response, code=502, content-type="text/html" 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html> 

<!-- Page creation information: 
    FileName: cannotconnect.html 
    Language: [my] New Language Pack 
Created with: Language Pack Designer 0.0.0.8 
Creation date: 9/26/2011 10:19:48 AM 
--> 

<!--Head--> 
<head> 
    <title>Can 

... 그리고 큰 HTML 덤프 - 여기

는 전체 IRB 콘솔 상호 작용입니다 오늘 아침부터 갑자기 이런 일이 일어나기 시작했습니다. 제 질문은 .. 오류 코드 = 502는 무엇이라고 말합니까? 이 로그의 맨 위에서 보면 -

Selenium::WebDriver::Error::WebDriverError: unexpected response, code=502 

그래서, 그것은 무엇을 의미합니까? 문제가 어디에 있습니까? 프록시 문제입니까? 다른 브라우저를 사용해 보았는데 동일한 문제가 있습니까?

업데이트 - 여기

재미있는 것은이 - 나는 루비 1.87에 JRuby를 1.5.6에서 내 SDK를 변경하는 경우, 그것은 잘 작동 ... 문제는 JRuby를 ... 루비 SDK와 똑같은 함께 잘 작동 ... JRuby .. 1.6.5와 1.6.7과 같은 다양한 버전을 시도했지만 같은 오류가 발생했지만 1.8.7을 시도하면 오류없이 브라우저가 열립니다. -

여기

루비 1.8.7

C:\Ruby187\bin\ruby.exe -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)  C:/Ruby187/bin/irb --prompt simple 
>> require "rubygems" 
=> true 

?> require "watir-webdriver" 
=> true 

?> @browser = Watir::Browser.new :ie 
=> #<Watir::Browser:0x2e18b00 url="http://localhost:5555/" title="WebDriver"> 

?> @browser = Watir::Browser.new :ie 
=> #<Watir::Browser:0x2ef07a0 url="http://localhost:5555/" title="WebDriver"> 
+0

재미있는 점이 있습니다. JRuby 1.5.6에서 Ruby 1.87로 SDK를 변경하면 문제가 없습니다. 문제는 JRuby에서만 발생합니다 ... Ruby SDK와 동일한 문제가 없습니다 ... 시도해 보았습니다. JRuby의 다양한 버전 .. 1.6.5 및 1.6.7과 같은 오류가 발생했지만 1.8.7을 시도하면 오류가없는 브라우저가 열립니다. –

답변

2

502 코드는 HTTP 응답 코드는, 그것 012,374 수단- 문제는 요청이 진행중인 업스트림 서버 중 하나에서 잘못된 구성 또는 오류가 발생했기 때문입니다.

+0

그래서 내 일은 몇 가지를 알아내는 것입니다. - 먼저 프록시 비밀번호를 변경했는지 또는 변경된 프록시 설정이 있는지 확인하십시오. 하지만 여기 재미있는 점이 있습니다 - JRuby 1.56에서 Ruby 1.87로 SDK를 변경했을 때 문제없이 작동합니다 ... JRuby에서만 문제가 있습니다 ... Ruby SDK와 동일한 문제가 없습니다 ... –