Test_SNF_KS_58_ksdemo_CreatePageWithRichTextEditor
echo - Sign in
open /ksdemo/public/classic/
windowMaximize
waitForElementPresent link=Sign in
click link=Sign in
waitForElementPresent username
type username root
waitForElementPresent password
type password gtn
clickAndWait //a[@id='UIPortalLoginFormAction']
open /ksdemo/private/classic/wiki
echo - Create Page using Rich Text Editor
waitForElementPresent link=Blank Page
click link=Blank Page
waitForElementPresent TitleInput
type TitleInput Page1_SNF_KS_58
waitForElementPresent Markup
waitForElementPresent link=Rich Text
click link=Rich Text
echo -- Insert Hyperlink
waitForElementPresent //td[@id='gwt-uid-16']//div[text()='Link']
click //td[@id='gwt-uid-16']//div[text()='Link']
echo -- Web page
waitForElementPresent //td[@id='gwt-uid-10']/div[text()='Web Page...']
click //td[@id='gwt-uid-10']/div[text()='Web Page...']
echo -- Type  Web page address
waitForElementPresent //input[@title='Web page address']
type //input[@title='Web page address'] http://google.com
echo -- Type  label
waitForElementPresent //input[@title='Type the label of the created link.']
type //input[@title='Type the label of the created link.'] Google
echo -- Type  Tooltip
waitForElementPresent //input[@title='Type the tooltip of the created link, which appears when mouse is over the link.']
type //input[@title='Type the tooltip of the created link, which appears when mouse is over the link.'] Google Google
echo -- Press Create Link button
waitForElementPresent //button[text()='Create Link']
click //button[text()='Create Link']
echo -- Press Save button
waitForElementPresent //div[@id='UISubmitToolBar']//a[@title='Save']
clickAt //div[@id='UISubmitToolBar']//a[@title='Save']
waitForElementPresent link=Page1_SNF_KS_58
verifyElementPresent link=Page1_SNF_KS_58
echo -- Insert table
waitForElementPresent link=Edit
click link=Edit
waitForElementPresent link=Rich Text
click link=Rich Text
waitForElementPresent //td[@id='gwt-uid-9']/div
click //td[@id='gwt-uid-9']/div
waitForElementPresent //td[@id='gwt-uid-1']/div
click //td[@id='gwt-uid-1']/div
waitForElementPresent //div/div[2]/div/div[1]/input
type //div/div[2]/div/div[1]/input 4
waitForElementPresent //div[2]/div/div[2]/input 3
type //div[2]/div/div[2]/input 3
uncheck gwt-uid-29
waitForElementPresent //button[text()='Insert Table']
click //button[text()='Insert Table']
waitForElementPresent //body[@id='body']/table//tr[3]/td[3]
verifyElementPresent //body[@id='body']/table//tr[3]/td[3]
clickAt //body[@id='body']/table/tbody/tr[4]/td[3]
typeKeys //body[@id='body']/table/tbody/tr[4]/td[3] TopLeft
clickAt link=Save
waitForElementPresent link=Page1_SNF_KS_58
echo -- Insert macro
waitForElementPresent link=Edit
click link=Edit
waitForElementPresent link=Rich Text
click link=Rich Text
waitForElementPresent //td[@id='gwt-uid-26']//div[text()='Macro']
click //td[@id='gwt-uid-26']//div[text()='Macro']
waitForElementPresent //td[@id='gwt-uid-25']//div[text()='Insert Macro...']
click //td[@id='gwt-uid-25']//div[text()='Insert Macro...']
waitForElementPresent //select[@title='Select a macro category']
clickAt //select[@title='Select a macro category'] 1,1
select //select[@title='Select a macro category'] label=Formatting
waitForElementPresent //div[text()='Div']
click //div[text()='Div']
waitForElementPresent //button[text()='Select']
click //button[text()='Select']
waitForElementPresent pd-content-input
type pd-content-input Gunless but still dangerous!
waitForElementPresent //button[text()='Insert Macro']
click //button[text()='Insert Macro']
waitForElementPresent link=Save
clickAt link=Save
waitForElementPresent link=Page1_SNF_KS_58
echo - Verify the Rich Text content
waitForTextPresent Gunless but still dangerous!
verifyTextPresent Gunless but still dangerous!
waitForElementPresent //div[@id='UIWikiPageContentArea']//td[text()='TopLeft'] TopLeft
verifyElementPresent //div[@id='UIWikiPageContentArea']//td[text()='TopLeft'] TopLeft
waitForElementPresent link=Google
verifyElementPresent link=Google
echo - Clean test data
open /ksdemo/private/classic/wiki/WikiHome
waitForElementPresent link=Page1_SNF_KS_58
click link=Page1_SNF_KS_58
mouseOver //div[@id='UIWikiPageControlArea_PageToolBar_More_']
waitForElementPresent link=Delete Page
click link=Delete Page
waitForElementPresent //div[@id='UIWikiPageArea']//a[text()='OK']
clickAndWait //div[@id='UIWikiPageArea']//a[text()='OK']
waitForTextNotPresent Page1_SNF_KS_58
verifyTextNotPresent Page1_SNF_KS_58
echo - Sign out
clickAndWait link=Sign out
waitForTextPresent Sign in