title: LeanFT and selenium webdriver screenshot - switching between
body: <p>We are using selenium for web based applications and LeanFT for desktop &amp; Citrix apps (eg: PowerBuilder, Terminal emulator) using Java </p>
  
  <p>Using LeanFT or selenium exclusively causes no issues (we use LeanFT reporter and <a href="https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/TakesScreenshot.html" rel="nofollow noreferrer">selenium <code>TakesScreenshot</code></a>) but the problem is, in one flow with screenshot capture, when we are switching context between LeanFT and Selenium. </p>
  
  <p>What we have tried so far:
  Tried switching to LeanFT screen capture if selenium <code>getDriver</code> returns <code>null</code> but this doesn’t, it fails if we start <code>webDriver</code> first</p>
  
  <p>In our framework screenshot are taken part of <code>onTestPass</code>, <code>onTestFail</code> so end users doesn’t have to explicitly call <code>getScreenshot</code>.</p>
  
  <p>Any idea what we could leverage to notify method to capture screen based on LeanFT or selenium?
  The goal is to create a single report, by using both the results from selenium and the ones from LeanFT</p>
  
  <p>Note: We don’t want to use LeanFT for everything (due to reusability of existing scripts) and we should use LeanFT for non web related systems</p>