How to Configure a Single Sign-On Connection
Step-by-step instructions
Step 1: In the lower left-hand section of Automation, click the Test Settings tab. Several sub-tabs will appear such as Connections, Mobile Apps, Browser Providers, etc. Open the Connections sub-tab and click the plus sign to create a new connection.
Step 2: Enter a Connection Name.
Step 3: There is a Connection Type drop-down menu within the Basic Settings. The choices include:
- Database
- Messaging
- Microsoft
- Generic Web Service
- Salesforce
- UI Testing
- Single Sign-On (SSO)
Step 4: The drop-down menu directly to the right will populate sub-categories based on what you selected. For example, if you select Salesforce as the Connection Type, you will be prompted to select Normal, Salesforce Communities Connection, or Salesforce Portal Connection.
Step 5: Enter your Username and Password for the selected Connection Type. For example, if you selected Salesforce, you should enter your existing single-sign-on Username and Password for Salesforce. Click OK.
Step 6: Open a new internet browser and navigate to the website homepage associated with the SSO connection you are creating. (For example, https://login.salesforce.com.)
Step 7: Import the SSOFile.java provided here and place it within the src > pageobjects folder. (Hint: The src folder is located within the Navigator tab of Automation.)
package pageobjects; import java.util.List; import java.util.Map; import java.util.concurrent.TimeUnit; import org.openqa.selenium.By; import org.openqa.selenium.ElementNotVisibleException; import org.openqa.selenium.JavascriptExecutor; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import com.provar.core.model.base.api.IRuntimeConfiguration; import com.provar.core.testapi.ILoginPage; import com.provar.core.testapi.ILoginResult; import com.provar.core.testapi.SfLoginResult; import com.provar.core.testapi.annotations.Page; @Page(title = "SSO Login Page", connection = "RegOrg") public class SSOFile implements ILoginPage { @Override public ILoginResult doLogin(IRuntimeConfiguration runtimeConfiguration, WebDriver driver, Map<String, String> credentials) { // Get the user name and password. String userName = credentials.get(CREDENTIAL_USER); String password = credentials.get(CREDENTIAL_PASSWORD); // Submit the SSO form. driver.findElement(By.xpath("//input[@id='username']")).clear(); driver.findElement(By.xpath("//input[@id='username']")).sendKeys(userName); driver.findElement(By.xpath("//input[@id='password']")).sendKeys(password); driver.findElement(By.xpath("//input[@id='Login']")).click(); try { Thread.sleep(5000); } catch (InterruptedException e) { e.printStackTrace(); } return new SfLoginResult(true, null, driver); } }
Step 8:
You may need to make a few edits to this file. Within the // Submit the SSO form section of the syntax, you must verify that the three xpath instructions are correct. To verify that the xpath instructions are correct for the connection you create (e.g., Salesforce), toggle back to login.salesforce.com. Place your cursor on the Username field and right-click to select Inspect.
When inspected, the Username field is associated with id=’username’, the Password field is associated with id=’password,’ and the Login button is associated with id=’login,’ which matches the xpath instructions in the java file.
Step 9: Again, open the Connections tab within Automation and click the plus sign to create a new connection. Enter the Connection Name (e.g., SSO) and select Single Sign-on (SSO) and Generic SSO (Page Object-based).
Step 10: Enter the Base URL, such as https://login.salesforce.com. Within the Page Object field, enter pageobjects.SSOFile. Check Debug. Click OK. You should now see both connections you created within the Connections tab. Click the first connection you created, TestAdmin, and click the edit button (which is to the right of the Create a new connection tab.)
Step 11: Open the Advanced Settings. Within the Sign-On Connection drop-down menu, select SSO. Click OK.
- Provar Automation
- System Requirements
- Browser and Driver Recommendations
- Installing Provar Automation
- Updating Provar Automation
- Licensing Provar
- Granting Org Permissions to Provar Automation
- Optimizing Org and Connection Metadata Processing in Provar
- Using Provar Automation
- API Testing
- Behavior-Driven Development
- Consolidating Multiple Test Execution Reports
- Creating and Importing Projects
- Creating Test Cases
- Custom Table Mapping
- Functions
- Debugging Tests
- Defining a Namespace Prefix on a Connection
- Defining Proxy Settings
- Environment Management
- Exporting Test Cases into a PDF
- Exporting Test Projects
- Japanese Language Support
- Override Auto-Retry for Test Step
- Mapping and Executing the Lightning Article Editor in Provar
- Managing Test Steps
- Namespace Org Testing
- NitroX
- Provar Automation
- Provar Test Builder
- ProvarDX
- Refresh and Recompile
- Reintroduction of CLI License Check
- Reload Org Cache
- Reporting
- Running Tests
- Searching Provar with Find Usages
- Secrets Management and Encryption
- Setup and Teardown Test Cases
- Tags and Service Level Agreements (SLAs)
- Test Cycles
- Test Plans
- Testing Browser Options
- Tooltip Testing
- Using the Test Palette
- Using Custom APIs
- Callable Tests
- Data-Driven Testing
- Page Objects
- Block Locator Strategies
- Introduction to XPaths
- Creating an XPath
- JavaScript Locator Support
- Label Locator Strategies
- Maintaining Page Objects
- Mapping Non-Salesforce fields
- Page Object Operations
- ProvarX™
- Refresh and Reselect Field Locators in Test Builder
- Using Java Method Annotations for Custom Objects
- Applications Testing
- Provar Manager
- How to Use Provar Manager
- Provar Manager Setup
- Provar Manager Integrations
- Release Management
- Test Management
- Test Operations
- Provar Manager and Provar Automation
- Setting Up a Connection to Provar Manager
- Object Mapping Between Automation and Manager
- How to Upload Test Plans, Test Plan Folders, Test Plan Instances, and Test Cases
- Provar Manager Filters
- Uploading Callable Test Cases in Provar Manager
- Uploading Test Steps in Provar Manager
- How to Know if a File in Automation is Linked in Test Manager
- Test Execution Reporting
- Metadata Coverage with Manager
- Provar Grid
- DevOps
- Introduction to Provar DevOps
- Introduction to Test Scheduling
- Apache Ant
- Configuration for Sending Emails via the Automation Command Line Interface
- Continuous Integration
- AutoRABIT Salesforce DevOps in Provar Test
- Azure DevOps
- Running a Provar CI Task in Azure DevOps Pipelines
- Configuring the Automation secrets password in Microsoft Azure Pipelines
- Parallel Execution in Microsoft Azure Pipelines using Multiple build.xml Files
- Parallel Execution in Microsoft Azure Pipelines using Targets
- Parallel execution in Microsoft Azure Pipelines using Test Plans
- Bitbucket Pipelines
- CircleCI
- Copado
- Docker
- Flosum
- Gearset
- GitHub Actions
- Integrating GitHub Actions CI to Run Automation CI Task
- Remote Trigger in GitHub Actions
- Parameterization using Environment Variables in GitHub Actions
- Parallel Execution in GitHub Actions using Multiple build.xml Files
- Parallel Execution in GitHub Actions using Targets
- Parallel Execution in GitHub Actions using Test Plan
- Parallel Execution in GitHub Actions using Job Matrix
- GitLab Continuous Integration
- Travis CI
- Jenkins
- Execution Environment Security Configuration
- Provar Jenkins Plugin
- Parallel Execution
- Running Provar on Linux
- Reporting
- Salesforce DX
- Git
- Version Control
- Masking Provar Credentials on CI
- Salesforce Testing
- Best Practices
- Salesforce Connection Best Practices
- Improve Your Metadata Performance
- Testing Best Practices
- Automation Planning
- Supported Testing Phases
- Provar Naming Standards
- Test Case Design
- Create records via API
- Avoid using static values
- Abort Unused Test Sessions/Runs
- Avoid Metadata performance issues
- Increase auto-retry waits for steps using a global variable
- Create different page objects for different pages
- The Best Ways to Change Callable Test Case Locations
- Working with the .testProject file and .secrets file
- Best practices for the .provarCaches folder
- Best practices for .pageObject files
- Troubleshooting
- How to Use Keytool Command for Importing Certificates
- Browsers
- Configurations and Permissions
- Connections
- DevOps
- Error Messages
- Provar Manager 3.0 Install Error Resolution
- Provar Manager Test Case Upload Resolution
- Administrator has Blocked Access to Client
- JavascriptException: Javascript Error
- macOS Big Sur Upgrade
- Resolving Failed to Create ChromeDriver Error
- Resolving Jenkins License Missing Error
- Resolving Metadata Timeout Errors
- Test Execution Fails – Firefox Not Installed
- Selenium 4 Upgrade
- Licensing, Installation and Firewalls
- Memory
- Test Builder and Test Cases
- Release Notes