2017-09-08 6 views
0

私はOPAスクリプトを作成しましたが、ビューIDを特定していませんでした。これを解決するために私を助けてもらえますか?sapui5 opa5 opaスクリプトが識別できませんビュー

OPAスクリプトはテキストエリアのフィールドに「説明でテスト」テキストを入力することができません

私のスクリプトが失敗しつつあるとイムは、エラーの下に見て。以下は

There was no Input 
Opa timeout 
This is what Opa logged: 
all results were filtered out by the matchers - skipping the check - sap.ui.test.pipelines.MatcherPipeline 
Callstack: 
    at fillDescription (https://webidetesting7755399-w3446edba.dispatcher.int.sap.hana.ondemand.com/webapp/test/integration/pages/ActivitySet.js?eval:58:19) 
    at Object.eval (https://webidetesting7755399-w3446edba.dispatcher.int.sap.hana.ondemand.com/webapp/test/integration/AllActivitySets.js?eval:32:30) 
Expected: 
true 
Result:  
false 
Diff: 
trufalse 

表示ファイルのID

Opa5.extendConfig({ 
     viewName : "test", 
     arrangements: new Common(), 
     viewNamespace: "com.tools.melody.activityForm.view.", 
     autoWait: true 
    }); 

opaTest("Enter Description", function (Given, When, Then) { 
      // Arrangements 
      //Given.iStartMyApp(); 

      //Actions 
      When.onTheActivitySetPage.fillDescription(); 
     }); 

fillDescription: function() { 
         return this.waitFor({ 
          id:"activityFormDescription", 
          //controlType: "sap.m.TextArea", 
          actions: new EnterText({        
           text: "Testing in Description" 
          }), 
          success: function() { 
           Opa5.assert.ok(true, "Testing in Description"); 
          }, 
          errorMessage: "There was no Input" 
         }); 
        }, 

..私のコードです::

<TextArea id="activityFormDescription" value="{default>/0/Description}" change="handleChange"></TextArea> 

答えて

1

のwaitFor関数にたviewNameパラメータを渡すようにしてください。

fillDescription: function() { 
    return this.waitFor({ 
     id:"activityFormDescription", 
     viewName : "test", 
     actions: new EnterText({        
      text: "Testing in Description" 
     }), 
     success: function() { 
      Opa5.assert.ok(true, "Testing in Description"); 
     }, 
     errorMessage: "There was no Input" 
    }); 
}, 
+0

回答ありがとうございました。私はこれの根本的な原因を発見しました。実際には、この問題はComponent.jsのmanifest.jsonを変更して解決しました。 – user2644620

関連する問題