Forum Discussion
irina_lukina
15 years agoSuper Contributor
Hi Duncan,
Try using the following code snippet:
function test()
{
var datepicker = Sys.Process("iexplore", 2).Page("http://jqueryui.com/demos/datepicker/").Panel("ui_datepicker_div");
var prevLink = datepicker.Panel(0).Link(0).TextNode(0);
for (var i = 0; i < 3; i++)
{
// I recommend that you obtain this object each time in the loop
// It seems to me that this object is dynamic
ShowMessage(datepicker.Panel(0).Panel(0).TextNode(0).innerText);
prevLink.FireEvent("onclick");
}
}
Does this help?
using FireEvent() instead of TC's Click() method is necessary because, after the first click, TC claims that the object has no dimensions; I guess that is maybe related to the main issue.
I failed to reproduce this behavior. The Click method works fine in my script.