Test_SNF_ECMS_45_AddLanguageForDocument_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 Sites Explorer
waitForElementPresent //a[@href='/ecmdemo/groups/:platform:web-contributors/siteExplorer']
clickAndWait //a[@href='/ecmdemo/groups/:platform:web-contributors/siteExplorer']
echo --Open  driver pane
waitForElementPresent //div[@title='Show Drives']
click //div[@title='Show Drives']
echo --Open Sites Management driver
waitForElementPresent link=Public
click link=Public
pause 1000
echo --Create a Article document
waitForElementPresent link=Actions
click link=Actions
waitForElementPresent link=Add Document
click link=Add Document
waitForElementPresent link=Article
click link=Article
waitForElementPresent title
type title Test_SNF_ECMS_45
type name Test_SNF_ECMS_45
waitForElementPresent //td[@id='cke_contents_summary']/iframe
selectFrame //td[@id='cke_contents_summary']/iframe
type //html/body Test_SNF_ECMS_45
selectFrame relative=top
selectFrame //td[@id='cke_contents_content']/iframe
type //html/body Test_SNF_ECMS_45
selectFrame relative=top
waitForElementPresent link=Save & Close
click link=Save & Close
pause 1000
echo -- Go to Collaboration Tab
waitForElementPresent link=Collaboration
click link=Collaboration
echo --Open form to add language
pause 3000
waitForElementPresent //a[text()='Add/Edit localised contents']
click //a[text()='Add/Edit localised contents']
echo --Go to Add language Tab
waitForElementPresent //div[text()='Add language']
click //div[text()='Add language']
select typeLang label=Vietnamese
click //option[@value='vi']
waitForElementPresent title
type title vietnam
waitForElementPresent //td[@id='cke_contents_summary']/iframe
selectFrame //td[@id='cke_contents_summary']/iframe
typeKeys //html/body vietnam
selectFrame relative=top
selectFrame //td[@id='cke_contents_content']/iframe
typeKeys //html/body vietnam
selectFrame relative=top
waitForElementPresent link=Save
click link=Save
pause 3000
echo --Go to View language Tab
waitForElementPresent //div[text()='View language']
click //div[text()='View language']
waitForElementPresent languages label=Vietnamese
select languages label=Vietnamese
waitForElementPresent link=View
click link=View
pause 1000
echo -- Back to default language
waitForElementPresent //a[text()='Add/Edit localised contents']
click //a[text()='Add/Edit localised contents']
pause 10000
waitForElementPresent languages
select languages label=English(default)
waitForElementPresent link=View
click link=View
echo --Delete article
waitForElementPresent link=Test_SNF_ECMS_45
mouseDownRight link=Test_SNF_ECMS_45
waitForElementPresent link=Delete
click link=Delete
waitForElementPresent //div[@id='UIPopupWindow']//a[text()="OK"]
click //div[@id='UIPopupWindow']//a[text()="OK"]
pause 1000
waitForTextNotPresent link=Test_SNF_ECMS_45
verifyTextNotPresent link=Test_SNF_ECMS_45
echo --Logout
waitForElementPresent link=Sign out
clickAndWait link=Sign out