0

I want to just display (not compare) the count of clinic_id, lets say I have response like

<role_select>
<username>User1</username>
<first_name>First1</first_name>
<last_name>Last1</last_name>
<middle_name>T</middle_name>
<company_id>020550</company_id>
<clinic_id>00122</clinic_id>
</role_select>

<role_select>
<username>User2</username>
<first_name>First2</first_name>
<last_name>Last2</last_name>
<middle_name>T</middle_name>
<company_id>020551</company_id>
<clinic_id>00123</clinic_id>
</role_select>

<role_select>
<username>User3</username>
<first_name>First3</first_name>
<last_name>Last3</last_name>
<middle_name>T</middle_name>
<company_id>020553</company_id>
<clinic_id>00124</clinic_id>
</role_select>

I have 2162 different clinic_id's. I want to display (not compare to any other value), is this possible in x path expression? or do I need to use script assertion(java script)?

I tried count(//ns1:role_select), this way I have to change expected value for every environment, instead I want to display the clinic_id count value

Venky
  • 1
  • 1
  • 1
    What have you tried? Why did it not work? – tim_yates Mar 02 '17 at 17:39
  • 1
    Can you show your sample data ? – Rao Mar 02 '17 at 17:55
  • I tried count(//ns1:parent node) but I still have to give a expected result value in xpath assertion, I can give a value to compare in 1 environment, but I have to test this in 10 different environments which makes me change values every time – Venky Mar 02 '17 at 18:27
  • 1
    That's not valid XML – tim_yates Mar 02 '17 at 18:50
  • Please edit the question and put the data which resembles what you specified in the question. If you not wish to show the relevant data and assuming it would be answered is highly impossible. – Rao Mar 03 '17 at 01:23
  • Please edit your question to put the sample data into the question. And then tell us what your desired output counts would be given that sample data. THEN show us what you have already tried that did not succeed. – BalRog Mar 03 '17 at 15:53

0 Answers0