Jump to content

Recommended Posts

Posted

Hi all,

I used autoit script(.exe file) in selenium RC to click the pop-up button. But i am unable to open the pop-up as there occurs a javascript error

Error: Object does not support this property or method.

the line where error is caused is :

var retVal=window.showModalDialog(url,window,"dialogWidth:615px;dialogheight:515px;status:no;help:no;resizeable:no;scroll:yes");

the HTML page source is :

function uploadDocument(){

if(document.DetailOrderForm.clientId.value == -1){

alert("Please select the Client name.");

document.DetailOrderForm.clientId.focus();

return false;

}

else {

var url = "/clientApp/documents.do?action=initialization&entryFromId="+document.getElementById('encClientId').value+"&inputType=CLIENT&fromPage=detailorder";

if(window.showModalDialog){

var retVal=window.showModalDialog(url,window,"dialogWidth:615px;dialogheight:515px;status:no;help:no;resizeable:no;scroll:yes");

}

else{ // to support other browser

window.open(url,"","menubar=0,toolbar=0,scrollbars=1,left=250,top=200,width=600,height=500");

}

}

}

Can some one help me as to how to overcome this( is this because of the reason :-When showModalDialog is called the javascript gets suspended for the parent. Selenium whose handle is still pointing the parent window also gets suspended. As a result all the successive commands in Selenium script ultimately get suspended.

).

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...