Ask a Question

Window was destroyed during method execution while selecting menu items

SOLVED
tharunjavalimn
Frequent Visitor

Window was destroyed during method execution while selecting menu items

Hi Team,
I am getting this weird problem or transient problem on windows 10 machine when selecting menu items on the desktop application which I am testing. This problem is not seen on my colleagues machine having windows 10 and also not seen in my laptop windows 7 machine.

Code snippet to select menu item.
def menuSelectionTemp(menuOptions):
sleep(1000)
menuItems=""
mainWindow = VsmGenerics().vsm_window #I get the object using FindChildEx here
length = len(menuOptions)-1
for iteration, item in enumerate(menuOptions):
#sleep(200)
if iteration == length:
menuItems += item
else:
menuItems += item + "|"

sleep(2000)
#aqUtils.Delay (200)
mainWindow.Activate()
mainWindow.SetFocus()
aqUtils.Delay (500)
mainWindow.MainMenu.Click(menuItems)

Please find the attached snapshot showing the application which I am testing. I click on "File" and then on "New" and "VESDA VLF". Manually it works for me . But through automation I am getting this problem or issue on my Windows 10 machine

1 REPLY 1
sonya_m
SmartBear Alumni (Retired)

Hi @tharunjavalimn , I found a couple of threads in the Community with a similar issue, please check them out.

For example, here  https://community.smartbear.com/t5/TestComplete-Desktop-Testing/The-window-was-destroyed-during-meth... the solution is:

>>

Sounds like the object in question isn't always loading as fast as TestComplete wants to see it.  Try either putting a Delay right before the line that stops or use some version of Wait to give that window some time to show up.

<<

 

One more topic to check out:

https://community.smartbear.com/t5/TestComplete-Functional-Web/How-to-resolve-this-error-Window-was-...

 

If none of the suggestions help, then you can file a ticket with Support to perform a deeper investigation.


Sonya Mihaljova
Community and Education Specialist

cancel
Showing results for 
Search instead for 
Did you mean: