@@ -0,0 +1,2190 @@
+package org.callimachusproject.webdriver;%0A%0Aimport java.io.File;%0A%0Aimport junit.framework.TestSuite;%0A%0Aimport org.callimachusproject.webdriver.helpers.AssetDownloader;%0Aimport org.callimachusproject.webdriver.helpers.BrowserFunctionalTestCase;%0Aimport org.callimachusproject.webdriver.pages.CalliPage;%0Aimport org.callimachusproject.webdriver.pages.ClassView;%0Aimport org.callimachusproject.webdriver.pages.FolderView;%0Aimport org.openqa.selenium.By;%0A%0Apublic class DirectoryFunctionalTest extends BrowserFunctionalTestCase %7B%0A%09private static final String DOWNLOAD_URL = %22http://dir-w3-org.googlecode.com/files/directory-1.3.car%22;%0A%0A%09public static TestSuite suite() throws Exception %7B%0A%09%09return BrowserFunctionalTestCase%0A%09%09%09%09.suite(DirectoryFunctionalTest.class);%0A%09%7D%0A%0A%09public DirectoryFunctionalTest() %7B%0A%09%09super();%0A%09%7D%0A%0A%09public DirectoryFunctionalTest(BrowserFunctionalTestCase parent) %7B%0A%09%09super(parent);%0A%09%7D%0A%0A%09public void testDirectory() throws Exception %7B%0A%09%09File car = new AssetDownloader(new File(%22downloads%22))%0A%09%09%09%09.getLocalAsset(DOWNLOAD_URL);%0A%09%09FolderView folder = page.openCurrentFolder().openImportPage()%0A%09%09%09%09.selectFile(car).importCar().openCurrentFolder();%0A%09%09String archive = folder.getCurrentUrl().replaceAll(%22%5C%5C?.*%22, %22?archive%22);%0A%09%09File ex = new AssetDownloader(getUsername(), getPassword()).downloadAsset(archive, %22directory.car%22);%0A%09%09folder.openImportPage().selectFile(ex).importCar();%0A%09%09ex.delete();%0A%09%09page.openCurrentFolder();%0A%09%09browser.click(By.linkText(%22Organization%22));%0A%09%09page.page(ClassView.class).createANew(%22Organization%22, CalliPage.class);%0A%09%09browser.type(By.id(%22legal%22), %223 Round Stones Inc.%22);%0A%09%09browser.select(By.id(%22orgtype%22), %22Commercial%22);%0A%09%09browser.type(By.id(%22url%22), %22http://3roundstones.com/%22);%0A%09%09browser.select(By.xpath(%22//div%5B@id='adr'%5D//select%22), %22United States%22);%0A%09%09browser.click(By.cssSelector(%22button%5Btype=submit%5D%22));%0A%09%09browser.focusInFrame(%22save-as___%22);%0A%09%09browser.focusInTopWindow();%0A%09%09browser.click(By.xpath(%22(//button%5B@type='button'%5D)%5B2%5D%22));%0A%09%09browser.focusInTopWindow();%0A%09%09browser.click(By.linkText(%22Edit%22));%0A%09%09browser.type(By.xpath(%22//div%5B@id='adr'%5D//input%5B@placeholder='state or province'%5D%22), %22DC%22);%0A%09%09browser.click(By.cssSelector(%22button%5Btype=submit%5D%22));%0A%09%7D%0A%0A%7D%0A

Add directory functional test