0

I have similar question to Telerik WebAii Framework - How to change focus to newy opened page/window but I face another problem.

The code opens the first window (e.g. W1) then clicks on a link which opens a new child window - W2. W2 opens new child window W3. After W3 is closed I need to shift focus to W2. How can I do that? I have following error because Telerik doesn't switch to proper window

InError set by the client. Client Error:
System.ArgumentNullException: Value cannot be null.
Parameter name: SetCurrentDocumentMarkup. The document object is null. Unable to get markup. Probably the Html Document was closed prior to executing the action.
Community
  • 1
  • 1
algot
  • 2,428
  • 3
  • 19
  • 23

1 Answers1

0

WebAii has the concept of "ActiveBrowser". This object always points to the most recently opened browser window. To close the current window and return focus to the parent you should use:

ActiveBrowser.Close();

That will close the current browser and return focus to the parent browser. If this doesn't work as expected can you send technical support a sample test that demonstrates the problem? Post it in one of our forum posts at Telerik.com and we'll be happy to study this problem.

Cody Gibson Telerik Technical Support

sircody
  • 214
  • 1
  • 5