1 19 20 package org.netbeans.test.gui.web.extbrowser.using; 21 22 import org.netbeans.jellytools.JellyTestCase; 23 import org.netbeans.jellytools.Bundle; 24 import org.netbeans.jellytools.ExplorerOperator; 25 import org.netbeans.jellytools.OptionsOperator; 26 import org.netbeans.jellytools.NbDialogOperator; 27 28 import org.netbeans.jellytools.properties.ComboBoxProperty; 29 import org.netbeans.jellytools.properties.PropertySheetTabOperator; 30 import org.netbeans.jellytools.properties.PropertySheetOperator; 31 import org.netbeans.jellytools.properties.editors.FileCustomEditorOperator; 32 import org.netbeans.jellytools.actions.Action; 33 34 35 36 import org.netbeans.test.gui.web.util.BrowserUtils; 37 38 import org.netbeans.jemmy.operators.JButtonOperator; 39 import org.netbeans.jemmy.operators.JTextFieldOperator; 40 import org.netbeans.jemmy.operators.JTextComponentOperator; 41 import org.netbeans.junit.NbTestSuite; 42 import java.io.File ; 43 44 public class Using extends JellyTestCase { 45 private static String fSep = System.getProperty("file.separator"); 46 private static String iSep = "|"; 47 48 49 public Using(java.lang.String testName) { 50 super(testName); 51 } 52 53 public static void main(java.lang.String [] args) { 54 junit.textui.TestRunner.run(suite()); 55 } 56 57 public static junit.framework.Test suite() { 59 if(System.getProperty("os.name").indexOf("Windows")!=-1) { 61 }else { 63 } 64 return new NbTestSuite(Using.class); 65 } 66 67 70 public void testEBCLIeInPath() { 71 String ie = BrowserUtils.getIEInPath(); 72 if(ie == null) { 73 fail("Internet Explorer not found in path"); 74 } 75 BrowserUtils.setCLBrowser(); 76 BrowserUtils.setCLBrowserCommand(ie); 77 view(); 78 } 79 82 public void testEBCLIeFullPath() { 83 String iefp = BrowserUtils.getIEFullPath(); 84 if(iefp == null) { 85 fail("Internet Explorer not found. See output for details."); 86 } 87 BrowserUtils.setCLBrowser(); 88 BrowserUtils.setCLBrowserCommand(iefp); 89 view(); 90 } 91 92 95 96 public void testEBCLNetscapeInPath() { 97 String ns = BrowserUtils.getNetscapeInPath(); 98 if(ns == null) { 99 fail("Netscape not found in path"); 100 } 101 BrowserUtils.setCLBrowser(); 102 BrowserUtils.setCLBrowserCommand(ns); 103 view(); 104 } 105 106 109 110 public void testEBCLNetscapeFullPath() { 111 String nsfp = BrowserUtils.getNetscapeFullPath(); 112 if(nsfp == null) { 113 fail("Netscape not found. See output for details."); 114 } 115 BrowserUtils.setCLBrowser(); 116 BrowserUtils.setCLBrowserCommand(nsfp); 117 view(); 118 } 119 120 123 124 public void testEBCLNetscape6InPath() { 125 String ns = BrowserUtils.getNetscape6InPath(); 126 if(ns == null) { 127 fail("Netscape6 not found in path."); 128 } 129 BrowserUtils.setCLBrowser(); 130 BrowserUtils.setCLBrowserCommand(ns); 131 System.out.println("before view"); 132 view(); 133 System.out.println("after view"); 134 if(BrowserUtils.handleErrorInCLBrowser()) { 135 fail("Problems in starting Netscape6 in path."); 136 } 137 System.out.println("ended test"); 138 } 139 140 143 144 public void testEBCLNetscape6FullPath() { 145 String nsfp = BrowserUtils.getNetscape6FullPath(); 146 if(nsfp == null) { 147 fail("Netscape6 not found. See output for details."); 148 } 149 BrowserUtils.setCLBrowser(); 150 BrowserUtils.setCLBrowserCommand(nsfp); 151 view(); 152 } 153 154 157 160 161 162 165 166 public void testEBUNetscapeInPath() { 167 String ns = BrowserUtils.getNetscapeInPath(); 168 if(ns == null) { 169 fail("Netscape not found."); 170 } 171 BrowserUtils.setExternalUnixBrowser(); 172 BrowserUtils.setEBUBrowserCommand(ns); 173 view(); 174 } 175 176 179 180 public void testEBUNetscapeFullPath() { 181 String nsfp = BrowserUtils.getNetscapeFullPath(); 182 if(nsfp == null) { 183 fail("Netscape not found. See output for details."); 184 } 185 BrowserUtils.setExternalUnixBrowser(); 186 BrowserUtils.setEBUBrowserCommand(nsfp); 187 view(); 188 } 189 190 191 194 195 196 199 200 201 204 205 public void testEBWNetscape() { 206 BrowserUtils.setExternalWinBrowser(); 207 BrowserUtils.setDDEServerNetscape(); 208 view(); 209 } 210 211 214 215 public void testEBWNetscape6() { 216 BrowserUtils.setExternalWinBrowser(); 217 BrowserUtils.setDDEServerNetscape6(); 218 view(); 219 } 220 221 222 225 226 public void testEBWExplorer() { 227 BrowserUtils.setExternalWinBrowser(); 228 BrowserUtils.setDDEServerExplorer(); 229 view(); 230 } 231 232 233 234 237 238 239 240 241 244 245 public void testSwingBrowser() { 246 BrowserUtils.setSwingBrowser(); 247 view(); 248 } 249 250 251 252 255 public void view() { 256 String menuPath = "View|Web Browser"; new Action(menuPath,null).performMenu(); 258 } 259 } 260 261 262 263 264 265 266 267 268 | Popular Tags |