package com.opera.core.systems;

import static org.junit.Assert.assertTrue;

import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;

import com.opera.core.systems.scope.protos.SystemInputProtos.ModifierPressed;
import com.opera.core.systems.scope.protos.SystemInputProtos.MouseInfo.MouseButton;


public class OperaBlank {
	private static OperaDesktopDriver driver;
    
    @BeforeClass
    public static void setUpBeforeClass() throws Exception {
        driver = new OperaDesktopDriver();
    }
    
    @Test
    public void testBookmarkDialog(){
        driver.waitStart();
        //driver.operaDesktopAction("Add to bookmarks");
        
        int win_id = driver.waitForWindowShown("Bookmark Properties Dialog");
        assertTrue("Got bookmark dialog", win_id >= 0);
        QuickWidget widget = driver.findWidgetByName(-1, "label_for_Nick_edit");
    	assertTrue("Has name edit", widget !=  null);
    	QuickWidget qw = driver.findWidgetByName(-1, "label_for_Name_edit");
        System.out.println("By name: " + qw.getText());
        qw.verifyText("DI_ID_HLFILEPROP_FNAME_LABEL");
            
        QuickWidget btn = driver.findWidgetByName(win_id,"button_Cancel");
        
        driver.waitStart();
        //btn.click(MouseButton.LEFT,1,ModifierPressed.NONE);
        //driver.operaDesktopAction("Cancel");
        System.out.println("--Wait for window to close--");
        driver.waitForWindowClose("Bookmark Properties Dialog");
        
    }
   
    
    @AfterClass
    public static void tearDownAfterClass() throws Exception {
    	//driver.quit();
    }

	
   	    

}

@@ -120,425 +120,73 @@
 nit.
-BeforeClass;%0Aimport org.junit.Test;%0A%0Aimport com.opera.core.systems.scope.protos.SystemInputProtos.ModifierPressed;%0Aimport com.opera.core.systems.scope.protos.SystemInputProtos.MouseInfo.MouseButton;%0A%0A%0Apublic class OperaBlank %7B%0A%09private static OperaDesktopDriver driver;%0A    %0A    @BeforeClass%0A    public static void setUpBeforeClass() throws Exception %7B%0A        driver = new OperaDesktopDriver();%0A    %7D%0A    %0A  
+Test;%0A%0Apublic class OperaBlank extends DesktopTestBase %7B%0A
   @Test%0A
     
@@ -181,18 +181,16 @@
   @Test%0A
-  
   public
@@ -219,18 +219,15 @@
 og()
+ 
 %7B%0A    
-  
-  
 driv
@@ -242,30 +242,27 @@
 tart();%0A    
-   
- 
 //
+ 
 driver.opera
@@ -292,37 +292,25 @@
 ookmarks%22);%0A
-        %0A    
+%0A
     int win_
@@ -367,28 +367,24 @@
 s Dialog%22);%0A
-    
     assertTr
@@ -423,28 +423,24 @@
  %3E= 0);%0A    
- 
-   
 QuickWidget 
@@ -504,17 +504,16 @@
 %22);%0A    
-%09
 assertTr
@@ -541,17 +541,16 @@
 idget !=
- 
  null);%0A
@@ -553,17 +553,16 @@
 l);%0A    
-%09
 QuickWid
@@ -618,36 +618,32 @@
 ame_edit%22);%0A    
-   
- 
 System.out.print
@@ -674,20 +674,16 @@
 ext());%0A
-    
     qw.v
@@ -729,46 +729,12 @@
 %22);%0A
+%0A
    
-         %0A        QuickWidget btn =
  dri
@@ -761,16 +761,17 @@
 (win_id,
+ 
 %22button_
@@ -780,29 +780,17 @@
 ncel%22);%0A
-        
 %0A
-    
     driv
@@ -805,26 +805,23 @@
 tart();%0A
-    
     //
+ 
 btn.clic
@@ -868,18 +868,15 @@
 E);%0A
-    
     //
+ 
 driv
@@ -904,28 +904,24 @@
 (%22Cancel%22);%0A
-    
     System.o
@@ -968,20 +968,16 @@
 %22);%0A    
- 
-   
 driver.w
@@ -1029,150 +1029,11 @@
 %22);%0A
-        %0A    %7D%0A   %0A    %0A    @AfterClass%0A    public static void tearDownAfterClass() throws Exception %7B%0A    %09//driver.quit();%0A    %7D%0A%0A%09%0A   %09    %0A
+%0A  %7D
 %0A%7D%0A

Remove custom setup and teardown, reformat