| Create | ||
| setTimeout | 45000 | |
| storeGlobal | javascript{Math.floor(Math.random()*11000)} | randomSuffix |
| open | index.php/accounts/default/create | |
| waitForPageToLoad | ||
| waitForCondition | selenium.browserbot.getCurrentWindow().jQuery.active == 0 | 30000 |
| waitForTextPresent | Create Account | |
| type | Account_name | my account ${randomSuffix} |
| clickAndWait | save | |
| waitForText | //div[@id='AccountEditAndDetailsView']/div/div[2]/table/tbody/tr/td | my account ${randomSuffix} |
| open | index.php/contacts/default | |
| waitForPageToLoad | ||
| open | index.php/contacts/default/create | |
| waitForPageToLoad | ||
| waitForCondition | selenium.browserbot.getCurrentWindow().jQuery.active == 0 | 30000 |
| waitForTextPresent | Create Contact | |
| type | Contact_firstName | Jinny |
| type | Contact_lastName | Jane ${randomSuffix} |
| select | Contact_state_id | label=Customer |
| type | Contact_jobTitle | Sales Manager |
| type | Contact_department | Sales |
| select | Contact_source_value | label=Tradeshow |
| type | Contact_officePhone | 456 |
| type | Contact_mobilePhone | 789 |
| select | Contact_title_value | label=Mrs. |
| type | Contact_officeFax | 123 |
| type | Contact_primaryEmail_emailAddress | jane@company.com |
| type | Contact_description | testing |
| click | Contact_owner_SelectLink | |
| waitForCondition | selenium.browserbot.getCurrentWindow().jQuery.active == 0 | 30000 |
| waitForElementPresent | UsersSearchForm_anyMixedAttributes | |
| type | UsersSearchForm_anyMixedAttributes | Sam Smith |
| keyUp | UsersSearchForm_anyMixedAttributes | \10 |
| waitForCondition | selenium.browserbot.getCurrentWindow().jQuery.active == 0 | 30000 |
| waitForText | //div[@id='UsersModalListView']/div/table/tbody/tr/td/a | Sam Smith |
| click | link=Sam Smith | |
| waitForCondition | selenium.browserbot.getCurrentWindow().jQuery.active == 0 | 30000 |
| waitForValue | Contact_owner_name | Sam Smith |
| assertNotValue | Contact_owner_id | |
| type | Contact_primaryAddress_street1 | 123 Main Street |
| type | Contact_primaryAddress_street2 | Suite 500 |
| type | Contact_primaryAddress_city | Chicago |
| type | Contact_primaryAddress_state | IL |
| type | Contact_primaryAddress_postalCode | 60614 |
| type | Contact_primaryAddress_country | USA |
| type | Contact_secondaryAddress_street1 | 456 Bee Street |
| type | Contact_secondaryAddress_street2 | Suite 400 |
| type | Contact_secondaryAddress_city | Gary |
| type | Contact_secondaryAddress_state | Indiana |
| type | Contact_secondaryAddress_postalCode | 67898 |
| type | Contact_secondaryAddress_country | USA |
| click | Contact_account_SelectLink | |
| waitForCondition | selenium.browserbot.getCurrentWindow().jQuery.active == 0 | 30000 |
| waitForElementPresent | AccountsSearchForm_anyMixedAttributes | |
| type | AccountsSearchForm_anyMixedAttributes | my account ${randomSuffix} |
| keyUp | AccountsSearchForm_anyMixedAttributes | \10 |
| waitForCondition | selenium.browserbot.getCurrentWindow().jQuery.active == 0 | 30000 |
| waitForText | //div[@id='list-viewmodal']/table/tbody/tr[1]/td/a | my account ${randomSuffix} |
| click | //div[@id='list-viewmodal']/table/tbody/tr[1]/td/a | |
| waitForCondition | selenium.browserbot.getCurrentWindow().jQuery.active == 0 | 30000 |
| waitForValue | Contact_account_name | my account ${randomSuffix} |
| clickAndWait | save | |
| waitForPageToLoad | ||
| waitForCondition | selenium.browserbot.getCurrentWindow().jQuery.active == 0 | 30000 |
| waitForTextPresent | Jinny Jane ${randomSuffix} | |
| assertText | //div[@id='ContactEditAndDetailsView']/div/div[2]/table/tbody/tr[1]/td[1] | Mrs. Jinny Jane ${randomSuffix} |
| assertText | //div[@id='ContactEditAndDetailsView']/div/div[2]/table/tbody/tr[3]/td[1] | Sales Manager |
| assertText | //div[@id='ContactEditAndDetailsView']/div/div[2]/table/tbody/tr[5]/td[1] | Sales |
| assertText | //div[@id='ContactEditAndDetailsView']/div/div[2]/table/tbody/tr[7]/td[1] | Tradeshow |
| assertText | link=Sam Smith | Sam Smith |
| assertText | //div[@id='ContactEditAndDetailsView']/div/div[2]/table/tbody/tr[2]/td[1] | Customer |
| assertText | link=my account ${randomSuffix} | my account ${randomSuffix} |
| assertText | //div[@id='ContactEditAndDetailsView']/div/div[2]/table/tbody/tr[6]/td[1] | 456 |
| assertText | //div[@id='ContactEditAndDetailsView']/div/div[2]/table/tbody/tr[8]/td[1] | 789 |
| assertText | //div[@id='ContactEditAndDetailsView']/div/div[2]/table/tbody/tr[9]/td[1] | 123 |
| compareText | //div[@id='ContactEditAndDetailsView']/div/div[2]/table/tbody/tr[12]/td[1] | 123 Main Street Suite 500 Chicago IL, 60614 USAmap |
| compareText | //div[@id='ContactEditAndDetailsView']/div/div[2]/table/tbody/tr[13]/td[1] | 456 Bee Street Suite 400 Gary Indiana, 67898 USAmap |