...

View Full Version : How to recognise/get current window



maganti.smurthy
03-28-2012, 02:08 PM
Presently am using below code, and it is showing an error message says "Cannot call method "getCurrentWindow" of undefined (<Unknown source>#4) in <Unknown source> at line number 4"

=========================================
function insertDataIntoHtmlEditorIE()
{

currentwindow = this.browserbot.getCurrentWindow(this);

var iFrame = currentwindow.getElementById

('ctl00_MainContent_editor_ctl02_ctl00');

var iFrameBody;

iFrameBody =

iFrame.contentWindow.document.getElementsByTagName('body')[0];

iFrameBody.innerHTML = "xyz";

}
================================================

please help me out to resolve this issue..
*am calling this script in Selenium RC through Eclipse

felgall
03-29-2012, 03:56 AM
You haven't defined this.browserbot inside that function? Are you sure that it exists?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum