ContentWindow line of script working in IE11 console but not in WPT test


I need to run WPT test in IE, Below line of script is working fine in IE console. but not running when it is through WPT test. Please suggest

Console - Working : document.getElementById(‘frameset’).contentWindow.document.getElementById(‘Imagehtmlbuttonuc2_btnButton’).click();
WPT - Not Working :
execAndWait document.getElementById(‘frameset’).contentWindow.document.getElementById(‘Imagehtmlbuttonuc2_btnButton’).click();

(WPT Private Instance)