Silk Test Classic supports a subset of the XPath query language. Use a FindAll or a Find command followed by a supported construct to create a test case.
To create tests that use dynamic object recognition, you must use the Open Agent.
Unsupported XPath Construct | Example |
---|---|
Comparing two attributes with each other. | PushButton[@caption = @windowid] |
An attribute name on the right side is not supported. An attribute name must be on the left side. | PushButton['abc' = @caption] |
Combining multiple XPath expressions with 'and' or 'or'. | PushButton [@caption = 'abc'] or .//Checkbox |
More than one set of attribute brackets. |
PushButton[@caption = 'abc] [@windowid = '123']
Use PushButton [@caption = 'abc and @windowid = '123'] instead. |
More than one set of index brackets. | PushButton[1][2] |
Any construct that does not explicitly specify a class or the class wildcard, such as including a wildcard as part of a class name. |
//[@caption = 'abc']
Use //*[@caption = 'abc'] instead. "//*Button[@caption='abc']" |