Last post Jan 13, 2021 08:33 PM by mgebhard
Jan 13, 2021 05:39 PM|jmoore5268again|LINK
It appears that the decision was made to remove ID's (and really, any identifying information) for field inputs from Blazor. How are we supposed to identify individual fields to validate behaviors in both BUnit and other test frameworks like Selenium? Is
it expected that the developer is responsible for writing the code to re-add support for ID's or Name attributes to these inputs, or is there a recommended approach I haven't seen yet?
To be clear, I am aware of the solutions outlined in
this article and other similar approaches. This makes things more difficult than simply being able to ID individual elements to validate their values. Is this really the only approach provided?
Jan 13, 2021 08:33 PM|mgebhard|LINK
You mean the ID attribute in an HTML element? If so, you can add IDs if you like.
<button id="mybutton" class="btn btn-primary" @onclick="IncrementCount">Click me</button>
Otherwise the HTML is standard. Can you explain the problem you are trying to solve?
Blazor Forms and Validation