Possible bug with Web Object Spy and elements in IFrame

I’m testing an element inside an IFrame. This element has no ID, but the parent element does, as does the IFrame. I used Web Object Spy to create locators for the IFrame, parent element, and test element. I’ve had no trouble with the IFrame itself and the parent object works consistently. The test element’s locator is an xpath in Basic mode: //ul[@id=‘ul_id’]/li

When I first capture the test element, the Verify and Highlight works fine. However, when I close and reopen Web Object Spy and Send the test element to it, Verify and Highlight fails with “Unable to find object by XPath Selector”. In addition to the xpath locator, there is a “ref_element” locator that has the object name of the IFrame Test Object as the Value. I can uncheck this locator and then Verify and Highlight works perfectly. However, when I save this Captured Object, its “Parent iframe” is set to No. If I Send this object to Web Object Spy, Verify and Highlight fails. If I manually add in the missing IFrame to the object’s hierarchy, the ref_element locator does NOT appear and Verify and Highlight again works fine. But, if I save the changes to the object and Send it back to Web Object Spy, the ref_element locator comes back and Verify and Highlight again fails.

To make matters worse, all my actual test runs, fail to locate this object regardless of the state of the “Parent iframe”.

I cannot provide the AUT/SUT, but if someone would like to give me a link to a test site meeting the relevant criteria, I would be happy to set up the tests for it and provide screenshots, logs, etc. I tried to set this up on jsfiddle, but could not figure out how to set up page within the IFrame.

FYI, some detailed complex examples would VERY MUCH improve the usefulness of the documentation. For example, how would you parameterize a Test Object like the one above (TO’s parent element has an ID, but the TO and sibling elements do not, and TO can ONLY be identified by text)?

The following URL may interest you.

My opinion is simple. Recorder and Spy Object are not sophisticated enough to deal with web pages containing

1 Like