From 9964481dc3dcb1fe21158787ef614e54d6039997 Mon Sep 17 00:00:00 2001
From: IWAMURO Motonori <vmi@nifty.com>
Date: Sat, 15 Aug 2020 14:43:10 +0900
Subject: [PATCH] remove the code we no longer need because the screenshot
 feature has been replaced by Selenium Shutterbug. (#321)

---
 src/main/java/jp/vmi/selenium/selenese/Runner.java | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/src/main/java/jp/vmi/selenium/selenese/Runner.java b/src/main/java/jp/vmi/selenium/selenese/Runner.java
index ab52f2a53..cdd67ebad 100644
--- a/src/main/java/jp/vmi/selenium/selenese/Runner.java
+++ b/src/main/java/jp/vmi/selenium/selenese/Runner.java
@@ -226,13 +226,6 @@ protected String takeScreenshot(File file, boolean entirePage) throws Unsupporte
         if (tss == null)
             throw new UnsupportedOperationException("webdriver does not support capturing screenshot.");
         file = file.getAbsoluteFile();
-        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.
-        }
         File tmp;
         try {
             File dir = file.getParentFile();