Description
For MicrosoftEdge when I run on BrowserStack, RemoteWebDriver is used and screenshot which I get has overlapping as header in my page is fixed.
After debugging I noticed that when WebDriver is instance of RemoteWebDriver, the browser name I am getting is "msedge" not "MicrosoftEdge" hence takeFullPageScreenshot is not working as expected for MicrosoftEdge.
Here is the code from Browser class:
public BufferedImage takeFullPageScreenshot() { this.driver = this.unwrapDriver(); if (!(this.driver instanceof ChromeDriver) && !(this.driver instanceof EdgeDriver)) { if (this.driver instanceof FirefoxDriver) { return this.takeFullPageScreenshotGeckoDriver(); } else { if (this.driver instanceof RemoteWebDriver) { if (((RemoteWebDriver)this.driver).getCapabilities().getBrowserName().equals("chrome") || ((RemoteWebDriver)this.driver).getCapabilities().getBrowserName().equals("MicrosoftEdge")) { return this.takeFullPageScreenshotChromeCommand(); }