Test_SNF_ECMS_11_ManageCategory_ecmdemo
echo -- Log in
open /portal/public/acme/
windowMaximize
waitForElementPresent link=Login
click link=Login
waitForElementPresent username
type username root
type password gtn
clickAndWait link=Sign in
echo -- Create new category
waitForElementPresent link=Newsletter Manager
click link=Newsletter Manager
waitForElementPresent link=New Category
click link=New Category
waitForElementPresent CategoryName
type CategoryName NewCategory
type CategoryTitle NewCategory
waitForElementPresent //img[@alt='Select user']
click //img[@alt='Select user']
waitForElementPresent //table[@id='UIListUsers']/tbody/tr[5]/td[5]/div//img
click //table[@id='UIListUsers']/tbody/tr[5]/td[5]/div//img
waitForElementPresent link=Save
click link=Save
pause 5000
echo -- Edit category
waitForElementPresent link=NewCategory
click link=NewCategory
waitForElementPresent UISubscriptionsCheckAll
click UISubscriptionsCheckAll
waitForElementPresent //div[@id='UISubscriptions']/div/div[3]/div/div[1]/div[3]/table/tbody/tr/td/div/div/div/div/div/div
click //div[@id='UISubscriptions']/div/div[3]/div/div[1]/div[3]/table/tbody/tr/td/div/div/div/div/div/div
waitForElementPresent link=Edit Category
click link=Edit Category
pause 5000
waitForElementPresent CategoryDescription
type CategoryDescription aaa
waitForElementPresent link=Save
click link=Save
pause 5000
echo -- Delete Category
waitForElementPresent //div[@id='UISubscriptions']/div/div[3]/div/div[1]/div[3]/table/tbody/tr/td/div/div/div/div
click //div[@id='UISubscriptions']/div/div[3]/div/div[1]/div[3]/table/tbody/tr/td/div/div/div/div
waitForElementPresent //div[@id='UISubscriptions']/div/div[3]/div/div[1]/div[3]/table/tbody/tr/td/div/div/div/div/div/div/a
click //div[@id='UISubscriptions']/div/div[3]/div/div[1]/div[3]/table/tbody/tr/td/div/div/div/div/div/div/a
waitForElementPresent link=Delete Category
click link=Delete Category
assertConfirmation Are you sure you want to delete this category ?
waitForTextNotPresent NewCategory
verifyTextNotPresent NewCategory
echo -- Log out
waitForElementPresent link=Logout
clickAndWait link=Logout