Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
247 views
in Technique[技术] by (71.8m points)

Selenium Grid - IE11 - Screenshot of Modal Dialog is cropped

I'm using Selenium Grid to run my tests against IE11 Browser. My Web application has a button within a iFrame, which when clicked opens up a modal dialog (overlay). Selenium is able to interact with the buttons with in the modal dialog and perform actions. But when I try to capture the entire modal dialog's screenshot, the top part of it is cropped off and the iFrame's content appears there. Selenium Code:

modalDialogRootElement.getScreenshotAs(OutputType.FILE)

I even tried to switch out of iFrame(after the modal dialog is opened) and capture the entire iFrame, it still fails i.e. iFrame is captured fine but the modal dialog top is cropped off.

The same code works in Chrome version 88.

Tried with both 32 bit and 64 bit IE web drivers of version: 3.150.1

Selenium Grid Jar Version: 3.141.59

Ashot also resulted in same issue. Used Robot, but since this is a remote IE machine, it cannot capture the screenshot of it. Are there any other options?

question from:https://stackoverflow.com/questions/66068496/selenium-grid-ie11-screenshot-of-modal-dialog-is-cropped

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...