다음 html 코드는 제품을 추가하는 팝업을 생성합니다. xpath 또는 css를 찾으려고 노력하면 셀렌에서 작동하여 "추가"버튼을 클릭하여 새 제품을 추가 할 수 있습니다.다음 HTML 스 니펫에 xpath 또는 CSS가 필요함
하나의 세션에서만 작동하는이 xpath // div [18]/div [2]/div/버튼을 사용하여 시도했습니다. 브라우저를 닫고 다시 열면 xpath가 작동하지 않습니다. 그래서 div [number]를 div에 전달할 필요가없는 xpath를 어떻게 작성할 수 있을까요?
<div style="height: auto; min-height: 104px; width: auto;" class="dialog ui-dialog-content ui-widget-content">
<fieldset><legend>search</legend>
<div id="nameorids">
<input type="radio">name
<input type="radio">id
</fieldset>
<div style="clear: both; padding-top: 5px; float: right;"><button class="add">add</button></div></div>
안녕 Orip-- 덕분에 button.add 될 것이다. 불행히도 HTML 코드를 수정할 권한이 없습니다. 따라서 어떤 신원이나 속성을 지정할 수는 없습니다. – doneright