<commit_before>package im.mange.flakeless

import im.mange.flakeless.innards.{Command, Context}

import scala.collection.JavaConverters._

object Close {
  def apply(flakeless: Flakeless): Unit = {
    val rawWebDriver = flakeless.rawWebDriver

    rawWebDriver.getWindowHandles.asScala.foreach(windowHandle => {
      rawWebDriver.switchTo().window(windowHandle)
      rawWebDriver.close()
    })

    rawWebDriver.quit()
    flakeless.record(Command("Close", None, None), Context().succeeded())
  }
}
<commit_msg>make Close be a WithoutElement<commit_after>package im.mange.flakeless

import im.mange.flakeless.innards.{Command, Context, WithoutElement}

import scala.collection.JavaConverters._

object Close {
  def apply(flakeless: Flakeless): Unit = {
    new Close(flakeless).execute()
  }
}

private class Close(flakeless: Flakeless) {
  def execute(): Unit = {
    WithoutElement(flakeless,
      Command("Close", None, None),
      action = d => {
        d.getWindowHandles.asScala.foreach(windowHandle => {
          d.switchTo().window(windowHandle)
          d.close()
        })
        d.quit()
      }
    )
  }
}


{'fraction_non_alphanumeric': 0.12279151943462897, 'fraction_numerical': 0.0, 'mean_word_length': 3.4782608695652173, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3739784', 'n_tokens_mistral': 376, 'n_tokens_neox': 368, 'n_words': 61}