This is a migrated thread and some comments may be shown as answers.

Unable to test "Using jQuery To update parent window"

2 Answers 76 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Morten Røgenes
Top achievements
Rank 1
Morten Røgenes asked on 21 Apr 2010, 11:48 AM
Hi
I like your Test studio alot, but Ive run into a problem in an advanced scenario.
I have a popup window where the user can upload images, but when the submit button is clicked I use jquery to refresh the parent window and close the popup window. During automated testing, however, this does not work.
I have attached the error message IE gives me.
I know this is kind of a special scenario, but do you know of any workaround?

jquery code: communication-between-browser-windows-with-jquery

 
// triggers an event in the parent window. Returns true if the  
// message was succesfully sent, otherwise false.  
$.triggerParentEvent = function(event, msg) { 
  $.triggerWindowEvent(window.opener, event, msg); 
}; 
 
// triggers an event in a window that was opened by the current window 
$.triggerWindowEvent = function(otherWindow, event, msg) { 
  if (typeof otherWindow == "object") { 
    form = otherWindow.document.forms["windowComm"]; 
    if (form) { 
      form.windowCommEvent.value = event; 
      form.windowCommData.value = msg; 
      form.windowCommButton.click(); 
      return true
    } 
  }  
  return false

2 Answers, 1 is accepted

Sort by
0
Konstantin Petkov
Telerik team
answered on 21 Apr 2010, 11:56 AM
Hi Morten,

That's quite an interesting report. Let me remove the duplicated thread and attach the screen shot with the error here.

Can you please post your test code as well?

Sincerely yours,
Konstantin Petkov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Morten Røgenes
Top achievements
Rank 1
answered on 21 Apr 2010, 02:29 PM
No codebehind for any of these steps.
Tags
General Discussions
Asked by
Morten Røgenes
Top achievements
Rank 1
Answers by
Konstantin Petkov
Telerik team
Morten Røgenes
Top achievements
Rank 1
Share this question
or