vmi / selenese-runner-java

Selenium IDE native format (selenese and side) interpreter.
Other
140 stars 82 forks source link

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

Closed shenlian8 closed 4 years ago

shenlian8 commented 4 years ago

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 commented 4 years ago

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

shenlian8 commented 4 years ago

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 commented 4 years ago

Hi,

I fixed and released it. Please check new version.

shenlian8 commented 4 years ago

Hi,

it works. Thanks a lot!

Best regards

Lian