Test_POR_19_047_CreateANewPageWithNodeNameIsTheSameWithExistingNodeNameAtTheSameLevel
open /portal/public/classic/
echo -- Create a new page  with node name is the same with existing node name at the same level--
windowMaximize
click link=Sign in
waitForElementPresent username
type username root
type password gtn
clickAndWait //div[@id='UIPortalLoginFormAction']//a[text()='Sign in']
echo -- Create node by using page and navigation--
clickAndWait link=Site
waitForElementPresent link=Edit Navigation
click link=Edit Navigation
waitForElementPresent link=Add Node
click link=Add Node
echo -- Page Node Setting tab --
waitForElementPresent name
type name Test_POR_19_047
type label Test_POR_19_047
echo -- Page Selector tab --
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
echo -- Select Page --
waitForElementPresent link=Search and Select Page
click link=Search and Select Page
waitForElementPresent //img[@title='Select Page']
click //img[@title='Select Page']
waitForElementPresent //form[@id='UIPageNodeForm']/div[3]/div[2]/table/tbody/tr/td/div[1]/div/div/div
click //form[@id='UIPageNodeForm']/div[3]/div[2]/table/tbody/tr/td/div[1]/div/div/div
waitForElementPresent //div[@id='UINavigationManagement']/div[3]/table/tbody/tr/td[2]/div/div/div/div
click //div[@id='UINavigationManagement']/div[3]/table/tbody/tr/td[2]/div/div/div/div
echo -- Create new page  with same name node at the same level--
waitForElementPresent link=Add New Page
click link=Add New Page
waitForElementPresent //div[@id='UIPageNodeSelector']/div/div/div[2]/div/div/div/div[1]/a
click //div[@id='UIPageNodeSelector']/div/div/div[2]/div/div/div/div[1]/a
waitForElementPresent pageName
type pageName Test_POR_19_047
type pageDisplayName Test_POR_19_047
echo -- Click Next to move step 2 --
waitForElementPresent //div[@id='UIPageCreationWizard']/div/div[3]/div/div/div/div[2]/div/table/tbody/tr/td/div[2]/div/div/div
click //div[@id='UIPageCreationWizard']/div/div[3]/div/div/div/div[2]/div/table/tbody/tr/td/div[2]/div/div/div
waitForTextPresent This name already exists.
verifyTextPresent This name already exists.
waitForElementPresent //div[5]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div/a
click //div[5]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div/a
waitForElementPresent //div[@id='UIPageCreationWizard']/div/div[3]/div/div/div/div[2]/div/table/tbody/tr/td/div[1]/div/div/div/a
click //div[@id='UIPageCreationWizard']/div/div[3]/div/div/div/div[2]/div/table/tbody/tr/td/div[1]/div/div/div/a
echo -- Delete node --
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 DefaultPageIcon NodeSelected' and @title='Test_POR_19_047']
mouseDownRight //a[@class='NodeIcon DefaultPageIcon NodeSelected' and @title='Test_POR_19_047']
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