Test_REG_DMS_CCP331_ecmdemo_DeleteTaxonomyinSE
open /ecmdemo/public/acme
windowMaximize
echo -- Login
click link=Login
waitForElementPresent username
type username root
type password gtn
click link=Sign in
echo --  Go to Site Administration
clickAndWait link=Administration
echo -- Create new taxonomy tree
waitForElementPresent link=Add Taxonomy Tree
click link=Add Taxonomy Tree
waitForElementPresent TaxoTreeName
type TaxoTreeName Test
echo -- Select ws
waitForElementPresent TaxoTreeWorkspace
select TaxoTreeWorkspace label=collaboration
echo -- Select home path
waitForElementPresent //img[@title='Add Path']
click //img[@title='Add Path']
waitForElementPresent //div[@id='UIOneNodePathSelector']/div/div[3]/div/div/div/div/div/div[9]/a/div
click //div[@id='UIOneNodePathSelector']/div/div[3]/div/div/div/div/div/div[9]/a/div
waitForElementPresent //div[@id='UIOneNodePathSelector']/div/div[3]/div/div/div/div/div/div[2]/a/div
click //div[@id='UIOneNodePathSelector']/div/div[3]/div/div/div/div/div/div[2]/a/div
waitForElementPresent //div[@id='UIOneNodePathSelector']/div/div[3]/div/div/div/div/div/div[4]/a/div
click //div[@id='UIOneNodePathSelector']/div/div[3]/div/div/div/div/div/div[4]/a/div
waitForElementPresent //div[@id='UISelectPathPanel']/table/tbody/tr[7]/td[2]/a/div
click //div[@id='UISelectPathPanel']/table/tbody/tr[7]/td[2]/a/div
waitForElementPresent link=Next
click link=Next
echo -- Select permission
waitForElementPresent //img[@title='Select everyone']
click //img[@title='Select everyone']
waitForElementPresent add_node
click add_node
waitForElementPresent set_property
click set_property
waitForElementPresent remove
click remove
waitForElementPresent link=Save
click link=Save
waitForElementPresent //form[@id='UIPermissionTreeForm']/div[2]/div/div/table/tbody/tr/td/div[4]/div/div/div/a
click //form[@id='UIPermissionTreeForm']/div[2]/div/div/table/tbody/tr/td/div[4]/div/div/div/a
echo -- Add action
waitForElementPresent actionName
type actionName action
waitForElementPresent lifecycle
addSelection lifecycle label=User Action
waitForElementPresent //option[@value='read']
click //option[@value='read']
waitForElementPresent targetWorkspace
select targetWorkspace label=collaboration
waitForElementPresent //form[@id='UIActionForm']/div[2]/table/tbody/tr[7]/td[2]/select/option[2]
click //form[@id='UIActionForm']/div[2]/table/tbody/tr[7]/td[2]/select/option[2]
waitForElementPresent //form[@id='UIActionForm']/div[2]/table/tbody/tr[8]/td[2]/table/tbody/tr/td[2]/a[1]
click //form[@id='UIActionForm']/div[2]/table/tbody/tr[8]/td[2]/table/tbody/tr/td[2]/a[1]
waitForElementPresent //div[@id='UIOneNodePathSelector']/div/div[3]/div/div/div/div/div/div[9]/a/div
click //div[@id='UIOneNodePathSelector']/div/div[3]/div/div/div/div/div/div[9]/a/div
waitForElementPresent //div[@id='UIOneNodePathSelector']/div/div[3]/div/div/div/div/div/div[2]/a/div
click //div[@id='UIOneNodePathSelector']/div/div[3]/div/div/div/div/div/div[2]/a/div
waitForElementPresent //div[@id='UIOneNodePathSelector']/div/div[3]/div/div/div/div/div/div[4]/a/div
click //div[@id='UIOneNodePathSelector']/div/div[3]/div/div/div/div/div/div[4]/a/div
waitForElementPresent //div[@id='UISelectPathPanel']/table/tbody/tr[7]/td[2]/a/div
click //div[@id='UISelectPathPanel']/table/tbody/tr[7]/td[2]/a/div
waitForElementPresent //form[@id='UIActionForm']/div[2]/div/table/tbody/tr/td/div[2]/div/div/div/a
click //form[@id='UIActionForm']/div[2]/div/table/tbody/tr/td/div[2]/div/div/div/a
waitForElementPresent link=Close
click link=Close
echo -- Go to SE
clickAndWait link=Content Explorer
echo -- Open drive's list
waitForElementPresent //div[@id='UISideBar']/div/div[1]/div[2]/div[1]/div/div/div/a/div
click //div[@id='UISideBar']/div/div[1]/div[2]/div[1]/div/div/div/a/div
echo -- Select SM drive
waitForElementPresent link=Sites Management
click link=Sites Management
echo -- Delete taxonomy tree
waitForElementPresent //div[@id='UITreeExplorer']/div/div/div[1]/div
click //div[@id='UITreeExplorer']/div/div/div[1]/div
waitForElementPresent //div[@id='UITreeExplorer']/div/div/div[1]/div[2]/div[2]/div
click //div[@id='UITreeExplorer']/div/div/div[1]/div[2]/div[2]/div
waitForElementPresent link=Test
mouseDownRight link=Test
waitForElementPresent link=Delete
click link=Delete
waitForElementPresent //div[@id='UIPopupWindow']/div/div[2]/div/div/div/div/div/div/div/div[2]/table/tbody/tr/td/div[1]/div/div/div/a
click //div[@id='UIPopupWindow']/div/div[2]/div/div/div/div/div/div/div/div[2]/table/tbody/tr/td/div[1]/div/div/div/a
waitForElementNotPresent link=Test
verifyElementNotPresent link=Test
echo -- Go to SA
clickAndWait link=Administration
waitForTextNotPresent Test
verifyTextNotPresent Test
echo -- Log out
clickAndWait link=Sign out