AppWorks runtime Selenium testing

Antal Bos
edited October 20, 2021 in AppWorks #1

Hi my fellow AppWorks proponent,

Currently I'm viewing the possibilities of Selenium webdriver testing for the AppWorks runtime pages.

The biggest issue I see (also at others) is to find the correct elements based on css class/id. css-id's seemed to be generated/dynamic and the css-class's can't be set on a specific form component. The only CSS class we could set is on a layout panel, but is too high-level.

Are there any other possibilities (except for long XPath expressions) for retrieving a specific HTML element to get a grip on during Selenium testing?

Best regards, Antal Bos

Comments

  • Hi Antal Bos,

    • Yes, you are right. As application pages are not static, all controls are dynamically constructed and hence no fixed ids could be given for the same.
    • We thought of similar problem earlier and did try to resolve in some way by assigning ids to controls in while developing the forms by application developer. But that will not solve the problem completely & will end up with following issue.
      • It may work only for individual components but will not work for nested controls(RGC, nested grids) which will have repeated structure of controls.
    • Based on the scenario\use case basis, we can suggest optimised ways for writing XPath to achieve the same.
      • Something like, get control by label name and then traverse to parent control to perform the action provided the label name is uniquely identified in that form.

    We've huge set of selenium automation test cases written by our automation team&developers, so can provide best way to solve issues as possible.

    Kindly let us know the scenarios \ UI pages where it lead to long XPAth, so that we will try to provide optimized way for the same.

  • Have a look in the MainPage.java file from the attachment. If you have a similar sample on how to make the xPath smaller it would be great.

    Thx, Antal