Forum Discussion

tharunjavalimn's avatar
tharunjavalimn
Frequent Visitor
4 years ago
Solved

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