9 Answers, 1 is accepted
I'm very glad to hear you were able to resolve the problem yourself. Also thanks for pointing out that the ActiveBrowser.Close() call seems redundant. We'll see if we can improve that in a future release.
Kind regards,
Cody
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.
Yes you are correct. We very much appreciate your feedback and will work on making this scenario easier to worth with. We are always looking for ways of making our product easier to use while performing the testing requirements needed in todays web 2.0 world.
All the best,
Cody
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.
I reproduced the same issue raised by macon.
While handling popups, when i call the ok or cancel button to close the popup it closes both the popup and the application.
I'm using the Telerik Testing Framework 2012.2.1527.
The Code i used for handling the popup:
Manager.SetNewBrowserTracking(true);
element.Click(); //This opens the Popup
Manager.SetNewBrowserTracking(false);
manager.WaitForNewBrowserConnect("xxxxx" , true , 5000);
rest of the code to handle elements in Popup that works fine
OkButton.Click(true);
//Rest of the code
It handles the elements present in the popup, however on clicking the ok or cancel button, it closes the browser.
I even tried these lines of code, but the result is the same.
OkButton.MouseClick();
Okbutton.MouseClick(MouseClickType.LeftClick);
Okbutton.MouseClick(MouseClickType.LeftDoubleClick);
OkButton.Click(false);
Okbutton.Click();
I even tried without using the SetNewBrowserTracking, but still the same result.
This is the error i'm getting:
ExecuteCommand failed!
BrowserCommand (Type:'Information',Info:'DocumentMarkup',Action:'NotSet',Target:'null',Data:'',ClientId:'Client_6ea0178a-0a52-4b58-add8-fa5748c9c9e2',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'-1',InError:'False',Response:'')
InnerException: System.InvalidOperationException: This client 'Client_6ea0178a-0a52-4b58-add8-fa5748c9c9e2' is not connected to remote to be able to process command.
at ArtOfTest.WebAii.Core.Browser.ExecuteCommandInternal(BrowserCommand request)
It closes the Browser after handling the Popup. Is there anything i'm missing?
Thanks in Advance
Sudarshan
The error:
This client 'Client_6ea0178a-0a52-4b58-add8-fa5748c9c9e2' is not connected to remote to be able to process command.
This is expected as a result of the main browser window closing. The problem to be solved is why is the main browser closing like that. This I cannot explain. I'm also unable to reproduce the symptom using this sample web page:
http://www.w3schools.com/js/tryit.asp?filename=tryjs_openwindow
We need to be able reproduce the problem on our local development environment before we can find the root cause and fix it. Can you send me a complete test I can execute on my machine that demonstrates this problem? Once I can reproduce the problem we can investigate what's causing it.
Cody
Telerik
Test Studio Trainings
Thanks for the Response.
I'm not allowed to share the application but i'm attaching the scenario.
According to the documentation:
http://www.telerik.com/automated-testing-tools/support/documentation/user-guide/write-tests-in-code/advanced-topics/handling-html-popups-and-dialogs/built-in-dialog-handlers/handling-html-popups.aspx
We tell the framework that click causes the popup to close by passing the parameter true to the click function and the Active Browser will be set to the browser window that was open prior to the popup opening.
In the picture attached, the popup will be closed by clicking the save button and the active browser should be set to the window that was open prior to the popup opening.
But what is happening is it closes both the windows(Popup and the window that was opened prior to popup) on clicking the save button.
This was working fine with telerik 2011 testing framework.
I upgraded from 2011 to 2012 and finding this closing browser window problem.
Thanks
Sudarshan
Got the solution for this.
In the settings part, had set the KillBrowserProcessOnClose to true, so it was closing both the popup and the mainwindow after the popup was handled.
However this was working fine with telerik Testing framework 2011.
For Telerik 2012 Framework had to set KillBrowserProcessOnClose to false and call ActiveBrowser.Close() at the end of the script.
Thanks
Sudarshan
Fantastic you were able to find a solution on your own.
I tried reproducing the behavior in a sample test with KillBrowserProcessOnClose = true. It behaved the just fine for me. This makes me think it's somehow application or test code structure specific. But since you're now unblocked I'm not going to worry about it.
Cody
Telerik
Test Studio Trainings