Adding FilesΒΆ
*** Settings ***
Resource plone/app/robotframework/server.robot
Resource plone/app/robotframework/keywords.robot
Resource Selenium2Screenshots/keywords.robot
Library OperatingSystem
Suite Setup Run keywords Suite Setup Test Setup
Suite Teardown Run keywords Test teardown Suite Teardown
*** Variables ***
${FIXTURE} plone.app.robotframework.PLONE_ROBOT_TESTING
@{DIMENSIONS} 1024 768
@{APPLY_PROFILES} plone.app.contenttypes:plone-content
*** Keywords ***
Suite Setup
Run keyword if not sys.argv[0].startswith('bin/robot')
... Setup Plone site ${FIXTURE}
Run keyword if sys.argv[0].startswith('bin/robot')
... Open test browser
Run keyword and ignore error Set window size @{DIMENSIONS}
Test Setup
Import library Remote ${PLONE_URL}/RobotRemote
Run keyword if sys.argv[0].startswith('bin/robot')
... Remote ZODB SetUp ${FIXTURE}
${language} = Get environment variable LANGUAGE 'en'
Set default language ${language}
Enable autologin as Manager
${user_id} = Translate user_id
... default=jane-doe
${user_fullname} = Translate user_fullname
... default=Jane Doe
Create user ${user_id} Member fullname=${user_fullname}
Set autologin username ${user_id}
Test Teardown
Run keyword if sys.argv[0].startswith('bin/robot')
... Remote ZODB TearDown ${FIXTURE}
Suite Teardown
Run keyword if not sys.argv[0].startswith('bin/robot')
... Teardown Plone Site
Run keyword if sys.argv[0].startswith('bin/robot')
... Close all browsers
Files of various types can be uploaded to Plone web sites.
Choose file in the Add new... menu for a folder to upload a file:
Select File from the drop-down menu, and you’ll see the Add File panel:
Click the Browse button to navigate to the file you want to upload from your local computer. Provide a title (you can use the same file name used on your local computer if you want). Provide a description if you want. When you click the save button the file will be uploaded to the folder.
Example file types include PDF files, Word documents, database files, zip files... – well, practically anything. Files on a Plone web site are treated as just files and will show up in contents lists for folders, but there won’t be any special display of them. They will appear by name in lists and will be available for download if clicked.
There are specialized add-on tools for Plone web sites that search the content of files, or can provide a preview of for instance PDF or Office files. If you are interested in this functionality, ask your Plone web site administrator.