Using Selenium to test workflow field update action – Salesforce automated testing – Video tutorial – Part 2

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 ?

Salesforce Workflow rule - field update on Lead
Salesforce Workflow rule – field update on Lead

Selenium script

ActionSelectorValue
open/
clickid=username
typeid=passwordDemo426
clickAndWaitid=Login
waitForElementPresent//li[@id='AllTab_Tab']/a/img
clickAndWait//li[@id='AllTab_Tab']/a/img
clickAndWaitxpath=(//a[contains(text(),'Leads')])[2]
clickAndWaitname=new
typeid=name_lastlea2Sample Lead
typeid=lea3CTS
typeid=lea158
typeid=00N90000002Hpam2
clickAndWaitcss=#bottomButtonRow > input[name="save"]
waitForElementPresentid=lea17_ilecell
assertText//td[@id='lea17_ilecell']/div10

Video Tutorial 

Related posts

Leave a Reply

Your email address will not be published. Required fields are marked *