Salesforce CPQ Testing
Salesforce CPQ (formerly Steelbrick) is a Configure-Price-Quote solution built on Salesforce Lightning. Salesforce CPQ has certain elements that makes it a challenge to test using standard automation methods such as Selenium. This page describes how Provar can be used to automate Salesforce CPQ testing easily.
What’s the problem?
Salesforce CPQ contains custom CPQ pages built with Shadow DOM. These tags are visible in the pages’ HTML. This makes them resistant to testing using traditional locators such as Field IDs and XPaths. While CSS locators can work, they tend to be brittle and complex to construct.
How does Provar support Salesforce CPQ testing?
Provar has been extended to support Salesforce CPQ testing on a number of fronts. A new @SteelBrickBy locator is available for buttons, links and text fields. Salesforce CPQ tables and tabs are also supported.
Locating Buttons with SteelbrickBy Locators
The @SteelbrickBy locator can be used to map any action button.
This locator type will be suggested automatically in the Test Builder:
This is also visible in in the .java file in Provar Desktop, with a new SteelBrick field Locator Type:
Steelbrick Table Support
Provar has been enhanced to support the tables within Salesforce CPQ. The new Steelbrick table type can be mapped and maintained in much the same way as a standard table.
The new SteelBrick table type is again visible in the .java file in Provar Desktop:
Some pages in Salesforce CPQ have internal tabs on the pages. Provar maps these internal tabs just like Salesforce tabs when using the Test Builder:
Tab switching will be handled automatically, so no input from the user is needed when interacting with fields on a different tab.
In Provar Desktop, the tab information will be represented like this:
Edit Quote Line Support
On the Edit Quote screen, there is an arrow at the end of each Row to open expand the row. This is handled automatically by Provar and need not be mapped separately.
Provar supports clicking the line drawer by adding a “drawerField” attribute for the field definition