Test_SNF_ECMS_56_ViewMetadata_ecmdemo
open /ecmdemo/public/acme/
windowMaximize
echo -- Login ---
click link=Login
waitForElementPresent username
type username root
type password gtn
clickAndWait link=Sign in
echo --Go to site Explorer
clickAndWait //a[@href='/ecmdemo/private/acme/siteExplorer']
echo --Open  driver pane
waitForElementPresent //div[@title='Show Drives']
click //div[@title='Show Drives']
echo --Open Private driver
waitForElementPresent link=Private
click link=Private
echo --  Select Admin View
waitForElementPresent //a[@title='Admin View']
click //a[@title='Admin View']
echo -- Go to Action tab
pause 10000
waitForElementPresent link=Actions
click link=Actions
pause 10000
echo --Add File
waitForElementPresent link=Add Document
click link=Add Document
pause 10000
echo --Add File
waitForElementPresent selectTemplate label=File
select selectTemplate label=File
pause 10000
waitForElementPresent name
type name File_56
waitForElementPresent //td[@id='cke_contents_contentHtml']/iframe
selectFrame //td[@id='cke_contents_contentHtml']/iframe
type //html/body chi mong duoc nam tay chi di trong troi dong ha noi
selectFrame relative=top
echo --Save as Draft
waitForElementPresent link=Save as Draft
click link=Save as Draft
pause 3000
echo --Close the form
waitForElementPresent link=Close
click link=Close
echo -- Open form to view metadata
waitForElementPresent link=File_56
click link=File_56
pause 10000
echo -- Info tab
waitForElementPresent link=Info
click link=Info
waitForElementPresent link=View Metadatas
click link=View Metadatas
echo -- Add metadata
waitForElementPresent link=Add/Edit
click link=Add/Edit
waitForElementPresent title0
type title0 Anh nho em tieuhuongduong
type creator0 linhkhue
type subject0 Nhin em giay phut muon noi yeu em
type source0 Gap anh la duyen phan cua em do. em co biet khong
type contributor0 Yeu sa mac nen long hay mong mo
type resourceType0 dem thau chi nhin khoi thuoc bay ve noi hu vo
type publisher0 Hoa huong duong se heo ua khi dem ve`
type description0 Benh nagn roi
type rights0 Den voi anh di em
type relation0 Roi mai day anh se lam gi voi noi nho cua minh
type format0 Mot chut thoi nhe
type identifier0 EM GHET CHI LAM. GHET NHIEU LAM
type coverage0 Xa ngan dam nhung anh van o day cho em
type language0 laos
echo -- Save
waitForElementPresent //form[@id='UIViewMetadataForm']/div[2]/div/table/tbody/tr/td/div[1]/div/div/div
click //form[@id='UIViewMetadataForm']/div[2]/div/table/tbody/tr/td/div[1]/div/div/div
waitForElementPresent link=Cancel
click link=Cancel
echo -- Referesh
waitForElementPresent //form[@id='UIAddressBar']/div[2]/table/tbody/tr/td[3]/a[2]
click //form[@id='UIAddressBar']/div[2]/table/tbody/tr/td[3]/a[2]
echo -- OK
waitForElementPresent //div[3]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div
click //div[3]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div
pause 10000
echo -- Delete document
waitForElementPresent //a[contains(text(),'Anh nho em tieuhuongduong')]
mouseDownRight //a[contains(text(),'Anh nho em tieuhuongduong')]
waitForElementPresent link=Delete
click link=Delete
waitForElementPresent //div[@id='UIPopupWindow']/div/div[2]/div/div/div/div/div/div/div/div[2]/table/tbody/tr/td/div[1]/div/div/div/a
click //div[@id='UIPopupWindow']/div/div[2]/div/div/div/div/div/div/div/div[2]/table/tbody/tr/td/div[1]/div/div/div/a
pause 10000
echo --Logout
waitForElementPresent link=Sign out
clickAndWait link=Sign out