Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
SangeethaP Absent Member.
Absent Member.
684 views

QTP is uable to recognize Javascript calendar

Hi,

 

I have an application which is built out of struts 1.2 and jsp and html.

I need to automate this. I have almost hit a dead end with automating the calendar pop up.

App has a text box to input the date, when clikcing on it, it will pop up the calendar and this calendar is built out of javascript.

This is adentified as a web table and one of the column text is dynamically generated based ont he current month.

My problem here 1) it  is only identifying once and the second time it does not work.

2) once i identify it and add it to the repository and when i try to highlight  the object it highlights correctly but also it creates another pop up. which is kinda weird.

 

has anyone come across this scenario or can someone help me solve this.

for the ad-hoc solution i can use coordinates to close the calendar but i believe it is not a good practice to use coordinates.

 

 

I have attached the image of the calendar.

 

I'm looking for quick turn around. So your efforts in answering this is very much appreciated.

 

Thank you.

 

Cheers,

Sangeetha

 

BTW - I'm suing UFT 11.53

0 Likes
4 Replies
rameshtt Absent Member.
Absent Member.

Re: QTP is uable to recognize Javascript calendar

Hi ,

 

Try direct method to set value in calender

 

Browser().Page().Webedit("calenderObjecctDesc").object.value="DateFormat"

 

 

 

Thanks,

Ramesh

0 Likes
SangeethaP Absent Member.
Absent Member.

Re: QTP is uable to recognize Javascript calendar

Hi Ramesh,

 

Thanks for the reply. 

I'm happy to bypass the calendar, but the problem here is it doesn't close the calendar if i directly set it : this is the very first option i have tried.

 

Therefore it can't be done this way. If you read my question you will understand my problem. I don't like to use coordinates to close the calendar.

 

 

0 Likes
rameshtt Absent Member.
Absent Member.

Re: QTP is able to recognize Javascript calendar

Hi Sangeeta,

 

You can also try few below approaches .

 

Using UFT DOM set value in TextBox, and immediate to use Sendkey to Close the Calender (like use Tab or Esc keys, check manually what is perfect key to close the Calendar then use that key using Sendkeys.

 

Another way : Try to identify how Calendar object identified by UFT. 

How the month and year is identified and how day is identified- then try with DP.

 

 

One More option, just record the object, find how  script generating, based on this you code.

 

 

 

Thanks,

Ramesh

 

 

 

 

0 Likes
pavel75 Absent Member.
Absent Member.

Re: QTP is uable to recognize Javascript calendar

Hi,

 

you have to .Refresh the calendar object, when a new DOM instance of it is created (instead of reuse).

 

Regards,

Pavel

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.