Forum Discussion
- anitha123ContributorPlease let me know if there is any update on this.
- anitha123ContributorHi,
It is very Urgent.
Please let me know if any one knows why Object Spy is not able to capture the properties of a pop up window.
Thanks and Regards,
Anitha - tristaanogreEsteemed ContributorIs the pop-up from your application or is it coming from TestComplete? What's the text in it? Is there a way you can capture a screen shot? Is this an expected pop-up or something that is coming from something else in your environment?
Without a lot of details, there's not a lot of help that we can give. TestComplete does have a built in feature to handle unexpected windows. So, if this is unexpected window, TestComplete can be configured to automatically attempt a close, click on the default button, etc. - anitha123ContributorWe are testing a WPF application where in when we click on particular object, a pop window should appear. There are two buttons in pop up window where we need to click one of the button and then proceed further with other actions.
TestComplete recognizes pop window as a single object, it doesnt recognize the buttons inside the pop up window.
I am not able to do ObjectSpy on that pop window to see the properties of that buttons nor i can do checkpoint, the pop up window disappears.
Please let me know your solution for this. - DevaVContributorHi Anitha,
Please refer this link http://support.smartbear.com/viewarticle/12985/
For eg consider below code to check the click the menu item
var TestPopupMenu = Sys.Process("explorer").Window("#32768", "", 1).PopupMenu;
var TestMenuItem = "Refresh"
for (i=0; i<TestPopupMenu.Count; i++)
if (TestMenuItem === TestPopupMenu.Items(i).Caption)
break
if (i<TestPopupMenu.Count)
TestPopupMenu.Click(i)
else {
Log.Error(Menu not exists.);
TestPopupMenu.Close();
}
Hope this helps out! - anitha123ContributorHi Deva,
Thanks for the reply, when i tried the below it is throwing an exception.
I have attached pop up window snapshot. There are two buttons inside that "Queue" and "Cancel". These buttons are not recognized. Please give me a solution to recognize these objects when playing back.
I have recorded the script and when i playback it doesnt click on that button. Please let me know the solution.function Popupmenu()
{
listBox = grid.PrintQueueUserControl.Grid.Grid.Border.grid1.Grid.Border.Grid.HorizontalListBox;
listBox.ClickItem(i);
listBox.ClickItem(i);
}
Thanks and regards,
Anitha - anitha123ContributorIts very Urgent. Please let me know if anyone can help me as soon as possible.
- anitha123ContributorIts very Urgent. Please let me know if anyone can help me as soon as possible.
- DevaVContributorHi Anitha,
The code that you have sent looks abstract. Could you please spy the pop-up menu and can send all the properties in the object spy. Can you also make it clear with pop-up menu.
If it is a pop-up menu you can try with the solution that was said in previous menu. - ArtemS
Alumni
Hello Anitha,
Have you tried the Point and fix technique to retrieve the properties of your pop-up menu in Object Spy?
It is helpfull when the desired on-screen object is displayed after some user actions and thus it cannot be captured via usual "Target Glyph" selection.
Regards