views:

44

answers:

1

All,

This xpath locator works fine in Firefox:

ctl00_ctl00_mainPage_rightColumn_wholeControl_grid_cell2_3_roleX_DDD_L_LBI2­T0

This does not work in IE. I have been trying to convert to CSS locator without success. The item I am trying to select is Seller. Here's the whole blob:

<div style="width: 168px; overflow: auto; height: 107px; padding-right: 0px;" class="dxlbd" id="ctl00_ctl00_mainPage_rightColumn_wholeControl_grid_cell2_3_roleX_DDD_L_­D"> 
  <input type="hidden" name="ctl00$ctl00$mainPage$rightColumn$wholeControl$grid$cell2_3$roleX$DDD$L" id="ctl00_ctl00_mainPage_rightColumn_wholeControl_grid_cell2_3_roleX_DDD_L_­VI" value="0">    
   <table cellspacing="0" cellpadding="0" border="0" style="width: 100%; border-collapse: separate;" id="ctl00_ctl00_mainPage_rightColumn_wholeControl_grid_cell2_3_roleX_DDD_L_­LBT"> 
    <tbody> 
     <tr class="dxeListBoxItemRow"> 
      <td class="dxeListBoxItem  dxeListBoxItemSelected" id="ctl00_ctl00_mainPage_rightColumn_wholeControl_grid_cell2_3_roleX_DDD_L_­LBI0T0">Choose</td> 
     </tr> 
     <tr class="dxeListBoxItemRow"> 
      <td class="dxeListBoxItem" id="ctl00_ctl00_mainPage_rightColumn_wholeControl_grid_cell2_3_roleX_DDD_L_­LBI1T0">Buyer</td> 
     </tr> 
     <tr class="dxeListBoxItemRow"> 
      <td class="dxeListBoxItem dxeListBoxItemHover" id="ctl00_ctl00_mainPage_rightColumn_wholeControl_grid_cell2_3_roleX_DDD_L_­LBI2T0">Seller</td> 
     </tr> 
     <tr class="dxeListBoxItemRow"> 
      <td class="dxeListBoxItem" id="ctl00_ctl00_mainPage_rightColumn_wholeControl_grid_cell2_3_roleX_DDD_L_­LBI3T0">Buyer &amp; Seller</td> 
     </tr> 
     <tr class="dxeListBoxItemRow"> 
      <td class="dxeListBoxItem" id="ctl00_ctl00_mainPage_rightColumn_wholeControl_grid_cell2_3_roleX_DDD_L_­LBI4T0">Observer</td> 
     </tr> 
    </tbody> 
   </table> 
  </div> 

Any ideas greatly appreciated.

Blake

+1  A: 

There are a few ways that you could locate the seller cell. To locate it using CSS based on the content of the cell try:

css=td:contains(Seller)

If the id is static then the following should also work, however the id is unusually long, which could conceivably cause issues. I haven't tested this myself.

id=ctl00_ctl00_mainPage_rightColumn_wholeControl_grid_cell2_3_roleX_DDD_L_­LBI2T0
Dave Hunt
Dave, A late thanks for your follow up. Separately I had tried what you suggested but that did not work. However, in the end it was something super simple: use the type command with the locator, and set the value to Seller. I thought I had already tried that, but in any case it worked. Regardless, thanks again, Blake
bbe