如何使用selenium c#在kendo电子表格网格中识别网格

时间:2017-07-14 04:58:35

标签: selenium spreadsheet kendo-ui-grid

我无法在kedo网格中找到该元素。我必须识别网格,使用该网格我必须识别单元格并在其中输入值。但我无法识别网格本身。

下面是xpath。

 IWebElement testoj = driver.FindElement(By.XPath("//*[@id='pricingTableSpreadsheet']"));

如果我在控制台中运行这个xpath它返回元素,但是我通过代码运行它,它没有检测到元素

HTML

<div id="secContainer">
 <div kendo-splitter="" k-panes="[null, { collapsible: true, collapsed: true, min: '235px', size: '235px' }]" k-orientation="'vertical'" id="k-splitter" style="height: 100%; border: 0 solid transparent;" data-role="splitter" class="k-widget k-splitter">
  <div role="group" class="k-pane k-scrollable" style="position: absolute; top: 0px; height: 92px; width: 1066px;">
   <div ui-view="prdTableView" class="fullHeight ng-scope">
    <div ui-view="wipprdView" class="fullHeight ng-scope">
     <div style="positi on:absolute; left: 5px; z-index: 900;  padding-top: 2px;"></div>
     <div style="position:absolute; float: right; right: 5px; z-index: 900;">
     </div>
     <div kendo-spreadsheet="" id="pricingTableSpreadsheet" style="width: 100%; height: 100%; margin-top: -3px; margin-left: -2px;" k-options="ptSpreadOptions" k-scope-field="spreadsheet" class="noFormula k-widget k-spreadsheet" data-role="spreadsheet">
     </div>
    </div>
   </div> 
  </div>        
 </div>
</div>

0 个答案:

没有答案