I'm using LDTP to write a GUI test case script in python. I'm running the script in a virtual machine by nosetests.

And I get a block with the error of unable to find window X, while window X is absolutely displayed on the monitor. This error always occurs after LDTP actions.


After I open my subscription manager in the virtual machine (rhel6.8), I could find the subscription manager by calling getwindowlist():

>>> getwindowlist()
['frmTopExpandedEdgePanel', 'frmBottomExpandedEdgePanel', 'frmroot@localhost:~',
 'frmx-nautilus-desktop', 'frmSubscriptionManager']

Then I use getobjectlist() to do some action:

>>> getobjectlist('frmSubscriptionManager')
['flr8', 'flr4', 'mnuAbout', 'flr6', 'flr7', 'flr0', 'flr1', 'flr2', 
'flr3', 'ukn2', 'ukn3', 'ukn0', 'ukn1', 'scpn1', 'scpn0', 'scpn3', 'scpn2', 
'lblStatus1', 'lblContract', 'ptl0', 'flr5', 'txtStartEndDateText', 
'tblBundledProductsTable', 'scbr0', 'mnuRedeemSubscription', 
'tchEndDate', 'lblStatus', 'mnuSystem', 'mnuRegister', 'tchStartDate', 
'lblSKU', 'txtSKUText', 'txtProvidingSubscriptionsText', 'tchQuantity', 
'txtSupportTypeText', 'ttblMySubscriptionsView', 'mnuEmpty', 
'txtArchText', 'mnuConfigureProxy', 'txtSupportLevelAndTypeText', 
'mnuHelp', 'mnuOnlineDocumentation', 'lblStart-EndDate', 'mbr0', 

The window disappeared, even though it was still displayed on my virtual machine's monitor.

>>> getwindowlist()
['frmTopExpandedEdgePanel', 'frmBottomExpandedEdgePanel', 'frmroot@localhost:~', 'frmx-nautilus-desktop']

Why does this error occur, and how should I deal with this situation in an automated test?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.