# FullPageScreenshot inside iFrame

**URL:** <https://forum.katalon.com/t/fullpagescreenshot-inside-iframe/116425>\
**Category:** Web Testing\
**Tags:** katalon-studio\
**Created:** [February 1, 2024, 10:04pm UTC](https://forum.katalon.com/t/fullpagescreenshot-inside-iframe/116425 "2024-02-01T22:04:02Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![kharitha17](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kharitha17/32/22830_2.png) [@kharitha17](https://forum.katalon.com/u/kharitha17)\
**Post date:** [February 1, 2024, 10:04pm UTC](https://forum.katalon.com/t/fullpagescreenshot-inside-iframe/116425/1 "2024-02-01T22:04:02Z")

</div>

Hi Team,  
I am not able to take FullPageScreenshot inside iFrame.Any Help appreciated . Thanks.

WebUI.takeFullPageScreenshot(filePath)

---

<div class="post-metadata">

**Author:** ![Dave\_Evers](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/dave_evers/32/435_2.png) [@Dave\_Evers](https://forum.katalon.com/u/Dave_Evers)\
**Post date:** [February 2, 2024, 5:14am UTC](https://forum.katalon.com/t/fullpagescreenshot-inside-iframe/116425/2 "2024-02-02T05:14:00Z")

</div>

Hi @kharitha17, Did you switch to the iframe 1st? [How to handle iFrames using Selenium Webdriver: switchTo()](http://forum.katalon.com/t/how-to-handle-iframes-using-selenium-webdriver-switchto/34915)

---

<div class="post-metadata">

**Author:** ![kharitha17](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kharitha17/32/22830_2.png) [@kharitha17](https://forum.katalon.com/u/kharitha17)\
**Post date:** [February 2, 2024, 2:06pm UTC](https://forum.katalon.com/t/fullpagescreenshot-inside-iframe/116425/3 "2024-02-02T14:06:18Z")

</div>

Hello @Dave_Evers ,Yes I did . Before switching to iFrame , FullPageScreenshot is working as expected.  
Please let me know if you have any Inputs on this. Thank you!

---

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [February 2, 2024, 2:34pm UTC](https://forum.katalon.com/t/fullpagescreenshot-inside-iframe/116425/4 "2024-02-02T14:34:56Z")

</div>

> [@kharitha17](#):
>
> I am not able to take FullPageScreenshot inside iFrame

Lack of information.

What PNG did you get? Please share the image file you got.

A completely blank rectangle?

A PNG which shows some texts around a blank rectangle as `<iframe>`?

A PNG which shows some texts around a rectangle as `<iframe>` which shows only a visible portion (not full page screenshot)?

---

<div class="post-metadata">

**Author:** ![Dave\_Evers](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/dave_evers/32/435_2.png) [@Dave\_Evers](https://forum.katalon.com/u/Dave_Evers)\
**Post date:** [February 2, 2024, 3:45pm UTC](https://forum.katalon.com/t/fullpagescreenshot-inside-iframe/116425/5 "2024-02-02T15:45:27Z")

</div>

Hi @kharitha17, As Kaz says we need more information.  
See this post for more information as to what is needed:

> [@\[TIP\] How To Help Us Help You!](http://forum.katalon.com/t/tip-how-to-help-us-help-you/12919):
>
> My test is BROKEN! NOTHING WORKS! HELP ME! Relax. We get it. We really do. There are some pretty smart and clever people on this forum, but you must realize, they are not magicians or wizards or gods. They cannot see your code, they can’t see your errors and they don’t even know what your AUT is meant to do even though it might seem perfectly obvious to you. So please relax and follow the advice below, before you start writing your post. The advice below will tell you the exact information …

---

<div class="post-metadata">

**Author:** ![kharitha17](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kharitha17/32/22830_2.png) [@kharitha17](https://forum.katalon.com/u/kharitha17)\
**Post date:** [February 2, 2024, 4:52pm UTC](https://forum.katalon.com/t/fullpagescreenshot-inside-iframe/116425/6 "2024-02-02T16:52:42Z")

</div>

Hi @kazurayam , In my Scenario I am placing the FullpageScreenshot step at end of every page. This is capturing visible portion not the full page. There is no text around the rectangle its a regular PNG.  
 ![image](https://europe1.discourse-cdn.com/katalon/original/3X/5/1/51bb3c6acf805dd83863e0b04797f1797a882f78.png)

---

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [February 2, 2024, 10:46pm UTC](https://forum.katalon.com/t/fullpagescreenshot-inside-iframe/116425/7 "2024-02-02T22:46:47Z")

</div>

> [@kharitha17](#):
>
> I am not able to take FullPageScreenshot inside iFrame

Still I don’t see

- what you expected to get, and
- what you actually got

so I have no more idea

---

<div class="post-metadata">

**Author:** ![kharitha17](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kharitha17/32/22830_2.png) [@kharitha17](https://forum.katalon.com/u/kharitha17)\
**Post date:** [February 23, 2024, 8:21pm UTC](https://forum.katalon.com/t/fullpagescreenshot-inside-iframe/116425/8 "2024-02-23T20:21:31Z")

</div>

Hi @kazurayam  
To work on my application I need to Login to the main application and then have to switch to frame (as my application is in an iFrame)

 ![image](https://europe1.discourse-cdn.com/katalon/original/3X/2/b/2b85e90fad53f64db9c08c95dce7ec723fc82956.png)  
Scenario : In step 8 I am able to capture full page screenshot , but after switching to frame in step 14 , it is not capturing the full-page screenshot. I am able to capture only the visible portion (i.e; only the bottom part of the screen)

This is the keyword for capturing the screenshot. hope this helps.

 ![image](https://europe1.discourse-cdn.com/katalon/original/3X/4/1/4176fc23238d4d04a34982f720b08019002c4cc2.png)

---

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [February 23, 2024, 11:24pm UTC](https://forum.katalon.com/t/fullpagescreenshot-inside-iframe/116425/9 "2024-02-23T23:24:36Z")

</div>

I suppose, `WebUI.takeFullPageScreenshot` is not capable to take the full-page-screenshot of a document inside a `<iframe>` on the page. Out of the scope. You should abandon your idea.

---

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [February 23, 2024, 11:29pm UTC](https://forum.katalon.com/t/fullpagescreenshot-inside-iframe/116425/10 "2024-02-23T23:29:02Z")

</div>

Principally you need to somehow open the web page in another window outside the `<iframe>` and then take a full-page screenshot of the isolated window.

I have several ideas to try to pull out the page `<iframe>`. Howerver it could be complicated; it will require seasoned skills of Java programming, will involve a lot of try-and-errors. Also, your webapp challenges a “Login” processing which is usually highly domain-specifc. To solve any domain-specific technical issues, the developer would require you to allow her/him an immediate access to the webapp in question. Possily you will be asked to pay them.

I am not really interested in this issue. So I won’t devote myself into it.

---

<div class="post-metadata">

**Author:** ![kharitha17](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kharitha17/32/22830_2.png) [@kharitha17](https://forum.katalon.com/u/kharitha17)\
**Post date:** [February 25, 2024, 4:43am UTC](https://forum.katalon.com/t/fullpagescreenshot-inside-iframe/116425/11 "2024-02-25T04:43:37Z")

</div>

@kazurayam Thank you for your inputs on this.

---

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [February 25, 2024, 9:02am UTC](https://forum.katalon.com/t/fullpagescreenshot-inside-iframe/116425/12 "2024-02-25T09:02:50Z")

</div>

Alternative idea.

Can you speak to the developers of your target web app?

If possible, ask them to change the target web app a bit so that you can open the problem page in a window on its own, not inside `<iframe>`. I suppose it would be easy for them to implement that special arrangement.

Then you would be able to take a full-page screenshot of the window.

---

<div class="post-metadata">

**Author:** ![kharitha17](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kharitha17/32/22830_2.png) [@kharitha17](https://forum.katalon.com/u/kharitha17)\
**Post date:** [February 26, 2024, 2:22pm UTC](https://forum.katalon.com/t/fullpagescreenshot-inside-iframe/116425/13 "2024-02-26T14:22:21Z")

</div>

Hi @kazurayam , I have missed to mention one more scenario where I am able to capture FullPageScreenshot when I am inside iFrame.

Scenario:  
Step-1 : I am logging into application and switching to iFrame in this step (as shown in the above post )  
Step-2: I am stopping the Testcase after execution of step-1 , and from step-2 I am resuming the application by selecting the option **Run from here**  
If I do this way , I am able to capture full page screenshots.  
Below screenshot showing the Testcase  
 ![image](https://europe1.discourse-cdn.com/katalon/original/3X/9/0/90fa57d6fbba1ab5ac70301bc59b5e6791afb444.png)

Hope this helps. Thank you !

---

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [February 26, 2024, 10:09pm UTC](https://forum.katalon.com/t/fullpagescreenshot-inside-iframe/116425/14 "2024-02-26T22:09:06Z")

</div>

@kharitha17

Nice to hear you have found out your way!

---

<div class="post-metadata">

**Author:** ![kharitha17](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kharitha17/32/22830_2.png) [@kharitha17](https://forum.katalon.com/u/kharitha17)\
**Post date:** [February 27, 2024, 3:54am UTC](https://forum.katalon.com/t/fullpagescreenshot-inside-iframe/116425/15 "2024-02-27T03:54:49Z")

</div>

@kazurayam , still we can’t run this as a full test case. May be I should explore other options as you suggested.  
Thank you for your inputs on this 😊

---

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [February 27, 2024, 4:03am UTC](https://forum.katalon.com/t/fullpagescreenshot-inside-iframe/116425/16 "2024-02-27T04:03:12Z")

</div>

> [@kharitha17](#):
>
> May be I should explore other options as you suggested.

I would recommend you to speak to the developers of your web app. Ask them to change the target web app so that you can open the HTML in an window, not within an `<iframe>`. You should ask them: _“Please improve this web app a bit more testable; friendly to the testers”_.
