-
Task
-
Resolution: Unresolved
-
Minor
-
None
-
-
Blue Ocean - Candidates
Summary:
Having data- attributes available for the RadioButtonGroup control in the JDL would provide more robust selectors for automated tests.
Reasoning:
While working on my first Blue Ocean Acceptance Test, I've learned that it's a best practice to try and avoid the use of text-based XPATH selectors, such as the one on line 98 of EditorPage.java:
wait.click(By.xpath("//*[text()='Commit to new branch']"));
It would be great to have a data attribute attached to the RadioButtons in the RadioButtonGroup. That would provide for easier targeting in the tests, and changing the label next to the radio button itself wouldn't needlessly cause the test to fail.
As it stands, the test passes, but it's clicking on the label for the radio button, not the button itself. It's sort of a happy accident that this works.