2010-03-29 2 views
0

요소에 대해 xpath를 결정해야합니다. mainForm:queryConfigure:fetchReport.ajax 요소에 대한 xpaths를 결정하는 방법

<div class="tabUnselectedText" align="center"> 
<a href="javascript:renderPage('mainForm:consoleBeanId.1','Notifications', 'notifications.faces');">Notifications</a> 
</div> 
+0

/HTML/바디/표/TBODY/TR/TD/표/TBODY/TR [2]/TD/모양/DIV [ID = 'mainForm'@] [ID @ = 'mainForm : j_id_jsp_maintemplatejspjsp103' ]/tbody/tr [3]/td/table [@ id = 'mainForm : analysisSelectMainTable']/tbody/tr [/ body]/tbody/tr/td/input [@ id = 'mainForm : queryConfigure : fetchReport']/td/span [@ id = 'mainForm : queryConfigure : j_id18']/테이블 [@ id = 'mainForm : queryConfigure : j_id19'] 이것은 xpather 플러그인에서 수집 한 xpath입니다. 셀레늄 RC에서는 작동하지 않습니다. – Anjali

답변

0

ID와 이름 값있어서 click 허용 지정자이다 특성 :

<span id="mainForm:queryConfigure:j_id18"> 
<table id="mainForm:queryConfigure:j_id19" 
     class="showReportTable" align="center"> 
<tbody> 
<tr> 
<td> 
<input id="mainForm:queryConfigure:fetchReport" type="image" 
     src="images/show_report.gif" name="mainForm:queryConfigure:fetchReport"/> 
</td> 
</tr> 
</tbody> 
</table> 
</span> 

제가

selenium.click("//input[@id='mainForm:queryConfigure:fetchReport'][@type='image'][@src='images/show_report.gif']"); 

selenium.click("//input[@id='mainForm:queryConfigure:fetchReport']"); 

하나 이상의 케이스

시도. 설명서의 locating elements을 참조하십시오.

selenium.click('mainForm:queryConfigure:fetchReport'); 
관련 문제