← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #241257]: How to save sikuli logs into an external file

 

Question #241257 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/241257

    Status: Open => Answered

RaiMan proposed the following answer:
--1: sikuli-setup.jar in classpath ...
... not needed (and not recommended), since the package org.sikuli.basics is already contained in each of the ready-to-use jars sikuli-ide.jar, sikuli-script.jar and sikuli-java.jar

--2: catching the click log entries

package dataEntry;
import java.io.IOException;
import org.sikuli.script.FindFailed;
import org.sikuli.script.Screen;
import org.sikuli.script.Settings;
import static org.sikuli.basics.Debug;
import static org.testng.Assert.*;

public class OE_SP1_AFDataEntry {

 static {
    Debug.setLogFile(System.getProperty("user.dir") + "\\logs\\log.txt");
 }

 @Test
 public void TestDataEntry() throws FindFailed, IOException,
   InterruptedException {
  try
  {
  String path_or = System.getProperty("user.dir") + "\\MLAB_OR\\OE\\";
  Screen screen = new Screen();
  Settings.MoveMouseDelay = 3;

  screen.wait(path_or + "de_de_btn.png",10);
  assertTrue(screen.exists(path_or + "de_de_btn.png",10) != null,"Step3: Activity list doesnot include DataEntry category");
  screen.click(path_or + "de_de_btn.png",10);
  assertTrue(screen.exists(path_or + "de_actmnu_img.PNG") != null,"Step4: Modules menu not present at right side");
  screen.click(path_or + "de_actmnu_oes_lnk.PNG");
  assertTrue(screen.exists(path_or + "de_oes_oesch_tab.PNG") != null,"Step5: Order Entry search tab is not present");
  }
  catch(Exception e)
  {
   assertTrue(false, e.toString());
   }
 }
}

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.