Forum Discussion
12 Replies
- rraghvaniChampion Level 3
What does Object Spy tool show for your control?
- vijayakrishnabvOccasional Contributor
- rraghvaniChampion Level 3
idStr = "_iframe2" should match the xpath //iframe[@name='_iframe2'] ?
- vijayakrishnabvOccasional Contributor
iframe number is getting changed dynamically and when we used regular expression or more than one xpath by having 1 and 2 separately, iframe not getting identified.
- vijayakrishnabvOccasional Contributor
Also when we provide multiple xpaths, why TestComplete is not taking up any one of the matched Xpath. Is there any reason?
- eykxasRegular Contributor
Hi!
In my project I faced the same issue, so I develop my own method to do multi xpath.
- rraghvaniChampion Level 3
You should also be able to use contains within your XPath, as shown in https://support.smartbear.com/testcomplete/docs/app-testing/web/general/common-tasks/finding-objects/xpath-expressions.html
- vijayakrishnabvOccasional Contributor
Hi, Observed that we have 2 frames and objects are getting loaded under any one of the 2 frames. So we are able to write code to identify the relevant frame by using childCount.
Is there a way to perform the same using Namemapping?, Because this is the new design of existing page and we need to update existing Namemapping.
- rraghvaniChampion Level 3
A child node needs to have a parent. Does the child node belong to _iframe1 or _iframe2?
- vijayakrishnabvOccasional Contributor
Thank you all for your time.
Issue got resolved by using below in namemapping as per our DOM structure:
//iframe[contains(@id,'frame')][contains(@style,'height')]
- rraghvaniChampion Level 3
So contains works as suggested? Not sure why you are using height
- vijayakrishnabvOccasional Contributor
Webpage has 2 iFrames & all the controls are getting loaded either under iframe1 or iframe2 dynamically.
Earlier also I was using contains and was not getting identified particular iframe where controls are loaded. We identified that height is one additional tag getting displayed when controls are getting loaded under specific iframe.
Appreciate your help Raghavan.
Related Content
- 11 months ago
- 11 months ago
Recent Discussions
- 2 days ago