Forum Discussion

Mykola_Kushnir's avatar
Mykola_Kushnir
Occasional Contributor
14 years ago

Using XPATH for iframe objects

Dear TC Support,



I try to use new TC feature Xpath, and faced with couple issues. First of all, PageObj.EvaluateXPath(XPath) method can be called only from Page object. This limitation does not allow process some elements like iframe.

For example, I have two popup window and each of them is in its own  iframe. Using PageObj.EvaluateXPath(XPath) method I can get only first popup (which is on background) and second popup (which is top most) is unreachable by EvaluateXPath, since it should be called from frame object but not from page.



So, my question is - Is there are some possibility to call EvaluateXPath method not only for page. but also for other web element - e.g. SomeObj.EvaluateXPath(XPath) ?



If not, then how can I process nested popups with Xpath ? (currently its seems to be impossible)
  • irina_lukina's avatar
    irina_lukina
    Super Contributor

    Hi, Mykola


    So, my question is - Is there are some possibility to call EvaluateXPath method not only for page. but also for other web element - e.g. SomeObj.EvaluateXPath(XPath) ?


    Currently, TestComplete's XPath feature lets you search for the page's elements only. That's why, the EvaluateXPath method can only be called for the Page object.


    As for the ability to call this method for other web elements (like iframes), I've registered your suggestion in our DB, and we'll try to implement this feature in future releases of TestComplete.


    Thanks for your feedback.