使用机器人框架输入文本会失去价值

时间:2020-06-04 09:11:35

标签: robotframework

我在机器人框架方面遇到问题,需要帮助。 我有一个输入文本,可以在数据库中进行更新。我在应用程序中使用素面,因此我使用带有ajax请求的p:inputtext更新。当用户手动进行更新时,一切正常(进行提交,我可以看到想要的结果),但是当机器人框架尝试进行输入时,当框架在输入文本中写入时,我看到该值已删除(写入然后删除到输入中)。当机器人运行时,我在代码中使用了debug,并且看到在机器人框架中,java代码中的值为空。

在漫游器报告中,我可以看到每个输入中有3个帖子是对的还是有问题的?

jsf:

    - task: DotNetCoreCLI@2
      displayName: 'Restore Packages'
      inputs:
        command: restore
        projects: 'MyCsproj.csproj'
        vstsFeed: 'voxspan'

    - task: DotNetCoreCLI@2
      displayName: 'Build'
      inputs:
        command: build
        projects: 'MyCsproj.csproj'

Java:

<p:inputText id="#{'particle'.concat(particle.particleId)}"

             value="#{particle.defaultValue}"

             style="#{particle.mapValue['inputStyle']}"

             styleClass="padding-input inputtext"

             required="#{particle.required}"

             readonly="#{particle.mapValue['readonly'] == '1' or dynamicMaskView.action     == 
             'Consult'}"

             validator="#{dynamicMaskView.validator}">
    <f:attribute name="type" value="#{particle.mapValue['typeOfObject']}" />
    <p:ajax event="change" listener="#{dynamicMaskView.onValueChange(particle)}"
             update="formMasque" process="@this" />
 </p:inputText>

机器人:

 public void onValueChange(ValueChangeEvent event) {

    try {
      Particle particle = (Particle)event.getComponent().getAttributes().get("particle");
      String oldValue = (String)event.getOldValue();
      String newValue = (String)event.getNewValue();
      String defaultValue = particle.getDefaultValue();
      System.out.println(defaultValue); 
      System.out.println(oldValue); 
      System.out.println(newValue); 
      particle.setDefaultValue(newValue);
      changedParticle = particle;
      analyzeMaskAfterInput(particle, "1");
    } catch (Exception e) {
      profileLogger.logException(methodName, LogLevel.ERROR, e);
    }
  }

0 个答案:

没有答案
相关问题