0

there is text label on a webpage, and I am trying to click on that to open a pop-up window,but not getting opened. here is the HTML code:

<td width="40%">
  <div id="EmpId.outline">
    <input type="hidden" name="EmpId" value="" id="popupEmpId">
    <input type="text" name="EmpCode" value="" readonly="readonly" class="textMedium250" id="popupEmpCode" autocomplete="off">&nbsp;<a href="#f2"><label  onclick="checkForPopup('EmpPopupDiv','Select a Emp',640,true,refreshConditionOptions);">&nbsp;+&nbsp;Search&nbsp;for&nbsp;a&nbsp;Emp</label> </a>
 </div>
</td>

I have to click on the label + Search for a Emp, but could not do that.

CodeLover
  • 1,054
  • 6
  • 24
  • 40

2 Answers2

1

Try to find element by xpath and click. Based on your example, the xpath to find/click should be something like this:

"//a[@href='#f2']"
Nora
  • 1,432
  • 8
  • 9
0
<td width="40%">
  <div id="EmpId.outline">
    <input type="hidden" name="EmpId" value="" id="popupEmpId">
    <input type="text" name="EmpCode" value="" readonly="readonly" class="textMedium250" id="popupEmpCode" autocomplete="off">&nbsp;<a href="#f2" onclick="checkForPopup('EmpPopupDiv','Select a Emp',640,true,refreshConditionOptions);"><label  >&nbsp;+&nbsp;Search&nbsp;for&nbsp;a&nbsp;Emp</label> </a>
 </div>
</td>
Thiago Custodio
  • 17,332
  • 6
  • 45
  • 90