Test_PRL_04_02_004_AddNewMembershipWithNameTheSameWithExisting
open /portal/public/classic/
echo -- Add new membership with name the same with existing--
windowMaximize
click link=Sign in
waitForElementPresent username
type username root
type password gtn
type username root
clickAndWait //div[@id='UIPortalLoginFormAction']/div/div/div/a
echo -- Go to Users and group management --
clickAndWait link=Users and groups management
echo -- Choose Membership Management --
click //div[@id='UIOrganizationPortlet']/div[2]/div[1]/div/div/div/div/div/div/a[3]/div[1]
waitForElementPresent name
type name Test_PLT_04_02_004
type description Test_PLT_04_02_004
waitForElementPresent link=Save
click link=Save
echo -- Create same name membership--
waitForElementPresent name
type name Test_PLT_04_02_004
type description Test_PLT_04_02_004
click link=Save
waitForTextPresent This membership already exists, please enter another one
verifyTextPresent This membership already exists, please enter another one
waitForElementPresent //div[3]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div
click //div[3]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div
echo -- Delete membership--
waitForElementPresent //form[@id='UIMembershipTypeForm']/div[2]/div/div/table/tbody/tr/td/div[2]/div/div/div
click //form[@id='UIMembershipTypeForm']/div[2]/div/div/table/tbody/tr/td/div[2]/div/div/div
waitForElementPresent //div[@id='UIGrid']/table/tbody/tr[2]/td[5]/div/img[2]
click //div[@id='UIGrid']/table/tbody/tr[2]/td[5]/div/img[2]
assertConfirmation Are you sure you want to delete this membership?
clickAndWait link=Sign out