Test_POR_14_01_016_CreateNewNodeWithNameIsTheSameWithExistingOneInTheSameLevel
open /portal/public/classic/
click link=Sign in
type username root
type password gtn
clickAndWait //div[@id='UIPortalLoginFormAction']/div/div/div/a
clickAndWait link=Site
click link=Edit Navigation
waitForElementPresent link=Add Node
click link=Add Node
waitForElementPresent name
type name Test_POR_14_01_016
type label Test_POR_14_01_016
echo -- Choose Page Selector --
waitForElementPresent //div[2]/div/div/div/div/div/div[1]/div/div/div/div/div/div/div/div/div[2]/div/div/div/div
click //div[2]/div/div/div/div/div/div[1]/div/div/div/div/div/div/div/div/div[2]/div/div/div/div
waitForElementPresent link=Search and Select Page
click link=Search and Select Page
waitForElementPresent //img[@title='Select Page']
click //img[@title='Select Page']
echo -- Choose Icon tab --
waitForElementPresent //div[2]/div/div/div/div/div/div[1]/div/div/div/div/div/div/div/div/div[3]/div/div/div/div
click //div[2]/div/div/div/div/div/div[1]/div/div/div/div/div/div/div/div/div[3]/div/div/div/div
waitForElementPresent //form[@id='UIPageNodeForm']/div[3]/div[1]/div[3]/div/div/div[2]/div[2]/div/a[1]/div
click //form[@id='UIPageNodeForm']/div[3]/div[1]/div[3]/div/div/div[2]/div[2]/div/a[1]/div
waitForElementPresent link=Save
click link=Save
waitForElementPresent link=Save
click link=Save
echo -- Add Add new node with Name is the same with existing one in the same level in 1 navigation--
clickAndWait link=Site
waitForElementPresent link=Edit Navigation
click link=Edit Navigation
waitForElementPresent link=Add Node
click link=Add Node
waitForElementPresent name
type name Test_POR_14_01_016
type label Test_POR_14_01_016
echo -- Choose Page Selector --
waitForElementPresent //div[2]/div/div/div/div/div/div[1]/div/div/div/div/div/div/div/div/div[2]/div/div/div/div
click //div[2]/div/div/div/div/div/div[1]/div/div/div/div/div/div/div/div/div[2]/div/div/div/div
waitForElementPresent link=Search and Select Page
click link=Search and Select Page
waitForElementPresent //img[@title='Select Page']
click //img[@title='Select Page']
echo -- Choose Icon tab --
waitForElementPresent //div[2]/div/div/div/div/div/div[1]/div/div/div/div/div/div/div/div/div[3]/div/div/div/div
click //div[2]/div/div/div/div/div/div[1]/div/div/div/div/div/div/div/div/div[3]/div/div/div/div
waitForElementPresent //form[@id='UIPageNodeForm']/div[3]/div[1]/div[3]/div/div/div[2]/div[2]/div/a[1]/div
click //form[@id='UIPageNodeForm']/div[3]/div[1]/div[3]/div/div/div[2]/div[2]/div/a[1]/div
waitForElementPresent link=Save
click link=Save
waitForTextPresent This node name already exists.
verifyTextPresent This node name already exists.
waitForElementPresent //div[3]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div/a
click //div[3]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div/a
waitForElementPresent link=Back
click link=Back
waitForElementPresent link=Save
click link=Save
echo -- View node--
waitForElementPresent //div[@id='PortalNavigationTopContainer']/div[3]/div/div/div/div/div/div/a
clickAndWait //div[@id='PortalNavigationTopContainer']/div[3]/div/div/div/div/div/div/a
echo --Delete node--
clickAndWait link=Site
waitForElementPresent link=Edit Navigation
click link=Edit Navigation
waitForElementPresent //div[@id='UINavigationNodeSelector']/div/div/div/div[2]/div/div/div[8]/div/a
click //div[@id='UINavigationNodeSelector']/div/div/div/div[2]/div/div/div[8]/div/a
waitForElementPresent //a[@class='NodeIcon AcrobatFile NodeSelected' and @title='Test_POR_14_01_016']
mouseDownRight //a[@class='NodeIcon AcrobatFile NodeSelected' and @title='Test_POR_14_01_016']
waitForElementPresent link=Delete Node
click link=Delete Node
waitForConfirmationPresent
assertConfirmation Are you sure you want to delete this node?
waitForElementPresent link=Save
click link=Save
waitForElementPresent link=Sign out
clickAndWait link=Sign out