We have already discussed basics of selenium and how we can use this tool for automated testing. Here we will see how we can take advantage of Selenium to test workflow field update. in this article we will create a simple workflow rule on Lead object and update “Description” field by adding fields “Number of Employees” and “Number of Locations”. We can use selenium to test if workflow is working or not ?
Selenium script
Action | Selector | Value |
---|---|---|
open | / | |
click | id=username | |
type | id=password | Demo426 |
clickAndWait | id=Login | |
waitForElementPresent | //li[@id=’AllTab_Tab’]/a/img | |
clickAndWait | //li[@id=’AllTab_Tab’]/a/img | |
clickAndWait | xpath=(//a[contains(text(),’Leads’)])[2] | |
clickAndWait | name=new | |
type | id=name_lastlea2 | Sample Lead |
type | id=lea3 | CTS |
type | id=lea15 | 8 |
type | id=00N90000002Hpam | 2 |
clickAndWait | css=#bottomButtonRow > input[name=”save”] | |
waitForElementPresent | id=lea17_ilecell | |
assertText | //td[@id=’lea17_ilecell’]/div | 10 |
Video Tutorial
Using Selenium to test workflow field update action – Salesforce automated testing – Video tutorial – Part 2 http://t.co/zlM28WPeLJ
— Jitendra Zaa (@jitendrazaa) April 28, 2015
Leave a Reply