TruClient 12.02, Javascript and Same Origin Policy
♥ 0 |
I am attempting to count some dynamic objects on a search result page. The window has three frames. Using the developer console in IE and Chrome, I am able to find the objects using *document.querySelectorAll(‘button’)* if I change the location to be searched to the iframe where those contents reside. If I change the location to the navigation frame, I get different objects that do not include the objects for which I am searching. Lastly, if I narrow the search by class while in the navigation frame, I get the message "Permission Denied," indicating a same-origin policy issue in locating the objects from outside the iframe in which they reside. When I implement the javascript in TruClient, I get the erroneous result, making it obvious that it is searching the navigation frame. I tested this further by searching by class instead of by tag, and I get 0. **Is there any way to get around this in TruClient?** I’ve tried implementing the code in an Evaluate JavaScript step and also in the Object Ordinal step of the object. I would like to implement a loop so that the script can test the object to find the button I need to select.
Marked as spam
|