How can i iterate through the values from page.getProperties() in groovy? | Community
Skip to main content
Level 6
January 9, 2023
Solved

How can i iterate through the values from page.getProperties() in groovy?

  • January 9, 2023
  • 1 reply
  • 734 views

How can i iterate through the values from page.getProperties() in groovy?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by lukasz-m

Hi @shaheena_sheikh,

getProperties method returns ValueMap , you can iterate like this:

 

page?.getProperties()?.each { property -> println "Property key: ${property?.key}" println "Property value: ${property?.value}" }

 

key represents property key, value represents property value.

1 reply

lukasz-m
Community Advisor
lukasz-mCommunity AdvisorAccepted solution
Community Advisor
January 9, 2023

Hi @shaheena_sheikh,

getProperties method returns ValueMap , you can iterate like this:

 

page?.getProperties()?.each { property -> println "Property key: ${property?.key}" println "Property value: ${property?.value}" }

 

key represents property key, value represents property value.