GNOME Bugzilla – Bug 706992
Cobra looses all objects after steps specified inside
Last modified: 2013-08-29 18:02:16 UTC
win7 CobraWinLDTP-3.5.0.msi Cobra WinLDTP 3.5 XP/Vista/7 Featured May 22 May 22 612 KB 294 Install Firefox 23.01 (as for now) I've installed Russian version. Maybe it matters. Clean profile. Script description: Open new tab in it (It's very important) Visual bookmarks should appear. So that window title is just 'Mozilla Firefox' Then wait few secs (!) And close it. Then try to get objects. No windows will be found. Script code: def open_new_tab(): ldtp.activatewindow(FF_TITLE) ldtp.keypress('<ctrl>') ldtp.generatekeyevent('t') ldtp.keyrelease('<ctrl>') ldtp.wait(5) def close(): ldtp.activatewindow(FF_TITLE) ldtp.keypress('<alt>') ldtp.generatekeyevent('<f4>') ldtp.keyrelease('<alt>') ldtp.waittillguinotexist(FF_TITLE, guiTimeOut=20) FF_TITLE = '*Mozilla Firefox*' ldtp.launchapp(r'C:\Program Files\Mozilla Firefox\firefox.exe') ldtp.wait(5) open_new_tab() ldtp.wait(5) print ldtp.getwindowlist() print ldtp.guiexist(FF_TITLE) close() print "-----------" print ldtp.getwindowlist() print ldtp.guiexist(FF_TITLE) Output: ['pane0', 'frmMozilla Firefox', u'frm\u041d\u043e\u0432\u0430\u044f \u0432\u043a\u043b\u0430\u0434\u043a\u0430', 'frmbar-auto - [C:\\dev\\python\\bar-auto] - [bar-auto] - ...\\temp\\test2.py - IntelliJ IDEA 12.0.4', 'frmkono - [C:\\dev\\python\\kono] - [kono] - ...\\kono\\yandex\\cross\\browserff.py - IntelliJ IDEA 12.0.4', u'frm\u0410\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440: C:\\Windows\\system32\\cmd.exe', 'frmMINGW32:/c/dev/python/kono', 'frmMINGW32:/c/dev/python/bar-auto', 'frm{C:\\} - Far 2.0.1807 x86 Administrator', u'frm\u0410\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440: C:\\Windows\\system32\\cmd.exe1', u'frm\u0411\u0435\u0437\u044b\u043c\u044f\u043d\u043d\u044b\u0439 \u2014 \u0411\u043b\u043e\u043a\u043d\u043e\u0442', u'frm\u0411\u0435\u0437\u044b\u043c\u044f\u043d\u043d\u044b\u0439 \u2014 \u0411\u043b\u043e\u043a\u043d\u043e\u04421', 'frmgitk: kono', 'frmGit Gui (kono) C:/dev/python/kono', 'frmGit Gui (bar-auto) C:/dev/python/bar-auto', 'paneProgram Manager'] 1 ----------- 0
I modified your program slightly: import ldtp def open_new_tab(): ldtp.activatewindow(FF_TITLE) ldtp.generatekeyevent('<ctrl>t') ldtp.wait(5) def close(): ldtp.activatewindow(FF_TITLE) ldtp.generatekeyevent('<alt><f4>') ldtp.waittillguinotexist(FF_TITLE, guiTimeOut=20) FF_TITLE = '*Mozilla Firefox*' ldtp.launchapp(r'C:\Program Files (x86)\Mozilla Firefox\firefox.exe') ldtp.wait(5) open_new_tab() ldtp.wait(5) print ldtp.getwindowlist() print ldtp.guiexist(FF_TITLE) close() print "-----------" print ldtp.getwindowlist() print ldtp.guiexist(FF_TITLE) Thanks for the bug report. Issue is fixed and updated in git head. Thanks