Imagine that there is a non-trivial logic in the page, for example:
IF element E1 in dropdown D1 is selected THEN button B1 is disabled ELSE B1 is enabled
IF element E2 in dropdown D2 is selected THEN text input T1 is hidden ELSE T1 is visible
We need the code for both:
- UI (ASP.NET page)
- a test wrapper for this UI following Page object pattern that will be used in automation.
First of all, programming this non-trivial logic on a page is a hassle. Second, code for the wrapper has to be changed after any changes to the UI.
We started thinking that code generation can help us with both problems. My question would be: Did any of you tried doing something like that before? Any recommendations or pointers to relevant information? Thanks