Account Portlet Contacts
setTimeout 45000
open index.php
waitForPageToLoad
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
clickAndWait //html/body/section/nav/div[1]/ul/li[3]/a/span
waitForText //html/body/section/div[1]/div[2]/div[1]/form/div[5]/a[4] Items I Own
sendKeys //html/body/section/div[1]/div[2]/div[1]/form/div[2]/table/tbody/tr/td/input Test Account ${randomSuffix}
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
waitForText //html/body/section/div[1]/div[3]/div/div[2]/table/tbody/tr[1]/td[3]/a Test Account ${randomSuffix}
verifyValue //html/body/section/div[1]/div[2]/div[1]/form/div[2]/table/tbody/tr/td/input Test Account ${randomSuffix}
click //html/body/section/div[1]/div[3]/div/div[2]/table/tbody/tr[1]/td[3]/a
waitForPageToLoad
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
waitForText //html/body/section/div[1]/div[2]/div[2]/div/ul[1]/li[1]/div[2]/div/div/div/div/table/tbody/tr[1]/td Test Account ${randomSuffix}
waitForElementPresent //html/body/section/div[1]/div[2]/div[2]/div/ul[2]/li[3]/div[1]/div/div/div/ul/li/ul/li/a/span
clickAndWait //html/body/section/div[1]/div[2]/div[2]/div/ul[2]/li[3]/div[1]/div/div/div/ul/li/ul/li/a/span
waitForPageToLoad
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
waitForElementPresent id=Contact_firstName
type id=Contact_firstName Test
type id=Contact_lastName Contact ${randomSuffix}
select id=Contact_state_id label=Customer
clickAndWait name=save
waitForPageToLoad
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
assertTextPresent Test Contact ${randomSuffix}
waitForElementPresent //html/body/section/div[1]/div[2]/div[2]/div/ul[2]/li[3]/div[1]/div/div/div/ul/li/ul/li/a/span
clickAndWait //html/body/section/div[1]/div[2]/div[2]/div/ul[2]/li[3]/div[1]/div/div/div/ul/li/ul/li/a/span
waitForPageToLoad
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
type id=Contact_firstName Test
clickAndWait name=save
waitForPageToLoad
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
waitForTextPresent Last Name cannot be blank.
type id=Contact_lastName Zurmo ${randomSuffix}
clickAndWait name=save
waitForPageToLoad
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
waitForTextPresent Test Zurmo ${randomSuffix}
assertElementPresent link=Unlink
click link=Unlink
waitForConfirmation Are you sure you want to unlink this contact?
chooseCancelOnNextConfirmation
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
waitForTextPresent Test Zurmo ${randomSuffix}
assertElementPresent link=Unlink
click link=Unlink
waitForConfirmation Are you sure you want to unlink this contact?
chooseOkOnNextConfirmation
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
assertText //html/body/section/div[1]/div[2]/div[2]/div/ul[2]/li[3]/div[2]/div/div/table/tbody/tr/td/div/a Test Zurmo ${randomSuffix}
waitForElementNotPresent //html/body/section/div[1]/div[2]/div[2]/div/ul[2]/li[3]/div[2]/div/div/table/tbody/tr[2]
waitForElementPresent //html/body/section/div[1]/div[2]/div[2]/div/ul[2]/li[3]/div[1]/div/div/div/ul/li/ul/li/a/span
clickAndWait //html/body/section/div[1]/div[2]/div[2]/div/ul[2]/li[3]/div[1]/div/div/div/ul/li/ul/li/a/span
waitForPageToLoad
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
type id=Contact_firstName Test
type id=Contact_lastName Contact ${randomSuffix}
select id=Contact_state_id label=Customer
waitForTextPresent There is 1 possible match.
click //div[@id='FlashMessageBar']/div/div/div/span
clickAndWait name=save
waitForPageToLoad
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
waitForTextPresent Test Contact ${randomSuffix}
clickAndWait //html/body/section/nav/div[1]/ul/li[3]/a/span
waitForText //html/body/section/div[1]/div[2]/div[1]/form/div[5]/a[4] Items I Own
click //html/body/section/div[1]/div[2]/div[1]/form/div[5]/a[3]/span[2]
waitForTextNotPresent Criteria Selected