Last updated: Aug 03, 2017 10:58
Limitations of iFrame and troubleshooting info
Objects cannot be retrieved from an iFrame that contains a Sandbox attribute
The value of the sandbox attribute can either be just sandbox (then all restrictions are applied), or a space-separated list of pre-defined values that will REMOVE the particular restrictions.
More about Sandbox can be found here
Example of how to use sandbox to enable Perfecto Mobile commands:
Possible errors include:
- Cross Domain Error (switchTo)
- Invalid Path To Frame (switchTo)
- The Path Doesn't Point To a Frame (switchTo)
- Scopes - Cross Domain Error
- Scopes - Cannot Evaluate xPath Expression
- Scopes - The Path Doesn't Point To a Frame
- Script Execution Not Supported For Target Frame
iFrame Loading Time
When you browse to a page with iFrame, it is not enough to use BrowserSync because BrowserSync does not wait for IFrames to load.
The iFrame may still be loading even when the main page has completed loading.
To solve - Create a loop where you wait for the iFrame to load. You can check that it loads by checking if a specific elements is there.