Test_SNF_KS_45_ksdemo_UserManagement
open /portal/public/intranet/
windowMaximize
waitForElementPresent //div[contains(text(),'Sign in')]
click //div[contains(text(),'Sign in')]
waitForElementPresent username
type username root
waitForElementPresent password
type password gtn
clickAndWait //a[@id='UIPortalLoginFormAction']
open /portal/private/intranet/forum
echo -Add Category for Test-
waitForElementPresent link=Add Category
click link=Add Category
waitForElementPresent CategoryTitle
type CategoryTitle Cate1_SNF_KS_45
type Description Category 1
click link=Save
waitForTextPresent Cate1_SNF_KS_45
verifyTextPresent Cate1_SNF_KS_45
echo -Add Forum-
waitForElementPresent //a[contains(text(),'Add Forum')]
click //a[contains(text(),'Add Forum')]
waitForElementPresent ForumTitle
type ForumTitle For1_SNF_KS_45
type Description prepare forum data
waitForElementPresent //form[@id='UIForumForm']//a[text()='Save']
click //form[@id='UIForumForm']//a[text()='Save']
waitForElementPresent link=Cate1_SNF_KS_45
click link=Cate1_SNF_KS_45
waitForTextPresent For1_SNF_KS_45
verifyTextPresent For1_SNF_KS_45
clickAndWait link=Logout
echo -Add Topic-
waitForElementPresent //div[contains(text(),'Sign in')]
click //div[contains(text(),'Sign in')]
waitForElementPresent username
type username demo
waitForElementPresent password
type password gtn
clickAndWait //a[@id='UIPortalLoginFormAction']
open /portal/private/intranet/forum
waitForElementPresent link=For1_SNF_KS_45
click link=For1_SNF_KS_45
waitForElementPresent //a[contains(text(),'Start Topic')]
click //a[contains(text(),'Start Topic')]
waitForElementPresent ThreadTitle
type ThreadTitle Demo Topic
waitForElementPresent //iframe[@id='messageContent___Frame']
selectFrame //iframe[@id='messageContent___Frame']
selectFrame //html/body/table/tbody/tr[2]/td/iframe
type //html/body Test
selectFrame relative=top
waitForElementPresent link=Submit
click link=Submit
waitForTextPresent Demo Topic
verifyTextPresent Demo Topic
echo -Add post-
click link=Demo Topic
waitForElementPresent Message
type Message Demo Post
click link=Quick Reply
waitForTextPresent Demo Post
verifyTextPresent Demo Post
echo - Login by root to manage-
clickAndWait link=Logout
waitForElementPresent //div[contains(text(),'Sign in')]
click //div[contains(text(),'Sign in')]
waitForElementPresent username
type username root
waitForElementPresent password
type password gtn
clickAndWait //a[@id='UIPortalLoginFormAction']
open /portal/private/intranet/forum
waitForElementPresent //div[@id='ManageModerator']//a[contains(text(),'Users')]
click //div[@id='ManageModerator']//a[contains(text(),'Users')]
waitForTextPresent Username
verifyTextPresent demo
verifyTextPresent john
verifyTextPresent mary
verifyTextPresent root
waitForElementPresent //td[text()='demo']/following-sibling::td//div[@title='Edit Profile']
click //td[text()='demo']/following-sibling::td//div[@title='Edit Profile']
waitForElementPresent ScreenName
type ScreenName demoscreen
type ForumUserTitle demotitle
type Signature demo signature
click IsDisplaySignature
waitForElementPresent //form[@id='UIModeratorManagementForm']//div[text()='Settings']
click //form[@id='UIModeratorManagementForm']//div[text()='Settings']
waitForElementPresent Timeformat
select Timeformat label=24-hour
select MaximumThreads label=5
select MaximumPosts label=5
waitForElementPresent //form[@id='UIModeratorManagementForm']//div[text()='Ban User']
click //form[@id='UIModeratorManagementForm']//div[text()='Ban User']
waitForElementPresent IsBanned
click IsBanned
waitForElementPresent //form[@id='UIModeratorManagementForm']//div[text()='Topics']
click //form[@id='UIModeratorManagementForm']//div[text()='Topics']
waitForElementPresent //div[@id='UIPageListTopicByUser']//a[text()='Demo Topic']
verifyElementPresent //div[@id='UIPageListTopicByUser']//a[text()='Demo Topic'] Demo Topic
waitForElementPresent //form[@id='UIModeratorManagementForm']//div[text()='Posts']
click //form[@id='UIModeratorManagementForm']//div[text()='Posts']
waitForElementPresent //div[@id='UIPageListPostByUser']//a[@title='Demo Post']
verifyElementPresent //div[@id='UIPageListPostByUser']//a[@title='Demo Post'] Re: Demo Topic
waitForElementPresent link=Save
click link=Save
waitForElementPresent link=Close
click link=Close
clickAndWait link=Logout
echo -Login by banned Demo to check-
waitForElementPresent //div[contains(text(),'Sign in')]
click //div[contains(text(),'Sign in')]
waitForElementPresent username
type username demo
waitForElementPresent password
type password gtn
clickAndWait //a[@id='UIPortalLoginFormAction']
open /portal/private/intranet/forum
waitForElementPresent link=For1_SNF_KS_45
click link=For1_SNF_KS_45
waitForElementPresent //form[@id='UITopicContainer']//div[text()='Start Topic']
verifyElementPresent //form[@id='UITopicContainer']//div[text()='Start Topic']
waitForElementPresent link=Demo Topic
click link=Demo Topic
waitForElementNotPresent Message
verifyElementNotPresent Message
verifyTextPresent demo signature
verifyTextPresent demotitle
verifyTextPresent demoscreen
clickAndWait link=Logout
echo - Login by root to unban demo and verify changes value-
waitForElementPresent //div[contains(text(),'Sign in')]
click //div[contains(text(),'Sign in')]
waitForElementPresent username
type username root
waitForElementPresent password
type password gtn
clickAndWait //a[@id='UIPortalLoginFormAction']
open /portal/private/intranet/forum
waitForElementPresent link=Users
click link=Users
waitForTextPresent Username
verifyTextPresent demo
verifyTextPresent john
verifyTextPresent mary
verifyTextPresent root
waitForElementPresent //td[text()='demo']/following-sibling::td//div[@title='Edit Profile']
click //td[text()='demo']/following-sibling::td//div[@title='Edit Profile']
waitForElementPresent ForumUserTitle
verifyElementPresent ForumUserTitle demotitle
verifyElementPresent Signature demo signature
waitForElementPresent //form[@id='UIModeratorManagementForm']//div[text()='Settings']
click //form[@id='UIModeratorManagementForm']//div[text()='Settings']
waitForElementPresent Timeformat
verifyElementPresent Timeformat label=24-hour
verifyElementPresent MaximumThreads label=5
verifyElementPresent MaximumPosts label=5
waitForElementPresent //form[@id='UIModeratorManagementForm']//div[text()='Ban User']
click //form[@id='UIModeratorManagementForm']//div[text()='Ban User']
waitForElementPresent IsBanned
echo -Unban demo-
waitForElementPresent IsBanned
click IsBanned
waitForElementPresent link=Save
click link=Save
waitForElementPresent link=Close
click link=Close
clickAndWait link=Logout
echo -Login demo to check unban or not-
waitForElementPresent //div[contains(text(),'Sign in')]
click //div[contains(text(),'Sign in')]
waitForElementPresent username
type username demo
waitForElementPresent password
type password gtn
clickAndWait //a[@id='UIPortalLoginFormAction']
open /portal/private/intranet/forum
waitForElementPresent UIForumActionBar
waitForElementPresent link=For1_SNF_KS_45
click link=For1_SNF_KS_45
waitForElementPresent link=Demo Topic
click link=Demo Topic
verifyElementPresent Message
verifyTextPresent demo signature
verifyTextPresent demoscreen
verifyTextPresent demotitle
clickAndWait link=Logout
waitForElementPresent //div[contains(text(),'Sign in')]
click //div[contains(text(),'Sign in')]
waitForElementPresent username
type username root
waitForElementPresent password
type password gtn
clickAndWait //a[@id='UIPortalLoginFormAction']
open /portal/private/intranet/forum
waitForElementPresent link=Cate1_SNF_KS_45
click link=Cate1_SNF_KS_45
waitForElementPresent link=Manage Category
click link=Manage Category
waitForElementPresent link=Delete
click link=Delete
assertConfirmation Are you sure to delete this category?
waitForTextNotPresent Cate1_SNF_KS_45
verifyTextNotPresent Cate1_SNF_KS_45
echo -Reset display signature-
waitForElementPresent link=Users
click link=Users
waitForElementPresent //td[text()='demo']/following-sibling::td//div[@title='Edit Profile']
click //td[text()='demo']/following-sibling::td//div[@title='Edit Profile']
waitForElementPresent ForumUserTitle
type ForumUserTitle
type ScreenName
type Signature
click IsDisplaySignature
waitForElementPresent //form[@id='UIModeratorManagementForm']//div[text()='Settings']
click //form[@id='UIModeratorManagementForm']//div[text()='Settings']
waitForElementPresent Timeformat
select Timeformat label=24-hour
select MaximumThreads label=10
select MaximumPosts label=10
waitForElementPresent link=Save
click link=Save
waitForElementPresent //form[@id='UIModeratorManagementForm']//a[text()='Close']
click //form[@id='UIModeratorManagementForm']//a[text()='Close']
waitForElementPresent link=Logout
clickAndWait link=Logout
waitForTextPresent Sign in