Hi, is it possible to have custom attributes on controls that appear in the dom, we use them in our automation tests in order to identify controls.
Hi Peter,
Wisej.NET already has a built-in feature to make it easier to identify elements for automation tests.
It’s as easy as setting up the default.json file by adding the following:
"options": {
"automation.mode": true
}
The complete JSON would be as follows:
{
"url": "Default.html",
"startup": "Wisej_Project_Name.Program.Main, Wisej_Project_Name",
"options": {
"automation.mode": true
}
}
Basically, what this feature does is that it replaces all the obfuscated ids of the controls and gives you a hierarchical representation of the control so you can easily identify all the components.
As an example, you can have a Button inside of a FlowLayoutPanel, instead of that button being represented as “id_X” in the dom, it would be something like: Page1_flowLayoutPanel1_Button.
HTH,
Alaa
Please login first to submit.