Forum Discussion

sasiarun1127's avatar
sasiarun1127
New Contributor
5 years ago
Solved

Unable access iframe objects using findchildbyxpath

I'm find the page objects using findchildbyxpath but iframe objects are returning null even path is fine in UI

  • Hi
    thank you so much for your support
    I checked with different iframe element using findchildbyxpath everything is working fine i am able to locate the element using find child or fildchildbyxpath actual problem is unable to access google map elements only.
    we found the solution
    took the iframe src and open it separate window now i am able to access the object elements using object spy and findchild
    thanks

8 Replies

  • Marsha_R's avatar
    Marsha_R
    Champion Level 3

    What happens when you use Object Spy on one of those objects?  Please give us a screenshot of the results.

    • sasiarun1127's avatar
      sasiarun1127
      New Contributor

      Sorry for the delay response Object spy cant access the particular object because that object belongs to map. 

      please find the screen shot attachment for your referance 

      mapFrame = gapPage.FindChildByXPath("//iframe[contains(@src,'flows')]")

      above code returning the object 

      isMapLoaded = gapPage.FindChildByXPath("//div[contains(@id,'map-loader')]")

      the above one returning none type even the xpath is accessing the UI level

      • Marsha_R's avatar
        Marsha_R
        Champion Level 3

        Try the Object Spy within TestComplete please.