cancel
Showing results for 
Search instead for 
Did you mean: 

Unable access iframe objects using findchildbyxpath

SOLVED
Highlighted
New Contributor

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

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
New Contributor

Re: Unable access iframe objects using findchildbyxpath

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

View solution in original post

8 REPLIES 8
Highlighted
Community Hero

Re: Unable access iframe objects using findchildbyxpath

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

Highlighted
New Contributor

Re: Unable access iframe objects using findchildbyxpath

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

Highlighted
Community Hero

Re: Unable access iframe objects using findchildbyxpath

Try the Object Spy within TestComplete please.

Highlighted
Community Manager

Re: Unable access iframe objects using findchildbyxpath

Thanks Marsha_R for being helpful! 

 

Hi @sasiarun1127 , it looks like what you are experiencing could be Chrome-specific. Are you using this browser? Chrome can be stopping TestComplete from looking at the iFrame objects. Here’s a quote from a support case with an issue similar to yours: 

 

>>

Please try using the following command line arguments to run chrome: chrome.exe --disable-web-security --user-data-dir=c:\users\user\tempChromeProfile\ --disable-site-isolation-trials If you don't have this folder (c:\users\user\tempChromeProfile\), it will be created automatically. Please note that you will need to enable our extension (SmartBear Test Extension) for the new profile. Information on these arguments can be found in the link below:

https://support.smartbear.com/testcomplete/docs/app-testing/web/general/preparing-browsers/chrome.ht...

<<

 

Please also read the following article for more information: 

https://support.smartbear.com/testcomplete/docs/app-testing/web/general/considerations.html 

 

Let me know if this approach helps. Thank you. 


Sonya Mihaljova
Community and Education Specialist

Learn SmartBear products in a fun and easy way and prove your knowledge!
>>Participate in the TechCorner Challenge today
Highlighted
Community Hero

Re: Unable access iframe objects using findchildbyxpath

Hi,

 

You should (even must) avoid using .FindChildByXPath() in favor of native .FindXXX() methods provided by TestComplete.

.FindChildByXPath() is the last resort way when nothing else works.

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
Highlighted
New Contributor

Re: Unable access iframe objects using findchildbyxpath

Thanks for the response i will check it and let you. 

Highlighted
Community Manager

Re: Unable access iframe objects using findchildbyxpath

Hi @sasiarun1127 , were you able to figure out a solution? Did any of the suggestions help? 


Sonya Mihaljova
Community and Education Specialist

Learn SmartBear products in a fun and easy way and prove your knowledge!
>>Participate in the TechCorner Challenge today
Highlighted
New Contributor

Re: Unable access iframe objects using findchildbyxpath

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

View solution in original post

New Here?
Join us and watch the welcome video:
Announcements
Join TechCorner Challenge!
Want a fun and easy way to learn TestComplete? Try solving weekly TechCorner challenges and get into the Leaderboard!


Challenge Status

Compare images using the Region Checkpoint

See replies!

Converting UTC TimeDate in an Excel file

See replies!

Compare HTML table with Excel file and correct data in Excel file

Participate!

How to execute remote test and obtain results via Test Runner REST API

Participate!
Top Kudoed Authors