首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >sapui5 opa5 opa脚本未标识视图

sapui5 opa5 opa脚本未标识视图
EN

Stack Overflow用户
提问于 2017-09-08 19:15:51
回答 1查看 932关注 0票数 0

我已经写了一个OPA脚本,但是它不能识别视图id。你能帮我解决这个问题吗?

OPA脚本无法在文本区域字段中输入文本"Testing in Description“

我的脚本失败了,我看到了下面的错误。

代码语言:javascript
复制
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

下面是我的代码..

代码语言:javascript
复制
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"
                        });
                    },

查看文件ID ::

代码语言:javascript
复制
<TextArea id="activityFormDescription" value="{default>/0/Description}" change="handleChange"></TextArea>
EN

回答 1

Stack Overflow用户

发布于 2017-09-08 19:51:42

尝试向waitFor函数传递viewName参数。

代码语言:javascript
复制
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"
    });
},
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/46115229

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档