In my macro, Kantu opens a modal popup correctly. When Kantu closes the popup using the ‘X’ on the right top of the popup frame, all is fine. However, when Kantu clicks a ‘Cancel’ button within the popup frame the frame closes correctly, but it looks like Kantu loses its bearings. None of the locators seem to work and the macro times out. Even elementary commands such as:
selectFrame relative=top
click css = *
selectWindow title=…
time out. But after I stop the macro, those command work fine.
This is a private web site, I can provide a username and password via direct email.
Thanks, Jheroen
,
{
"Command": "click", - << BRINGS UP THE POPUP
"Target": "id=ctl00_ctl00_volunteers_repeater_edit_link1_0",
"Value": ""
},
{
"Command": "echo",
"Target": "test: close frame by clicking X",
"Value": "blue"
},
{
"Command": "click", – << CLOSE BY CLICKING X
"Target": "//button[@title="Close"]",
"Value": ""
},
{
"Command": "selectFrame",
"Target": "relative=top",
"Value": ""
},
{
"Command": "echo",
"Target": "open popup again",
"Value": "blue"
},
{
"Command": "click", – << LOCATOR WORKS FINE
"Target": "id=ctl00_ctl00_volunteers_repeater_edit_link1_0",
"Value": ""
},
{
"Command": "selectFrame",
"Target": "relative=top",
"Value": ""
},
{
"Command": "selectFrame", – << NO LOCATOR SEEMS TO WORK
"Target": "id=popup_iframe2",
"Value": ""
},
{
"Command": "click", – << CANCEL BUTTON ON POPUP
"Target": "link=Cancel",
"Value": ""
},
{
"Command": "selectFrame",
"Target": "relative=top",
"Value": ""
}
]
}
LINK THAT BRINGS UP THE POPUP
<a href="#" onclick=“openModalPopup(’/popup.aspx?page_id=2659&club_id=445422&member_id=-1&opp_id=7131&slot_id=35257’, 500, 400, ‘’); return false;” id=“ctl00_ctl00_volunteers_repeater_edit_link1_0” class=“members-link” title=“Assign Member” rel=“nofollow”></a>
CLOSING WITH THE X BOX
<button type="button" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-icon-only ui-dialog-titlebar-close" role="button" title="Close"><span class="ui-button-icon-primary ui-icon ui-icon-closethick"></span><span class="ui-button-text">Close</span></button>
CANCEL BUTTON
<a class="ce-button" id="ctl00_cancel_button" href="#" onclick="window.close();;return false;"><span class="cancel">Cancel</span></a>
var doNotOverrideClose = false;
var originalClose = window.close;
function close(original) {
if (original) {
originalClose.call();
}
else {
setupComplete = true;
window.top.closeModalPopup(false);
}
}