Posts tagged id
Generate IDs in all components in ADF Faces pages and fragments – to facilitate automated Selenium based testing
0Lately, we have been introducing Selenium based testing for many our ADF Faces based web applications. Or rather, our testers created the tests for the web pages using Selenium. And did so quite successfully.
However, certain test scripts seemed to fall apart after having been run only a few times. That was rather annoying. Upon closer inspection, we noticed that the scripts that started failing had one thing in common: the Selenium scripts contained references to element id values that started with j_id. I realized that these id values are not defined in the pages by the developer, but instead assigned at run time by the ADF Faces framework. That in turn means that these ID values can easily change, between two test sessions using the same test script for example.
In order to have test scripts that continue functioning – it was required to have fixed id values. Besides, it is a best practice to assign id values to all components at design time rather than having them generated dynamically. Unfortunately, as found out later, we had over 2000 components lacking an id attribute with developer defined value. Going through all files and assigning ID values manually was not a task More >
Recent Comments