0
내가 rspec
와 셀레늄을 사용하고하고 spec
파일에 내가있다 :요소를 찾을 수 없습니다 셀레늄 웹 드라이버 문제
wait.until { driver.find_element(:id => "data_source_type_name") }
RuleDesc = driver.find_element(:id, "data_source_type_name")
RuleDesc.send_keys "Mobility"
및 HTML에서 내가 가진 : 부트 스트랩 모달에서 실제로
<div class="col-sm-9">
<input class="form-control" type="text" id="data_source_type_name" name="data_source_type[name]" required="">
</div>
인 (즉, 버튼을 클릭 한 후에 만 표시됨) 나는 클릭을 시뮬레이션했습니다. 그것은 특정 사업부와 모달을 보여줍니다하지만 난이 다음과 같은 오류 얻을 :
[remote server] file:///tmp/webdriver-profile20150119-6088-50uggo/extensions/[email protected]/components/command-processor.js:8991:in `fxdriver.preconditions.visible': Element is not currently visible and so may not be interacted with (Selenium::WebDriver::Error::ElementNotVisibleError)
편집 : 나는 박았 RuleDesc.displayed
를 인쇄 할 때? 그것은 false를 반환하지만 webdriver에서는 표시되고 있습니다.
당신은'발견이 시도 할 수 있습니다 (: XPath를, "// * [포함 (@id, 'data_source_type_name')]")' – pkrawat1
모든 선택 내가 driver.execute_script ("document.getElementById를 제외하고는 동일한 수익률을 시도 ('data_source_type_name'). value = '테스트 값'; ") 실제로 작동하지만 자바 스크립트를 사용하고 싶지 않습니다. –