2016-09-08 4 views
0

오이/루비와 함께 selenium-webdriver를 사용할 때 파일 다운로드 프로세스를 확인할 수있는 방법이 있습니까? Cucumber Selenium-Webdriver 콘텐츠 처리

헤드리스 실행

, 나는 expect(response_headers['Content-Disposition']).to include("attachment;filename#{pdf_filename}")

내가 셀레늄 (크롬)에서 실행이 더 이상 작동하는 간단한 RSpec에-기대를 사용합니다. 오류가 발생합니다 :

Capybara::NotSupportedByDriverError: Capybara::Driver::Base#response_headers 

Selenium을 실행할 때이 방법을 사용할 수 있습니까?

답변

1

예상 파일이 다운로드 디렉토리에있는 경우 당신은 확인할 수 있습니다

File.exists? "/Users/mesutgunes/Downloads/#{pdf_filename}" 
+0

당신에게 대단히 감사합니다 – Tom