Forum Discussion
Hi Abhay,
Another possible solution is to find a JavaScript function to setup a date directly.
Really sorry for jumping-in, but can't withstand to extend your reply a bit (in square brackets):
Another possible solution is to find [on the page] a JavaScript function to setup a date [and call this function] directly [as described here: http://support.smartbear.com/testcomplete/docs/app-testing/web/general/common-tasks/javascript.html].
- Abhay_Kulkarni7 years agoNew Contributor
Sorry for late response.
But it did not work. But If I write below command in developer tool's console window then it works on browser.
document.getElementById('txtDepartureDate').value = "08/03/2017"
Is it possible to write above Javascript statement into my VBScript Project of TestComplete?
On link https://support.smartbear.com/testcomplete/docs/app-testing/web/general/common-tasks/javascript.html there is solution to run javascript function exist in Application Under Test. How can I execute javascript statement?
Thanks,
Abhay Kulkarni
- baxatob7 years agoCommunity Hero
Hi,
Try to set the value directly. E.g.:
Aliases.browser.yourTargetElement.value = "08/03/2017" where yourTargetElement is the mapped name
of the element with id "txtDepartureDate"- amitkumarlogs5 years agoNew Contributor
baxatob Thank you so much, its working fine for me. It will be really helpful if you could help me out to do it by clicking on particulate date from calender picker.