Forum Discussion

vastydeep's avatar
vastydeep
Occasional Contributor
8 years ago

Datasource step for XML has extraneous default Column XPath entry

When creating an XML Datasource step in Ready!API 1.7.0, a default column xpath is included with the text

 

{--Specify the element to iterate. Use the Get Data button on the right or enter an XPath expression manually.--}

 

This causes a mismatch with the properties that are added and Index out of bounds exceptions in the log, see the screen shot below. 

 

3 Replies

  • RPfrimmer's avatar
    RPfrimmer
    Occasional Contributor

    Were you able to find a resolution for this problem?

     

    I'm having a similar issue with the XML datasource where the data being displayed in the data log when testing the step has the values shifted 1 column to the right of the defined columns.

     

    The end result is that the test step is useless as you are not able to reference the correct data under the desired property name

     

    As seen in the image above the QuestionId field is blank when is should contain the values that are currently displayed in the FormQuestionId field.  The same for the Text field, its values are displayed in the AnswerType field.

     

    This is a sample of the format of the data that this test step is attempting to read.

     

      <FormQuestion GroupText="Group 1" GroupTextLang="English" GroupSort="1">
         <QuestionId>1</QuestionId>
         <FormQuestionId>1</FormQuestionId>
         <Text Language="English">Question 1 - Single Line Text</Text>
         <AnswerType>ST</AnswerType>
      </FormQuestion>
      • RPfrimmer's avatar
        RPfrimmer
        Occasional Contributor

        Confirmed.  The addition of the 'Remove' button has allowed me to resolve this problem as well.

         

        It was a pain having to go and edit the project.xml manually to get by this.

         

        Thanks for the quick turnaround on this Smartbear!!