FullPageScreenshot inside iFrame

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

WebUI.takeFullPageScreenshot(filePath)

1 Like

Hi @kharitha17, Did you switch to the iframe 1st? How to handle iFrames using Selenium Webdriver: switchTo()

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!

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)?

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

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

Still I don’t see

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

so I have no more idea

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)


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.

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.

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.

@kazurayam Thank you for your inputs on this.

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.