2017-02-07 6 views
0

私は剣道の数字のテキストボックスでページ全体を自動化する必要があります。セレンを使ってkendoUIの数値テキストボックスを自動化する(JavaScriptなし)

私はセレンを入力すると、テキストボックスに値をしようとしたとき、しかし、それは、次のような例外を受け取り、xpath or id selectorを使用して要素を見つけることができるよ:

ElementNotVisibleException =>言わをクリックしようとしたとき、素子。 のSendKeys

を使用して入力した値をしようとしたとき

InvalidElementStateException =>私はExecuteJavascript interfaceを使用せずに、この作業を自動化できるソリューションを探しています。

以下

は、テキストボックスの1のサンプルhtml次のとおりです。

<div class="form-group"> 
    <label for="sheet_width">Page Width<span class="ep-required-label" ng-show="sheet_maintenance_form.sheet_width.$error.required" aria-hidden="false" style="">*</span> 
    </label> 
    <span class="k-widget k-numerictextbox ng-dirty ng-valid-parse ng-touched ng-empty ng-invalid ng-invalid-required"> 
     <span class="k-numeric-wrap k-state-default"> 
      <input type="text" class="k-formatted-value ng-pristine ng-untouched ng-valid k-input" title="" tabindex="0" role="spinbutton" aria-valuemin="0" aria-valuemax="999.999" aria-disabled="false" style="display: inline-block;"> 
      <input ng-required="true" kendo-numeric-text-box="sheet_width" k-options="sheet_edit_controller.sheet_field_options" ng-model="sheet_edit_controller.sheet_config.sheet_width" name="sheet_width" id="sheet_width" class="k-input ng-dirty ng-valid-parse ng-touched ng-empty ng-invalid ng-invalid-required" data-role="numerictextbox" role="spinbutton" type="text" aria-valuemin="0" aria-valuemax="999.999" aria-disabled="false" required="required" aria-invalid="true" style="display: none;"> 
      <span class="k-select"> 
       <span unselectable="on" class="k-link k-link-increase" aria-label="Increase value" title="Increase value"> 
        <span unselectable="on" class="k-icon k-i-arrow-60-up"/> 
       </span> 
       <span unselectable="on" class="k-link k-link-decrease" aria-label="Decrease value" title="Decrease value"> 
        <span unselectable="on" class="k-icon k-i-arrow-60-down"/> 
       </span> 
      </span> 
     </span> 
    </span> 
</div> 

誰もがこの問題で私を助けることができますか?

あなたのヘルプははるかに高く評価されます。

答えて

1

これは1ボックスに値を高めるために私のために働いたが、私は他の提案に感謝:

Actions actions = new Actions(Browser); 
actions.MoveToElement(
Container.FindElement(By.CssSelector("span.k-i-arrow-n"))).Click().Perform() 
+0

おかげでロバートを。出来た!!!トリックは、矢印ボタンの1つをクリックして、入力テキストフィールドの状態を変更することでした。 – DashmeetSingh

+0

悲しいことに私はそれについて申し訳ありませんが、私は助けてうれしいです。 – Robert

関連する問題