Control Collection
A ControlCollection can be used to select multiple controls using a single selector.
When to use
The collection can be useful in scenarios like:
A group of controls with similar characteristics.
Interactions that should be done on multiple elements.
How to use
Collection declaration on PageObject
[Selector("CheckBox")]
public ControlCollection<ICheckBox> checkBoxCollection { get; set; }
Usage in code
foreach (var checkBox in MyPageObject.checkBoxCollection)
{
checkBox.Checked = true;
}
Last updated
Was this helpful?