Skip to content
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

Do we need to driver.switchTo().defaultContent(); before take screenshot? #321

Closed
shenlian8 opened this issue Aug 13, 2020 · 4 comments
Closed
Assignees

Comments

@shenlian8
Copy link
Contributor

Hi,

I'd like to ask, in Runner class, do we need in takeScreenshot(File file, boolean entirePage) methode the block any more?

    try {
        // cf. http://prospire-developers.blogspot.jp/2013/12/selenium-webdriver-tips.html (Japanese)
        driver.switchTo().defaultContent();
    } catch (Exception e) {
        // some times switching to default context throws exceptions like:
        // Method threw 'org.openqa.selenium.UnhandledAlertException' exception.
    }

Thanks!

Best regards

Lian

@vmi vmi self-assigned this Aug 14, 2020
@vmi
Copy link
Owner

vmi commented Aug 14, 2020

I think it's no longer needed because the screenshot feature was replaced by Selenium Shutterbug.

@shenlian8
Copy link
Contributor Author

Can you please remove it?
Because the appium server hat bug from 1.16 with driver.switchTo().defaultContent();
If nativ app is under testing this cause a wait time for 60 seconds.

vmi added a commit that referenced this issue Aug 15, 2020
vmi added a commit that referenced this issue Aug 15, 2020
vmi added a commit that referenced this issue Aug 15, 2020
@vmi
Copy link
Owner

vmi commented Aug 18, 2020

Hi,

I fixed and released it.
Please check new version.

@shenlian8
Copy link
Contributor Author

Hi,

it works. Thanks a lot!

Best regards

Lian

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants