-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect equals check for "microsoft edge" browser if driver instance is of RemoteWebDriver in takeFullPageScreenshot method in Browser class #92
Comments
Hi @racchouhan12 , Please provide the following:
|
MicrosoftEdge Version: 90.0.818.49 snippet: |
Could you please also post the snippet of code of driver creation |
Here "browserName" I am passing is "MicrosoftEdge" in my testng.xml |
@glib-briia are you planning to release this change anytime soon? |
@racchouhan12 released. Will be available in maven central in couple hours. |
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(); }
The text was updated successfully, but these errors were encountered: