Silk4J User Guide
Welcome to Silk4J 20.5
Licensing Information
Silk4J
Do I Need Administrator Privileges to Run Silk4J?
Best Practices for Using Silk4J
Automation Under Special Conditions (Missing Peripherals)
Silk Test Product Suite
What's New in Silk4J
Save Time and Costs with Service Virtualization for Mobile Devices
Enhance Security with Java-based Encryption
Usability Enhancements
Technology Updates
Silk4J Quick Start Tutorial
Creating a Silk4J Project
Recording a Test for the Insurance Company Web Application
Replaying the Test for the Insurance Company Web Application
Working with Silk4J Projects
Creating a Silk4J Project
Importing a Silk4J Project
Creating Tests
Creating a Test for a Web Application
Creating a Test for a Standard Application
Creating a Test for a Mobile Web Application
Creating a Test for a Mobile Native Application
Recording a Test on Microsoft Edge
Recording a Test on Mozilla Firefox
Recording a Test on Google Chrome
Creating a Test Case Manually
Best Practices for Creating Test Scripts
Actions Available During Recording
Adding a Verification to a Script while Recording
Adding a Locator or an Object Map Item to a Test Method Using the Locator Spy
Including Custom Attributes in a Test
Characters Excluded from Recording and Replaying
Replaying Tests
Replaying Tests from Eclipse
Replaying a Test from the Command Line
Replaying Tests with Apache Ant
Troubleshooting when Replaying Tests with Ant
Replaying Tests from a Continuous Integration Server
Running Tests in Docker Containers
Silk Test Image Environment Variables
Example: Running Tests on Google Chrome
Example: Using docker-compose
Limitations when Running Tests in Docker Containers
Troubleshooting when Running Tests in Docker Containers
Replaying Silk4J Tests from Silk Central
Triggering Tests on Silk Central from a Continuous Integration Server
Replaying Tests in a Specific Order
Running Tests in Parallel
How Does Silk4J Synchronize Tests?
Enabling the Playback Status Dialog Box
Analyzing Test Results
Analyzing Test Results
HTML Reports
Visual Execution Logs with TrueLog
Enabling TrueLog
Changing the Location of the TrueLog
TrueLog Sections
Capturing the Contents of a Web Page
Why is TrueLog Not Displaying Non-ASCII Characters Correctly?
Silk Test Open Agent
Starting the Silk Test Open Agent
Stopping the Open Agent After Test Execution
Agent Options
Configuring the Connections Between the Silk4J Components
Configuring the Port to Connect to the Information Service
Configuring the Port to Connect to the Open Agent
Editing the Properties of the Silk Test Information Service
Replacing the Certificates that are Used for the HTTPS Connection to the Information Service
Remote Testing with the Open Agent
Testing with a Remote Open Agent
Configuring the Open Agent to Run Remotely in a NAT Environment
Base State
Modifying the Base State from the User Interface
Modifying the Base State in a Script
Running the Base State
Application Configuration
Modifying an Application Configuration
Select Application Dialog Box
Editing Remote Locations
Application Configuration Errors
Troubleshooting Application Configurations
Configuring Silk4J to Launch an Application that Uses the Java Network Launching Protocol (JNLP)
Creating a Test that Tests Multiple Applications
Setting Script Options
Setting TrueLog Options
Setting Recording Preferences
Setting Browser Recording Options
Setting Custom Attributes
Setting Classes to Ignore
Setting WPF Classes to Expose During Recording and Playback
Setting Synchronization Options
Setting Replay Options
Setting UI Automation Options
Setting Advanced Options
Setting Silk4J Preferences
Converting Projects to and from Silk4J
Converting a Java Project to a Silk4J Project
Converting a Silk4J Project to a Java Project
Testing Specific Environments
Active X/Visual Basic Applications
Dynamically Invoking ActiveX/Visual Basic Methods
Apache Flex Support
Configuring Flex Applications to Run in Adobe Flash Player
Launching the Component Explorer
Testing Apache Flex Applications
Testing Apache Flex Custom Controls
Dynamically Invoking Flex Methods
Defining a Custom Control in the Test Application
Testing a Flex Custom Control Using Dynamic Invoke
Testing a Custom Control Using Automation Support
Implementing Automation Support for a Custom Control
Flex Class Definition File
Customizing Apache Flex Scripts
Testing Multiple Flex Applications on the Same Web Page
Adobe AIR Support
Overview of the Flex Select Method Using Name or Index
Selecting an Item in the FlexDataGrid Control
Enabling Your Flex Application for Testing
Linking Automation Packages to Your Flex Application
Precompiling the Flex Application for Testing
Run-Time Loading
Loading at Run-Time
Using the Command Line to Add Configuration Information
Passing Parameters into a Flex Application
Passing Parameters into a Flex Application Before Runtime
Passing Parameters into a Flex Application at Runtime Using the Flex Automation Launcher
Creating Testable Flex Applications
Custom Attributes for Apache Flex Applications
Flex AutomationName and AutomationIndex Properties
Flex Class Definition File
Setting the Flex automationName Property
Setting the Flex Select Method to Use Name or Index
Coding Flex Containers
Adding and Removing Containers from the Automation Hierarchy
Multiview Containers
Flex Automation Testing Workflow
Flex Automated Testing Initialization
Flex Automated Testing Recording
Flex Automated Testing Playback
Styles in Apache Flex Applications
Configuring Flex Applications for Adobe Flash Player Security Restrictions
Attributes for Apache Flex Applications
Why Cannot Silk4J Recognize Apache Flex Controls?
Java AWT/Swing Support
Attributes for Java AWT/Swing Applications
Dynamically Invoking Java Methods
Configuring Silk4J to Launch an Application that Uses the Java Network Launching Protocol (JNLP)
Determining the priorLabel in the Java AWT/Swing Technology Domain
Oracle Forms Support
Prerequisites for Testing Oracle Forms
Attributes for Oracle Forms Applications
Java SWT and Eclipse RCP Support
Java SWT Custom Attributes
Attributes for Java SWT Applications
Dynamically Invoking Java Methods
Troubleshooting Java SWT and Eclipse Applications
Testing Mobile Applications
Android
Prerequisites for Testing Mobile Applications on Android
Testing Mobile Applications on Android
Testing Hybrid Applications on Android
Installing a USB Driver
Enabling USB-Debugging
Recommended Settings for Android Devices
Configuring the Android Emulator for Silk4J
Tested Configurations for Parallel Test Execution
iOS
Prerequisites for Testing Mobile Applications on iOS
Testing Native Mobile Applications on a Physical iOS Device
Testing Native Mobile Applications on an iOS Simulator
Testing Mobile Web Applications on a Physical iOS Device
Testing Mobile Web Applications on an iOS Simulator
Testing Hybrid Applications on iOS
Preparing an iOS Device for Testing
Preparing an iOS App for Testing
Installing the Silk Test Information Service on a Mac
Preparing a Mac to Test Mobile Applications on iOS
Using a Personal Team Profile for Testing on Physical iOS Devices
Editing the Properties of the Silk Test Information Service
Uninstalling the Silk Test Information Service from a Mac
Recommended Settings for iOS Devices
Running Existing Scripts on iOS Using XCUITest
Recording Mobile Applications
Selecting the Mobile Device for Test Replay
Using Devices from Mobile Center Directly from Silk4J
Using Devices from Mobile Center through Silk Central
Installing the Certificate for an HTTPS Connection to Mobile Center
Changing the Mobile Center Password
Using SauceLabs Devices
Connection String for a Mobile Device
Interacting with a Mobile Device
Releasing a Mobile Device
Releasing a Mobile Device After Recording
Releasing a Mobile Device After Replay
Using the setLocation Method when Testing a Mobile Application
Troubleshooting when Testing Mobile Applications
How Can I Use Chrome for Android to Replay Tests?
Limitations for Testing Mobile Web Applications
Limitations for Testing Native Mobile Applications
Dynamically Invoking Methods for Native Mobile Apps
Clicking on Objects in a Mobile Website
Using Existing Mobile Web Tests
.NET Support
Windows Forms Support
Attributes for Windows Forms Applications
Custom Attributes for Windows Forms Applications
Dynamically Invoking Windows Forms Methods
Windows Presentation Foundation (WPF) Support
Attributes for Windows Presentation Foundation (WPF) Applications
Custom Attributes for WPF Applications
Classes that Derive from the WPFItemsControl Class
Custom WPF Controls
Dynamically Invoking WPF Methods
Setting WPF Classes to Expose During Recording and Playback
Setting Pre-Fill During Recording and Replaying
Silverlight Application Support
Locator Attributes for Identifying Silverlight Controls
Dynamically Invoking Silverlight Methods
Scrolling in Silverlight
Troubleshooting when Testing Silverlight Applications
Visual COBOL Support
Rumba Support
Enabling and Disabling Rumba
Locator Attributes for Identifying Rumba Controls
Testing a Unix Display
SAP Support
Attributes for SAP Applications
Dynamically Invoking SAP Methods
Dynamically Invoking Methods on SAP Controls
Configuring Automation Security Settings for SAP
Universal Windows Platform Support
Troubleshooting when Testing UWP Apps
Windows API-Based Application Support
Attributes for Windows API-based Client/Server Applications
Determining the priorLabel in the Win32 Technology Domain
Testing Embedded Chrome Applications
Microsoft Foundation Class Support
Cross-Browser Testing
Selecting the Browser for Test Replay
Test Objects for xBrowser
Object Recognition for xBrowser Objects
Page Synchronization for xBrowser
Comparing API Playback and Native Playback for xBrowser
Setting Mouse Move Preferences
Browser Configuration Settings for xBrowser
Configuring the Locator Generator for xBrowser
Connection String for a Remote Desktop Browser
Testing Browsers on a Remote Windows Machine
Testing Google Chrome or Mozilla Firefox on a Mac
Setting Capabilities for WebDriver-Based Browsers
Testing with Apple Safari on a Mac
Prerequisites for Testing with Apple Safari on a Mac
Preparing Apple Safari for Testing
Installing the Silk Test Information Service on a Mac
Limitations for Testing with Apple Safari
Running Multiple Apple Safari Tests at the Same Time
Uninstalling the Silk Test Information Service from a Mac
Testing with Google Chrome
Prerequisites for Replaying Tests with Google Chrome
Testing Google Chrome Extensions
Testing Google Chrome with User Data Directories
Limitations for Testing with Google Chrome
Limitations for Testing with Google Chrome on macOS
Testing with Mozilla Firefox
Testing Mozilla Firefox with Profiles
Testing Mozilla Firefox Extensions
Limitations for Testing with Mozilla Firefox
Limitations for Testing with Mozilla Firefox on macOS
Testing with Microsoft Edge
Limitations for Testing with Microsoft Edge
Responsive Web Design Testing
Detecting Visual Breakpoints
Improving iframe Performance
Testing Additional Browser Versions
Cross-Browser Testing: Frequently Asked Questions
Dialog is Not Recognized During Replay
DomClick(x, y) Is Not Working Like Click(x, y)
FileInputField.DomClick() Will Not Open the Dialog
How Can I Maximize the Browser Window when Starting to Test?
How can I scroll in a browser?
How Can I See Which Browser I Am Currently Using?
How do I Verify the Font Type Used for the Text of an Element?
I Configured innerText as a Custom Class Attribute, but it Is Not Used in Locators
I Need Some Functionality that Is Not Exposed by the xBrowser API. What Can I Do?
Link.Select Does Not Set the Focus for a Newly Opened Window in Internet Explorer
Logging Output of My Application Contains Wrong Timestamps
My Test Script Hangs After Navigating to a New Page
Recorded an Incorrect Locator
Rectangles Around Elements in Internet Explorer are Misplaced
The Move Mouse Setting Is Turned On but All Moves Are Not Recorded. Why Not?
What is the Difference Between textContents, innerText, and innerHtml?
What Should I Take Care Of When Creating Cross-Browser Scripts?
Which Locators are Best Suited for Stable Cross Browser Testing?
Why Are the Class and the Style Attributes Not Used in the Locator?
Why Are Clicks Recorded Differently in Internet Explorer 10?
Why Do I Get an Invalidated-Handle Error?
Starting a Browser from a Script
Finding Hidden Input Fields
Attributes for Web Applications
Custom Attributes for Web Applications
Limitations for Testing on Microsoft Windows 8 and Microsoft Windows 8.1
Supported Attribute Types
Attributes for Apache Flex Applications
Attributes for Java AWT/Swing Applications
Attributes for Java SWT Applications
Attributes for SAP Applications
Locator Attributes for Identifying Silverlight Controls
Locator Attributes for Identifying Controls with UI Automation
Locator Attributes for Identifying Rumba Controls
Attributes for Web Applications
Attributes for Windows Forms Applications
Attributes for Windows Presentation Foundation (WPF) Applications
Attributes for Windows API-based Client/Server Applications
Dynamic Locator Attributes
Keyword-Driven Tests
Advantages of Keyword-Driven Testing
Keywords
Creating a Keyword-Driven Test in Silk4J
Recording a Keyword-Driven Test in Silk4J
Setting the Base State for a Keyword-Driven Test in Silk4J
Implementing a Keyword in Silk4J
Recording a Keyword in Silk4J
Marking a Test Method in a Script as a Keyword
Editing a Keyword-Driven Test
Managing Keywords in a Test in Silk Central
Which Keywords Does Silk4J Recommend?
Using Parameters with Keywords
Example: Keywords with Parameters
Combining Keywords into Keyword Sequences
Replaying Keyword-Driven Tests from Eclipse
Replaying Keyword-Driven Tests Which Are Stored in Silk Central
Replaying Keyword-Driven Tests from the Command Line
Replaying Keyword-Driven Tests with Apache Ant
Replaying a Keyword-Driven Test with Specific Variables
Integrating Silk4J with Silk Central
Implementing Silk Central Keywords in Silk4J
Uploading a Keyword Library to Silk Central
Uploading a Keyword Library to Silk Central from the Command Line
Searching for a Keyword
Filtering Keywords
Finding All References of a Keyword
Grouping Keywords
Troubleshooting for Keyword-Driven Testing
Object Recognition
Locator Basic Concepts
Object Type and Search Scope
Using Attributes to Identify an Object
Locator Syntax
Using Locators
Using Locators to Check if an Object Exists
Identifying Multiple Objects with One Locator
Locator Customization
Stable Identifiers
Creating Stable Locators
Example: Locating Siblings of a Control
Example: Locating the Expand Icon in a Dynamic GWT Tree
Custom Attributes
Custom Attributes for Apache Flex Applications
Java SWT Custom Attributes
Custom Attributes for Web Applications
Custom Attributes for Windows Forms Applications
Custom Attributes for WPF Applications
Troubleshooting Performance Issues for XPath
Locator Spy
Object Maps
Advantages of Using Object Maps
Turning Object Maps Off and On
Using Assets in Multiple Projects
Merging Object Maps During Action Recording
Using Object Maps with Web Applications
Renaming an Object Map Item
Modifying Object Maps
Modifying a Locator in an Object Map
Updating Object Maps from the Test Application
Copying an Object Map Item
Adding an Object Map Item
Opening an Object Map from a Script
Highlighting an Object Map Item in the Test Application
Finding Errors in an Object Map
Deleting an Object Map Item
Initially Filling Object Maps
Grouping Elements in Object Maps
Object Maps: Frequently Asked Questions
Can I Merge Multiple Object Maps Into a Single Map?
What Happens to an Object Map when I Delete a Test Script?
Can I Manually Create an Object Map for My Application Under Test?
Image Recognition Support
Image Click Recording
Image Recognition Methods
Image Assets
Creating an Image Asset
Adding Multiple Images to the Same Image Asset
Opening an Asset from a Script
Image Verifications
Creating an Image Verification
Adding an Image Verification During Recording
Using Assets in Multiple Projects
Enhancing Tests
Recording Additional Actions Into an Existing Test
Calling Windows DLLs
Calling a Windows DLL from Within a Script
DLL Function Declaration Syntax
DLL Calling Example
Passing Arguments to DLL Functions
Passing Arguments that Can Be Modified by the DLL Function
Passing String Arguments to DLL Functions
Aliasing a DLL Name
Conventions for Calling DLL Functions
Custom Controls
Dynamic Invoke
Frequently Asked Questions About Dynamic Invoke
Which Methods Can I Call With the invoke Method?
Why Does an Invoke Call Return a Simple String when the Expected Return is a Complex Object?
How Can I Simplify My Scripts When I Use Many Calls To invokeMethods?
Adding Code to the Application Under Test to Test Custom Controls
Frequently Asked Questions About Adding Code to the AUT
Why is Code That I Have Injected Into the AUT With the LoadAssembly Method Not Updated in the AUT?
Why Do the Input Argument Types Not Match When I Invoke a Method?
How Do I Fix the Compile Error when an Assembly Can Not Be Copied?
Testing Apache Flex Custom Controls
Managing Custom Controls
Supporting a Custom Control
Custom Controls Options
Improving Object Recognition with Microsoft Accessibility
Using Accessibility
Enabling Accessibility
Overview of Silk4J Support of Unicode Content
Microsoft UI Automation
Recording a Test Against an Application with an Implemented UI Automation Provider Interface
Dynamically Invoking UI Automation Methods
Locator Attributes for Identifying Controls with UI Automation
Scrolling in UI Automation Controls
Limitations when Using UI Automation
Troubleshooting when Testing with UI Automation Support Enabled
Text Recognition Support
Service Virtualization
Discovering the Endpoints in your Application Under Test
Learning which Data is Transmitted Through an Endpoint
Simulating Data for Selected Endpoints
Simulating Data for Selected Endpoints through the API
Grouping Silk4J Tests
Why Do I Get the Error: Category cannot be resolved to a type?
Inserting a Result Comment in a Script
Consuming Parameters from Silk Central
Configuration Testing with Silk Central Connect
Measuring Execution Time
Slowing Down Tests
Testing Applications in Multiple UI Sessions on a Single Machine
Encrypting Passwords
Using Selenium WebDriver
Using Selenium with Existing Silk4J Scripts
Executing Selenium Scripts
Entering Special Keys Into A Text Field
Using Keyword-Driven Tests as Performance Tests
Known Issues
General Issues
Mobile Web Applications
Web Applications
Google Chrome
Internet Explorer
Microsoft Edge
Mozilla Firefox
SAP Applications
Silk4J
Enabling or Disabling Usage Data Collection
Contacting Micro Focus
Information Needed by Micro Focus SupportLine