Functional testing set date property. | Community
Skip to main content
naresh5361
Level 2
February 6, 2023

Functional testing set date property.

  • February 6, 2023
  • 1 reply
  • 776 views

Hi All,

 

How to set date property to a component in functional testing .

I have extending the AbstractComponent and i able to set String properties but not date. appriciate your help.

 

testcomponent comp = new Banner(componentclient, xfPath,"/master/jcr:content/root/testcomponent", "testcomponent");

comp.setProeprty("title","pageTitle");

 

Not able to set 

banner.setProeprty("date", date);

 

 

Thanks in advance.

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

Saravanan_Dharmaraj
Community Advisor
Community Advisor
February 6, 2023

Please try the below

 

Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone("GMT"));

banner.setProperty("date",calendar);   

 

 

naresh5361
Level 2
February 6, 2023

@saravanan_dharmaraj 

It is not working.

In AbstractComponent class there is no method like -->  setProperty(string, calendar). 

I have created new one but no luck.

public void setDateProperty(String name, Calendar calendar) {

        setProperty("date",calendar);

}

API :  com.adobe.cq.testing.client.ComponentClient;

Thanks in advance.

 

Saravanan_Dharmaraj
Community Advisor
Community Advisor
February 6, 2023

Sorry i thought it was for Node API. My mistake.