Question

7
Views
Close popover
sujith reddy (sujithr4)
TTEC

TTEC
IN
sujithr4 Member since 2019 2 posts
TTEC
Posted: November 3, 2020
Last activity: November 3, 2020

unable to interrogate a date picker in web application which gets disabled whenever first text box value is set the others disabl

Hi team,

I am unable to interrogate a datepicker in a web application using universal adapter tried a script which was posted in the community , we found in the application that index id is changing its not constant and we are unable to find the correct index id can anyone help or faced similar issue

function selectDate(date) { var datevalue=parseInt(date); loop1: for(i=0;i<document.getElementById("controlCalBody").getElementsByTagName("tr").length;i++) { loop2: for(j=0;j<document.getElementById("controlCalBody").getElementsByTagName("tr")[i].getElementsByTagName("a").length;j++) { if(datevalue==parseInt(document.getElementById("controlCalBody").getElementsByTagName("tr")[i].getElementsByTagName("a")[j].innerHTML)) { document.getElementById("controlCalBody").getElementsByTagName("tr")[i].getElementsByTagName("a")[j].click(); break loop1; } }

function selectMonth(month) { var monthvalue=month; var day; switch (monthvalue) { case 1: day = "January"; break; case 2: day = "February"; break; case 3: day = "March"; break; case 4: day = "April"; break; case 5: day = "May"; break; case 6: day = "June"; break; case 7: day = "July"; break; case 8: day = "August"; break; case 9: day = "September"; break; case 10: day = "October"; break; case 11: day = "November"; break; case 12: day = "December"; } for(i=0;i<12;i++) { if(day==document.getElementById("calMonthCell").innerHTML) { break; } document.getElementById("previousMonth").getElementsByTagName("input")[0].click(); } };

function selectYear(year) { var yearvalue=parseInt(year); var screenvalue=parseInt(document.getElementById("calYearCell").innerHTML) if(yearvalue>=screenvalue) { while (yearvalue > screenvalue) { document.getElementById("nextYear").getElementsByTagName("input")[0].click(); screenvalue++; } } else{ while (yearvalue < screenvalue) { document.getElementById("previousYear").getElementsByTagName("input")[0].click(); screenvalue--; } } }

 

steps tried:

1) if I use settext method and enter the date in first text box  the second textbox gets disabled

2) if i use unable method and enter the date in second text box the apply button gets disabled

Attaching screenshot for reference

***Edited by Moderator: Pooja to add platform capability tags***
Pega Robotic Process Automation 19.1 Robotic Process Automation User Experience Robotics System Architect