Control Slice
Last updated
Last updated
The Control Slice is a control that represents a slice of a PageObject or a control. We can define controls not provided to us by the DOM or Automation to perform click interactions.
When it is not possible to make a selector for the desired control.
Match with an element that is dynamic but has the same appearance.
The element is on the screen but is not found on the DOM or desktop controls tree.
Images on a canvas that the DOM or Automation can't provide. The blue rectangles are the ones that the DOM or Automation recognizes, and the red circles are candidates to control slices.
The Control Slice can be used through the control interface IControlSlice that can be declared in multiple ways in the PageObject.
With an image.
With a single point.
With coordinates.
Usage in code
Currently, only the click
interactions will be sent to the control slice directly. Other interactions like SendKeys
will be sent to the entire control.