How to get field name in json path

117 views
Skip to first unread message

Aphirak Phothisa

unread,
Sep 2, 2021, 1:28:46 AM9/2/21
to robotframework-users

I want to get only the field name. Can I get it or not? and if have another way to verify contain field name below please suggest me

image.png

Tatu Aalto

unread,
Sep 2, 2021, 3:31:35 AM9/2/21
to maico...@gmail.com, robotframework-users
Hi

The answer depends where the Json is coming from, are example reading it from file or from somewhere else? Also it influences if you are using some ready made library to receive the Json, example by robotframework-requests[1] library, because library may already have keywords to get the parts you are wanting. As last, but not least, it depends what you want to do with the data? Will just assert that Json blob is not empty or are you interested about the individual keys and what you want to do with keys and values? Example do you want to check that some values will have particular value or do you want to use some of the values for later in your keywords or something else (and what that else might be?)

-Tatu

On Thu, 2 Sept 2021 at 08:28, Aphirak Phothisa <maico...@gmail.com> wrote:

I want to get only the field name. Can I get it or not? and if have another way to verify contain field name below please suggest me

image.png

--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/robotframework-users/CA%2Bqya7SPpS879xuhqvUbL1Jh-g%2Bpu9%3DqOfBwq0AfENZQ5EAWvw%40mail.gmail.com.

Jirayu Kaewprateep

unread,
Sep 8, 2021, 5:59:51 AM9/8/21
to aalto...@gmail.com, maico...@gmail.com, robotframework-users
🥺💬 He is right, target predefined methods anyway your sources can be open services they are mixed of query information ℹ️
🧸💬 You must target specific methods but they also allowed to play sample multiple queries or result return from target request.
🐑💬 From return fields it is easy as they are in parameters ⁉️

Reply all
Reply to author
Forward
0 new messages