GNOME Bugzilla – Bug 412965
The setcontext worked incomplete.
Last modified: 2008-02-23 04:45:25 UTC
Step to Reproduced: >>> ================================ RESTART ================================ >>> import ldtp >>> ldtp.guiexist('frmUnsavedDocument1-gedit') 1 >>> ldtp.click('frmUnsavedDocument1-gedit', 'btnNew') 1 >>> ldtp.setcontext('Unsaved Document 1 - gedit', 'Unsaved Document 2 - gedit') 1 >>> ldtp.click('frmUnsavedDocument1-gedit', 'btnNew') 1 >>> ldtp.setcontext('Unsaved Document 2 - gedit', 'Unsaved Document 3 - gedit') 1 >>> ldtp.click('frmUnsavedDocument1-gedit', 'btnNew') Traceback (most recent call last):
+ Trace 114554
ldtp.click('frmUnsavedDocument1-gedit', 'btnNew')
raise LdtpExecutionError (str (msg))
>>> ldtp.setcontext('Unsaved Document 1 - gedit', 'Unsaved Document 3 - gedit') 1 >>> ldtp.click('frmUnsavedDocument1-gedit', 'btnNew') 1 >>> Actual Result: See the output info above Expected Result: Third click command should be OK and fourth should not be OK.
setcontext works based on the window information available in our appmap table. So, as of now it has, just the first window (Unsaved Document 1 - gedit) is available. So whenever you need to use (in this scenario), you need to use 'Unsaved Document 1 - gedit' as first argument and the 'Unsaved Document 3 - gedit' as second argument. It has been designed that way.
okay.