Test_SNF_KS_19_ksdemo_ViewUserProfile
open /ksdemo/public/classic/
windowMaximize
waitForElementPresent link=Sign in
click link=Sign in
waitForElementPresent username
type username root
type password gtn
echo -Login by Root
clickAndWait //div[@id='UIPortalLoginFormAction']//a[text()="Sign in"]
echo -Edit Category allowing to view user profile-
open /ksdemo/private/classic/answers
echo -Category
waitForElementPresent link=Category
click link=Category
echo -Edit
waitForElementPresent //div[@id='FAQCategroManager']//a[text()="Edit"]
mouseDown //div[@id='FAQCategroManager']//a[text()="Edit"]
echo -View Author Infor
waitForElementPresent ViewAuthorInfor
check ViewAuthorInfor
waitForElementPresent link=Save
click link=Save
echo -Add question which contains profile to view-
waitForElementPresent link=Submit question
click link=Submit question
waitForElementPresent QuestionTitle
type QuestionTitle Question for View Profile
waitForElementPresent //iframe[@id='Question___Frame']
selectFrame //iframe[@id='Question___Frame']
waitForElementPresent //html/body/table/tbody/tr[2]/td/iframe
selectFrame //html/body/table/tbody/tr[2]/td/iframe
type //html/body View User Profile
selectFrame relative=top
type EmailAddress root@localhost.vn
echo -Save
waitForElementPresent link=Save
mouseDown link=Save
waitForTextPresent The question has been posted.
verifyTextPresent The question has been posted.
echo -OK
waitForElementPresent //div[@id='UIAnswersPortlet']//a[text()='OK']
click //div[@id='UIAnswersPortlet']//a[text()='OK']
echo -View user profile-
waitForElementPresent link=Question for View Profile
click link=Question for View Profile
echo -View Profile
waitForElementPresent //a[@title="View profile"]
click //a[@title="View profile"]
echo - User Name
waitForTextPresent User Name: root
verifyTextPresent User Name: root
echo - First Name
waitForTextPresent First Name: Root
verifyTextPresent First Name: Root
echo - Last Name
waitForTextPresent Last Name: Root
verifyTextPresent Last Name: Root
echo - Email
waitForTextPresent Email: root@localhost
verifyTextPresent Email: root@localhost
echo - Close
waitForElementPresent //form[@id='UIViewUserProfile']//a[text()="Close"]
click //form[@id='UIViewUserProfile']//a[text()="Close"]
echo -Delete Test Data-
waitForElementPresent //a[@title="Delete"]
click //a[@title="Delete"]
echo -Display message to comfirm
waitForTextPresent Do you really want to delete this question and its answers ?
verifyTextPresent Do you really want to delete this question and its answers ?
echo -OK
waitForElementPresent //form[@id='UIDeleteQuestion']//a[text()="OK"]
click //form[@id='UIDeleteQuestion']//a[text()="OK"]
waitForTextNotPresent Question for View Profile
verifyTextNotPresent Question for View Profile
echo -Category
waitForElementPresent link=Category
click link=Category
echo -Edit
waitForElementPresent //div[@id='FAQCategroManager']//a[text()="Edit"]
mouseDown //div[@id='FAQCategroManager']//a[text()="Edit"]
echo - Uncheck View Author Infor
waitForElementPresent ViewAuthorInfor
uncheck ViewAuthorInfor
echo -Save
waitForElementPresent //form[@id='UICategoryForm']//a[text()="Save"]
click //form[@id='UICategoryForm']//a[text()="Save"]
echo -sign out
waitForElementPresent link=Sign out
clickAndWait link=Sign out