StoreFileAction extends AbstractSeleniumAction { @Override protected void execute(SeleniumBrowser browser, TestContext context) { browser.storeFile(context.replaceDynamicContentInString(filePath)); } StoreFileAction(Builder builder); String getFilePath();  }
@Test public void testExecute() throws Exception { StoreFileAction action = new StoreFileAction.Builder() .browser(seleniumBrowser) .filePath("classpath:download/file.txt") .build(); action.execute(context); Assert.assertNotNull(seleniumBrowser.getStoredFile("file.txt")); }
@Test public void testExecuteVariableSupport() throws Exception { context.setVariable("file", "classpath:download/file.xml"); StoreFileAction action = new StoreFileAction.Builder() .browser(seleniumBrowser) .filePath("${file}") .build(); action.execute(context); Assert.assertNotNull(seleniumBrowser.getStoredFile("file.xml")); }