Testing Google Chrome with User Data Directories

All changes that you make in Google Chrome, for example your home page, what toolbars you use, any saved passwords, and your bookmarks, are all stored in a special folder, which is called a user data directory.

With Silk Test Workbench, you can test Google Chrome user data directories by specifying the path to the user data directory in the base state of the application under test. The following command line includes the path to the profile:
chrome.exe "--user-data-dir=C:/Users/MyUser/AppData/Local/Google/Chrome/User Data"
To set the profile directory for our sample web application, you can use the following code:
' VB code
Dim baseState = New BrowserBaseState(BrowserType.GoogleChrome, "demo.borland.com/InsuranceWebExtJS")
Dim myProfileDir = "--user-data-dir=D:\\temp\\SilkTest --profile-directory=Profile1"
baseState.CommandLineArguments = myProfileDir
baseState.Execute()
Note: When Google Chrome is started by Silk Test Workbench, an empty user data directory is used. This ensures that the test starts at a clean state.