diff options
author | nagappan <nagappan> | 2005-07-18 13:19:50 +0000 |
---|---|---|
committer | nagappan <nagappan> | 2005-07-18 13:19:50 +0000 |
commit | 2e5b283072d55105f5a3d6316fe4242603353504 (patch) | |
tree | 08adcc225d3108a5d39e347f2e50ae4820110eaf | |
parent | 90c0d7bcd69d83105eca47e4527f6b873cbe6cd3 (diff) |
Creating a new archive and adding new files to that archive
Opening an existing archive and extracting them
Opening an existing archive and opening/viewing a file without extracting it
Deleting a file from an archive
Moving an archive from one location to another
Renaming an archive
-rw-r--r-- | file-roller/README | 5 | ||||
-rw-r--r-- | file-roller/add-file.py | 42 | ||||
-rw-r--r-- | file-roller/copy-archive.py | 47 | ||||
-rw-r--r-- | file-roller/create-archive.py | 45 | ||||
-rw-r--r-- | file-roller/delete-file | 0 | ||||
-rw-r--r-- | file-roller/delete-file.py | 41 | ||||
-rw-r--r-- | file-roller/file-roller.map | 194 | ||||
-rwxr-xr-x | file-roller/fileroller.py | 89 | ||||
-rw-r--r-- | file-roller/help.py | 39 | ||||
-rw-r--r-- | file-roller/move-archive.py | 51 | ||||
-rw-r--r-- | file-roller/open-extract.py | 39 | ||||
-rw-r--r-- | file-roller/rename-archive.py | 52 | ||||
-rw-r--r-- | file-roller/view-file.py | 37 |
13 files changed, 681 insertions, 0 deletions
diff --git a/file-roller/README b/file-roller/README new file mode 100644 index 0000000..fd07900 --- /dev/null +++ b/file-roller/README @@ -0,0 +1,5 @@ +Executed and verified all the scripts that are written for file-roller 2.11.1 on SUSE 9.3 +Precondition: +file-roller.tar.gz file should be placed under home directory +Known bugs: +Copying an archive to other location does not work due to the bug in file-roller diff --git a/file-roller/add-file.py b/file-roller/add-file.py new file mode 100644 index 0000000..c948315 --- /dev/null +++ b/file-roller/add-file.py @@ -0,0 +1,42 @@ +# +# Author: +# Nagashree M <mnagashree@novell.com> +# S Vishnu Kumar <vishnukumar.sarvade@gmail.com> +# +# Copyright 2004 Novell, Inc. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the +# Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. +# + +try: + selectmenuitem ('ArchiveManager', 'mnuArchive;mnuOpen') + time.sleep (5) + selectrow ('dlgOpen', 'tblFiles', 'file-roller.tar.gz') + click ('dlgOpen', 'btnOpen') + setcontext ('Archive Manager', 'file-roller.tar.gz') + i = getrowcount ('ArchiveManager', 'tbl0') + click ('ArchiveManager', 'btnAdd') + selectrow ('dlgAdd', 'tblFiles', 'test1.tar.gz') + #click ('dlgAdd', 'btnAdd') #this does not work. + doubleclickrow ('dlgAdd', 'tblFiles', 'test1.tar.gz') + j = getrowcount ('ArchiveManager', 'tbl0') + selectmenuitem ('ArchiveManager', 'mnuArchive;mnuClose') + if i == j: + log ('Adding a file to an archive failed', 'fail') + else: + log ('Successfully added a file from an archive', 'pass') +except error: + log ('Adding a file to an archive failed', 'fail') diff --git a/file-roller/copy-archive.py b/file-roller/copy-archive.py new file mode 100644 index 0000000..d10890b --- /dev/null +++ b/file-roller/copy-archive.py @@ -0,0 +1,47 @@ +# +# Author: +# Nagashree M <mnagashree@novell.com> +# S Vishnu Kumar <vishnukumar.sarvade@gmail.com> +# +# Copyright 2004 Novell, Inc. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the +# Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. +# + +try: + selectmenuitem ('ArchiveManager', 'mnuArchive;mnuOpen') + time.sleep (5) + selectrow ('dlgOpen', 'tblFiles', 'file-roller.tar.gz') + click ('dlgOpen', 'btnOpen') + time.sleep (5) + setcontext ('Archive Manager', 'file-roller.tar.gz') + selectmenuitem ('ArchiveManager', 'mnuArchive;mnuCopy') + selectrow ('dlgCopy', 'tblShortcuts', 'Desktop') + doubleclickrow ('dlgCopy', 'tblShortcuts', 'Desktop') + click ('dlgMove', 'btnCopy') + selectmenuitem ('ArchiveManager', 'mnuArchive;mnuClose') + + #Verification + selectmenuitem ('ArchiveManager', 'mnuArchive;mnuOpen') + time.sleep (5) + selectrow ('dlgOpen', 'tblShortcuts', 'Desktop') + doubleclickrow ('dlgOpen', 'tblShortcuts', 'Desktop') + selectrow ('dlgOpen', 'tblFiles', 'file-roller.tar.gz') + click ('dlgOpen', 'btnOpen') + setcontext ('Archive Manager', 'file-roller.tar.gz') + selectmenuitem ('ArchiveManager', 'mnuArchive;mnuClose') +except error: + log ('Copying an archive to different location failed', 'fail') diff --git a/file-roller/create-archive.py b/file-roller/create-archive.py new file mode 100644 index 0000000..c48dd4f --- /dev/null +++ b/file-roller/create-archive.py @@ -0,0 +1,45 @@ +# +# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp +# +# Author: +# Nagashree M <mnagashree@novell.com> +# S Vishnu Kumar <vishnukumar.sarvade@gmail.com> +# +# Copyright 2004 Novell, Inc. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the +# Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. +# + +try: + selectmenuitem ('ArchiveManager', 'mnuArchive;mnuNew') + time.sleep (5) + settextvalue ('dlgNew','txtName','test1.tar.gz') + time.sleep (5) + click ('dlgNew', 'btnNew') + time.sleep (5) + setcontext ('Archive Manager', 'test1.tar.gz') + selectmenuitem ('ArchiveManager', 'mnuEdit;mnuAdd') + time.sleep (5) + selectrow ('dlgAddFiles', 'tblFiles', 'file-roller.tar.gz') + doubleclickrow ('dlgAddFiles', 'tblFiles', 'file-roller.tar.gz') + j = getrowcount ('ArchiveManager', 'tbl0') + if j > 0: + log ('Creating new archive passed', 'pass') + else: + log ('Creating new archive failed', 'fail') + selectmenuitem ('ArchiveManager', 'mnuArchive;mnuClose') +except error: + log ('Creating new archive failed', 'fail') diff --git a/file-roller/delete-file b/file-roller/delete-file new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/file-roller/delete-file diff --git a/file-roller/delete-file.py b/file-roller/delete-file.py new file mode 100644 index 0000000..79acb9d --- /dev/null +++ b/file-roller/delete-file.py @@ -0,0 +1,41 @@ +# +# Author: +# Nagashree M <mnagashree@novell.com> +# S Vishnu Kumar <vishnukumar.sarvade@gmail.com> +# +# Copyright 2004 Novell, Inc. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the +# Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. +# + +try: + selectmenuitem ('ArchiveManager', 'mnuArchive;mnuOpen') + time.sleep (5) + selectrow ('dlgOpen', 'tblFiles', 'file-roller.tar.gz') + click ('dlgOpen', 'btnOpen') + setcontext ('Archive Manager', 'file-roller.tar.gz') + i = getrowcount ('ArchiveManager', 'tbl0') + selectrowindex ('ArchiveManager', 'tbl0', 2) + click ('ArchiveManager', 'btnDelete') + click ('dlgDelete', 'btnOk') + j = getrowcount ('ArchiveManager', 'tbl0') + selectmenuitem ('ArchiveManager', 'mnuArchive;mnuClose') + if i == j: + log ('Deleting a file from an archive failed', 'fail') + else: + log ('Successfully deleted a file from an archive', 'pass') +except error: + log ('Deleting a file from an archive failed', 'fail') diff --git a/file-roller/file-roller.map b/file-roller/file-roller.map new file mode 100644 index 0000000..54e675d --- /dev/null +++ b/file-roller/file-roller.map @@ -0,0 +1,194 @@ +[ArchiveManager] +ArchiveManager={class=frame, app_name=file-roller, label=Archive Manager} +mnuArchive={class=menu, label=Archive} +mnuNew={class=menu_item, label=New} +mnuOpen={class=menu_item, label=Open} +mnuOpenRecent={class=menu, label=Open Recent} +mnuEmpty={class=menu_item, label=Empty} +mnuSaveAs={class=menu_item, label=Save As} +mnuRename={class=menu_item, label=Rename...} +mnuCopy={class=menu_item, label=Copy...} +mnuMove={class=menu_item, label=Move...} +mnuMovetoTrash={class=menu_item, label=Move to Trash} +mnuTestIntegrity={class=menu_item, label=Test Integrity} +mnuProperties={class=menu_item, label=Properties} +mnuClose={class=menu_item, label=Close} +mnuQuit={class=menu_item, label=Quit} +mnuEmpty={class=menu_item, label=Empty} +mnuEdit={class=menu, label=Edit} +mnuAddFiles={class=menu_item, label=Add Files...} +mnuAddaFolder={class=menu_item, label=Add a Folder...} +mnuExtract={class=menu_item, label=Extract...} +mnuCut={class=menu_item, label=Cut} +mnuCopy={class=menu_item, label=Copy} +mnuPaste={class=menu_item, label=Paste} +mnuRename={class=menu_item, label=Rename...} +mnuDelete={class=menu_item, label=Delete} +mnuSelectAll={class=menu_item, label=Select All} +mnuDeselectAll={class=menu_item, label=Deselect All} +mnuOpenFiles={class=menu_item, label=Open Files...} +mnuViewFile={class=menu_item, label=View File} +mnuPassword={class=menu_item, label=Password...} +mnuEmpty={class=menu_item, label=Empty} +mnuView={class=menu, label=View} +mnuToolbar={class=check_menu_item, label=Toolbar} +mnuStatusbar={class=check_menu_item, label=Statusbar} +mnuStop={class=menu_item, label=Stop} +mnuRefresh={class=menu_item, label=Refresh} +mnuViewAllFiles={class=check_menu_item, label=View All Files} +mnuViewasaFolder={class=check_menu_item, label=View as a Folder} +mnuArrangeFiles={class=menu, label=Arrange Files} +mnubyName={class=check_menu_item, label=by Name} +mnubySize={class=check_menu_item, label=by Size} +mnubyType={class=check_menu_item, label=by Type} +mnubyDatemodified={class=check_menu_item, label=by Date modified} +mnubyLocation={class=check_menu_item, label=by Location} +mnuReversedOrder={class=check_menu_item, label=Reversed Order} +mnuEmpty={class=menu_item, label=Empty} +mnuLastOutput={class=menu_item, label=Last Output} +mnuEmpty={class=menu_item, label=Empty} +mnuHelp={class=menu, label=Help} +mnuHelp={class=menu_item, label=Help} +mnuAbout={class=menu_item, label=About} +mnuEmpty={class=menu_item, label=Empty} +btnNew={class=push_button, label=New} +btnOpen={class=push_button, label=Open} +btnAdd={class=push_button, label=Add} +btnExtract={class=push_button, label=Extract} +btnDelete={class=push_button, label=Delete} +btnView={class=push_button, label=View} +btnStop={class=push_button, label=Stop} +btnBack={class=push_button, label=Back} +btngoforward={class=push_button, label=go forward} +btngoup={class=push_button, label=go up} +btnhome={class=push_button, label=home} +tbl0={class=table, instance_index=0, parent=ArchiveManager} + +[dlgOpen] +dlgOpen={class=dialog, label=Open, app_name=file-roller} +txtName={class=text, label_by=Name:} +tbtnBrowseforotherfolders={class=toggle_button, label=Browse for other folders} +tblShortcuts={class=table, label=Shortcuts} +btnAdd={class=push_button, label=Add} +btnRemove={class=push_button, label=Remove} +tbtnHome={class=toggle_button, label=Home} +btnCreateFolder={class=push_button, label=Create Folder} +tblFiles={class=table, label=Files} +mnuAllarchives={class=menu_item, label=All archives} +mnuAllfiles={class=menu_item, label=All files} +btnOpen={class=push_button, label=Open} +btnCancel={class=push_button, label=Cancel} + +[dlgRename] +dlgRename={class=dialog, label=Rename, app_name=file-roller} +txtNewName={class=text, instance_index=0, parent=dlgRename} +btnRename={class=push_button, label=Rename} +btnCancel={class=push_button, label=Cancel} + +[dlgCopy] +dlgCopy={class=dialog, label=Copy, app_name=file-roller} +txtName={class=text, label_by=Name:} +tbtnBrowseforotherfolders={class=toggle_button, label=Browse for other folders} +tblShortcuts={class=table, label=Shortcuts} +btnAdd={class=push_button, label=Add} +btnRemove={class=push_button, label=Remove} +tbtnHome={class=toggle_button, label=Home} +btnCreateFolder={class=push_button, label=Create Folder} +tblFiles={class=table, label=Files} +btnCopy={class=push_button, label=Copy} +btnCancel={class=push_button, label=Cancel} + +[dlgMove] +dlgMove={class=dialog, label=Move, app_name=file-roller} +txtName={class=text, label_by=Name:} +tbtnBrowseforotherfolders={class=toggle_button, label=Browse for other folders} +tblShortcuts={class=table, label=Shortcuts} +btnAdd={class=push_button, label=Add} +btnRemove={class=push_button, label=Remove} +tbtnHome={class=toggle_button, label=Home} +btnCreateFolder={class=push_button, label=Create Folder} +tblFiles={class=table, label=Files} +btnMove={class=push_button, label=Move} +btnCancel={class=push_button, label=Cancel} +btbnHome={class=push_button, label=Home} + +[dlgNew] +dlgNew={class=dialog, label=New, app_name=file-roller} +mnuHome={class=menu_item, label=Home} +mnuDesktop={class=menu_item, label=Desktop} +mnuFilesystem={class=menu_item, label=Filesystem} +mnufloppy={class=menu_item, label=floppy} +mnuDVD={class=menu_item, label=DVD} +mnu13GHardDrive={class=menu_item, label=13G Hard Drive} +mnu21GHardDrive={class=menu_item, label=21G Hard Drive} +mnu21GHardDrive={class=menu_item, label=21G Hard Drive (2)} +txtName={class=text, label_by=Name:} +tbtnBrowseforotherfolders={class=toggle_button, label=Browse for other folders} +tblShortcuts={class=table, label=Shortcuts} +btnAdd={class=push_button, label=Add} +btnRemove={class=push_button, label=Remove} +tbtnHome={class=toggle_button, label=Home} +btnCreateFolder={class=push_button, label=Create Folder} +tblFiles={class=table, label=Files} +mnuAllarchives={class=menu_item, label=All archives} +mnuAllfiles={class=menu_item, label=All files} +mnuAutomatic={class=menu_item, label=Automatic} +mnuAr={class=menu_item, label=Ar (.ar)} +mnuEar={class=menu_item, label=Ear (.ear)} +mnuJar={class=menu_item, label=Jar (.jar)} +mnuTaruncompressed={class=menu_item, label=Tar uncompressed (.tar)} +mnuTarcompressedwithbzip2={class=menu_item, label=Tar compressed with bzip2 (.tar.bz2)} +mnuTarcompressedwithgzip={class=menu_item, label=Tar compressed with gzip (.tar.gz)} +mnuWar={class=menu_item, label=War (.war)} +mnuZip={class=menu_item, label=Zip (.zip)} +btnNew={class=push_button, label=New} +btnCancel={class=push_button, label=Cancel} + +[dlgfile-roller] +dlgfile-roller={class=dialog, label=file-roller.tar.gz Properties, app_name=file-roller} +btnClose={class=push_button, label=Close} + +[dlgAddFiles] +dlgAddFiles={class=dialog, label=Add Files, app_name=file-roller} +txtName={class=text, label_by=Name:} +tbtnBrowseforotherfolders={class=toggle_button, label=Browse for other folders} +tblShortcuts={class=table, label=Shortcuts} +btnAdd={class=push_button, label=Add} +btnRemove={class=push_button, label=Remove} +tbtnHome={class=toggle_button, label=Home} +btnCreateFolder={class=push_button, label=Create Folder} +tblFiles={class=table, label=Files} +chkAddonlyifnewer={class=check_box, label=Add only if newer} +btnAdd={class=push_button, label=Add} +btnCancel={class=push_button, label=Cancel} + +[dlgExtract] +dlgExtract={class=dialog, label=Extract, app_name=file-roller} +btnmnagashree={class=push_button, label=mnagashree} +mnuHome={class=menu_item, label=Home} +mnuDesktop={class=menu_item, label=Desktop} +mnuFilesystem={class=menu_item, label=Filesystem} +mnufloppy={class=menu_item, label=floppy} +mnuDVD={class=menu_item, label=DVD} +mnu13GHardDrive={class=menu_item, label=13G Hard Drive} +mnu21GHardDrive={class=menu_item, label=21G Hard Drive} +mnu21GHardDrive={class=menu_item, label=21G Hard Drive (2)} +mnuOther={class=menu_item, label=Other...} +rdoSelectedfiles={class=radio_button, label=Selected files} +rdoAllfiles={class=radio_button, label=All files} +rdoFiles={class=radio_button, label=Files:} +chkRe-createfolders={class=check_box, label=Re-create folders} +chkOverwriteexistingfiles={class=check_box, label=Overwrite existing files} +chkDonotextractolderfiles={class=check_box, label=Do not extract older files} +chkOpendestinationfolderafterextraction={class=check_box, label=Open destination folder after extraction} +btnExtract={class=push_button, label=Extract} +btnCancel={class=push_button, label=Cancel} +btnHelp={class=push_button, label=Help} + +[dlgDelete] +dlgDelete={class=dialog, label=Delete, app_name=file-roller} +rdoSelectedfiles={class=radio_button, label=Selected files} +rdoAllfiles={class=radio_button, label=All files} +rdoFiles={class=radio_button, label=Files:} +btnOK={class=push_button, label=OK} +btnCancel={class=push_button, label=Cancel} diff --git a/file-roller/fileroller.py b/file-roller/fileroller.py new file mode 100755 index 0000000..0e6a735 --- /dev/null +++ b/file-roller/fileroller.py @@ -0,0 +1,89 @@ +#!/usr/bin/python +# +# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp +# +# Author: +# Nagashree M <mnagashree@novell.com> +# S Vishnu Kumar <vishnukumar.sarvade@gmail.com> +# +# Copyright 2004 Novell, Inc. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the +# Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. +# +# Pre-conditions create a tar named file-roller.tar.gz and save it under HOME directory + +from ldtp import * +from ldtputils import * +import string, sys, os, commands, time, filecmp + +appmap_path = '' + +if len (sys.argv) == 1: + if os.access ('./file-roller.map', os.F_OK | os.R_OK) == 0: + print 'Appmap path missing' + sys.exit(0); + else: + appmap_path = '.' +else: + appmap_path = sys.argv[1] + +initappmap (appmap_path + '/file-roller.map') +launchapp ('file-roller') + +#To add the initial XML info to the log script +log ('File-Roller Suite',"begin") + +#To create a new archive +log ('Create New Archive', 'teststart') +execfile ('create-archive.py') +log ('Create New Archive', 'testend') + +#To open an existing archive and extracing them. +log ('Open Extract Archive ', 'teststart') +execfile ('open-extract.py') +log ('Open Extract Archive', 'testend') + +#To delete a file from the archive. +log ('Delete-file', 'teststart') +execfile ('delete-file.py') +log ('Delete-file', 'testend') + +#To add a file to a archive +log ('Add-file', 'teststart') +execfile ('add-file.py') +log ('Add-file', 'testend') + +#To view file with out extracing +log ('View-file', 'teststart') +execfile ('view-file.py') +log ('View-file', 'testend') + +#To move an archive from one location to other +#log ('Copy-archive', 'teststart') +#execfile ('copy-archive.py') Currently this has bug in file roller +#log ('Copy-file', 'testend') + +#To rename an existing archive +log ('Rename-archive', 'teststart') +execfile ('rename-archive.py') +log ('Rename-archive', 'testend') + +#To move an archive from one location to other +log ('Move-archive', 'teststart') +execfile ('move-archive.py') +log ('Move-archive', 'testend') + +log ('File-rollerSuite','end') diff --git a/file-roller/help.py b/file-roller/help.py new file mode 100644 index 0000000..05b0c54 --- /dev/null +++ b/file-roller/help.py @@ -0,0 +1,39 @@ +# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp +# +# Author: +# Nagashree M <mnagashree@novell.com> +# +# Copyright 2004 Novell, Inc. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the +# Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. +# +# Help Menu + +try: + selectmenuitem ('FileRoller','mnuHelp;mnuAbout') + click ('dlgAboutFileRoller','btnCredits') + #click ('dlgCredits','btnClose') + wait (3) + selecttab ('dlgCredits','ptabWrittenby') + wait (3) + selecttab ('dlgCredits','ptabDocumentedby') + wait (3) + click ('dlgCredits','btnClose') + wait (3) + click ('dlgAboutFileRoller','btnClose') + #selectmenuitem ('FileRoller','mnuHelp;mnuContents') +except error: + log ('Viewing Help topics failed', 'fail') diff --git a/file-roller/move-archive.py b/file-roller/move-archive.py new file mode 100644 index 0000000..b08846d --- /dev/null +++ b/file-roller/move-archive.py @@ -0,0 +1,51 @@ +# +# Author: +# Nagashree M <mnagashree@novell.com> +# +# Copyright 2004 Novell, Inc. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the +# Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. +# + +try: + selectmenuitem ('ArchiveManager', 'mnuArchive;mnuOpen') + time.sleep (5) + selectrow ('dlgOpen', 'tblFiles', 'file-roller.tar.gz') + click ('dlgOpen', 'btnOpen') + setcontext ('Archive Manager', 'file-roller.tar.gz') + selectmenuitem ('ArchiveManager', 'mnuArchive;mnuMove') + selectrow ('dlgMove', 'tblShortcuts', 'Desktop') + doubleclickrow ('dlgMove', 'tblShortcuts', 'Desktop') + click ('dlgMove', 'btnMove') + selectmenuitem ('ArchiveManager', 'mnuArchive;mnuClose') + + #Verification + selectmenuitem ('ArchiveManager', 'mnuArchive;mnuOpen') + time.sleep (5) + selectrow ('dlgOpen', 'tblShortcuts', 'Desktop') + doubleclickrow ('dlgOpen', 'tblShortcuts', 'Desktop') + selectrow ('dlgOpen', 'tblFiles', 'file-roller.tar.gz') + click ('dlgOpen', 'btnOpen') + setcontext ('Archive Manager', 'file-roller.tar.gz') + selectmenuitem ('ArchiveManager', 'mnuArchive;mnuClose') + #selectrow ('dlgMove', 'tblShortcuts', 'Home') + #doubleclickrow ('dlgMove', 'tblShortcuts', 'Home') + #click ('dlgMove', 'btnHome') + #click ('dlgMove', 'btnMove') + #selectmenuitem ('ArchiveManager', 'mnuArchive;mnuClose') + log ('Successfully Moved an archive from one location to another', 'pass') +except error: + log ('Moving an archive to different location failed', 'fail') diff --git a/file-roller/open-extract.py b/file-roller/open-extract.py new file mode 100644 index 0000000..caf1803 --- /dev/null +++ b/file-roller/open-extract.py @@ -0,0 +1,39 @@ +# +# Linux Desktop Testing Project http://www.gnomebangalore.org/ldtp +# +# Author: +# Nagashree M <mnagashree@novell.com> +# S Vishnu Kumar <vishnukumar.sarvade@gmail.com> +# +# Copyright 2004 Novell, Inc. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the +# Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. +# + +try: + selectmenuitem ('ArchiveManager', 'mnuArchive;mnuOpen') + time.sleep (5) + selectrow ('dlgOpen', 'tblFiles', 'file-roller.tar.gz') + click ('dlgOpen', 'btnOpen') + setcontext ('Archive Manager', 'file-roller.tar.gz') + click ('ArchiveManager', 'btnExtract') + #selectrow ('dlgExtract', 'tblFiles', 'Desktop') + click ('dlgExtract', 'btnExtract') + selectmenuitem ('ArchiveManager', 'mnuArchive;mnuClose') + #Verification Not implemented for this + log ('Successfully opened and extracted an existing archive', 'pass') +except error: + log ('Opening an existing archive failed', 'fail') diff --git a/file-roller/rename-archive.py b/file-roller/rename-archive.py new file mode 100644 index 0000000..0b36d49 --- /dev/null +++ b/file-roller/rename-archive.py @@ -0,0 +1,52 @@ +# +# Author: +# Nagashree M <mnagashree@novell.com> +# S Vishnu Kumar <vishnukumar.sarvade@gmail.com> +# +# Copyright 2004 Novell, Inc. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the +# Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. +# + +try: + selectmenuitem ('ArchiveManager', 'mnuArchive;mnuOpen') + time.sleep (5) + selectrow ('dlgOpen', 'tblShortcuts', 'Home') + doubleclickrow ('dlgOpen', 'tblShortcuts', 'Home') + selectrow ('dlgOpen', 'tblFiles', 'file-roller.tar.gz') + click ('dlgOpen', 'btnOpen') + time.sleep (5) + setcontext ('Archive Manager', 'file-roller.tar.gz') + selectmenuitem ('ArchiveManager', 'mnuArchive;mnuRename') + settextvalue ('dlgRename', 'txtNewName', 'test') + click ('dlgRename', 'btnRename') + setcontext ('Archive Manager', 'test.tar.gz') + selectmenuitem ('ArchiveManager', 'mnuArchive;mnuClose') + + #verification + selectmenuitem ('ArchiveManager', 'mnuArchive;mnuOpen') + time.sleep (5) + selectrow ('dlgOpen', 'tblFiles', 'test.tar.gz') + click ('dlgOpen', 'btnOpen') + setcontext ('Archive Manager', 'test.tar.gz') + selectmenuitem ('ArchiveManager', 'mnuArchive;mnuRename') + settextvalue ('dlgRename', 'txtNewName', 'file-roller') + click ('dlgRename', 'btnRename') + setcontext ('Archive Manager', 'file-roller.tar.gz') + selectmenuitem ('ArchiveManager', 'mnuArchive;mnuClose') + log ('Successfully renamed an existing archive', 'pass') +except error: + log ('Copying an archive to different location failed', 'fail') diff --git a/file-roller/view-file.py b/file-roller/view-file.py new file mode 100644 index 0000000..e97cd55 --- /dev/null +++ b/file-roller/view-file.py @@ -0,0 +1,37 @@ +# +# Author: +# Nagashree M <mnagashree@novell.com> +# S Vishnu Kumar <vishnukumar.sarvade@gmail.com> +# +# Copyright 2004 Novell, Inc. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to the +# Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. +# + +try: + selectmenuitem ('ArchiveManager', 'mnuArchive;mnuOpen') + time.sleep (5) + selectrow ('dlgOpen', 'tblFiles', 'file-roller.tar.gz') + click ('dlgOpen', 'btnOpen') + setcontext ('Archive Manager', 'file-roller.tar.gz') + selectrowindex ('ArchiveManager', 'tbl0', 3) + click ('ArchiveManager', 'btnView') + time.sleep (15) + selectmenuitem ('ArchiveManager', 'mnuArchive;mnuClose') + log ('Successfully viewed the file in an archive without extracting it', 'pass') + #As of now the application being launched to view file is not closed. +except error: + log ('Viewing a file with out extracing an archive failed', 'fail') |