I'm find the page objects using findchildbyxpath but iframe objects are returning null even path is fine in UI
Solved! Go to Solution.
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
What happens when you use Object Spy on one of those objects? Please give us a screenshot of the results.
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
Try the Object Spy within TestComplete please.
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:
<<
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.
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.
Thanks for the response i will check it and let you.
Hi @sasiarun1127 , were you able to figure out a solution? Did any of the suggestions help?
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
User | Count |
---|---|
15 | |
11 | |
8 | |
2 | |
1 |
Subject | Author | Latest Post |
---|---|---|