Test_SNF_KS_45_ksdemo_UserManagement
open /ksdemo/public/classic/
windowMaximize
waitForElementPresent link=Sign in
click link=Sign in
waitForElementPresent username
type username root
type password gtn
clickAndWait //a[@id='UIPortalLoginFormAction']
open /ksdemo/private/classic/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
echo -Add Topic-
clickAndWait link=Sign out
waitForTextPresent Sign in
open /ksdemo/public/classic/
waitForElementPresent link=Sign in
click link=Sign in
waitForElementPresent username
type username demo
type password gtn
clickAndWait //a[@id='UIPortalLoginFormAction']
open /ksdemo/private/classic/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=Sign out
waitForTextPresent Sign in
open /ksdemo/public/classic/
waitForElementPresent link=Sign in
click link=Sign in
waitForElementPresent username
type username root
type password gtn
clickAndWait //a[@id='UIPortalLoginFormAction']
open /ksdemo/private/classic/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 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
echo -Login by banned Demo to check-
clickAndWait link=Sign out
waitForTextPresent Sign in
open /ksdemo/public/classic/
waitForElementPresent link=Sign in
click link=Sign in
waitForElementPresent username
type username demo
type password gtn
clickAndWait //a[@id='UIPortalLoginFormAction']
open /ksdemo/private/classic/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
echo - Login by root to unban demo and verify changes value-
clickAndWait link=Sign out
waitForTextPresent Sign in
open /ksdemo/public/classic/
waitForElementPresent link=Sign in
click link=Sign in
waitForElementPresent username
type username root
type password gtn
clickAndWait //a[@id='UIPortalLoginFormAction']
open /ksdemo/private/classic/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
echo -Login demo to check unban or not-
clickAndWait link=Sign out
waitForTextPresent Sign in
open /ksdemo/public/classic/
waitForElementPresent link=Sign in
click link=Sign in
waitForElementPresent username
type username demo
type password gtn
clickAndWait //a[@id='UIPortalLoginFormAction']
open /ksdemo/private/classic/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=Sign out
waitForTextPresent Sign in
echo -Delete Test Data-
open /ksdemo/public/classic/
waitForElementPresent link=Sign in
click link=Sign in
waitForElementPresent username
type username root
type password gtn
clickAndWait //a[@id='UIPortalLoginFormAction']
open /ksdemo/private/classic/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']
clickAndWait link=Sign out
waitForTextPresent Sign in