Forum Discussion

pkudrys's avatar
pkudrys
Contributor
2 months ago

mapped elements in headless mode does not return child elements

Hi folks,

I'm recently trying to run my web-based tests in headless mode and I found a blocking issue that the mapped elements does not have child elements. Therefore, FindChild method (and other Find methods) fails to find child elements in such element. The mapped element alone is found. It just shows ChildCount = 0. Please see the attached image. Does anyone experience the same issue? 

 

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    Are your UI Objects dynamically drawn? And you are using XPath to locate the objects?

    • pkudrys's avatar
      pkudrys
      Contributor

      Hi, I'm not sure about dynamically drawn objects (the UI is Angular-based). But yes, I'm locating elements via xpaths and css. As mentioned, the test works fine in normal browser. And partially, it works also in headless mode. For example login works fine and even the property checkpoint for mapped element works fine... 

        It's just that the mapped element returns 0 children elements.