** Changed in: sikuli
       Status: Fix Committed => Fix Released

** Summary changed:

- [1.1.2] App.open() is not returning the instance --- docs have to be adjusted
+ [1.1.2] App.open() is not returning the instance --- fixed 2018-04-12: docs 
adjusted

** Description changed:

  ------------------ usage information
  In case the given program name or path to program contains blanks, the 
complete string has to be enclosed in extra apostrophes:
-  
- App app = App().open("\"C:\\Program Files (x86)\\Microsoft 
Office\\root\\Office16\\EXCEL.EXE\"");
  
- An appropriate hint has to be added to the docs.
+ App app = App().open("\"C:\\Program Files (x86)\\Microsoft
+ Office\\root\\Office16\\EXCEL.EXE\"");
+ 
+ An appropriate hint in the docs:
+ 
http://sikulix-2014.readthedocs.io/en/latest/appclass.html#the-application-class-app
  
  -----------------------------------------------
  
  App.open() method call does not return the instance of the opened
  application instead it always return null whether application open
  successfully or not.
  
  method is "private App openAndWait(int waitTime)". Because of "notFound"
  variable is false it returns null. But "appPID" is greater than 0.
  
  sikulixapi - 1.1.1 version
  OS - 64 bit windows 10
  
  How to reproduce.
  
  App app = App.open("C:\\Program Files (x86)\\Microsoft
  Office\\root\\Office16\\EXCEL.EXE");
  
  this will return null but excel will be opened successfully.
  
  Method location in App.java class
  
  private App openAndWait(int waitTime) {
      if (isImmediate) {
        appPID = _osUtil.open(appNameGiven);
      } else {
        AppEntry appEntry = makeAppEntry();
        init(_osUtil.open(appEntry));
      }
      if (appPID < 0) {
        Debug.error("App.open failed: " + appNameGiven + " not found");
        notFound = true;
      } else {
        Debug.action("App.open " + this.toStringShort());
      }
      if (isImmediate && notFound) {
        return null;
      }
      if (waitTime > 0) {
        if (!isRunning(waitTime)) {
          return null;
        }
      }
      return this;
    }
  
  Always execute this line.
  if (isImmediate && notFound) {
        return null;
  }

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1762381

Title:
  [1.1.2] App.open() is not returning the instance --- fixed 2018-04-12:
  docs adjusted

Status in Sikuli:
  Fix Released

Bug description:
  ------------------ usage information
  In case the given program name or path to program contains blanks, the 
complete string has to be enclosed in extra apostrophes:

  App app = App().open("\"C:\\Program Files (x86)\\Microsoft
  Office\\root\\Office16\\EXCEL.EXE\"");

  An appropriate hint in the docs:
  
http://sikulix-2014.readthedocs.io/en/latest/appclass.html#the-application-class-app

  -----------------------------------------------

  App.open() method call does not return the instance of the opened
  application instead it always return null whether application open
  successfully or not.

  method is "private App openAndWait(int waitTime)". Because of
  "notFound" variable is false it returns null. But "appPID" is greater
  than 0.

  sikulixapi - 1.1.1 version
  OS - 64 bit windows 10

  How to reproduce.

  App app = App.open("C:\\Program Files (x86)\\Microsoft
  Office\\root\\Office16\\EXCEL.EXE");

  this will return null but excel will be opened successfully.

  Method location in App.java class

  private App openAndWait(int waitTime) {
      if (isImmediate) {
        appPID = _osUtil.open(appNameGiven);
      } else {
        AppEntry appEntry = makeAppEntry();
        init(_osUtil.open(appEntry));
      }
      if (appPID < 0) {
        Debug.error("App.open failed: " + appNameGiven + " not found");
        notFound = true;
      } else {
        Debug.action("App.open " + this.toStringShort());
      }
      if (isImmediate && notFound) {
        return null;
      }
      if (waitTime > 0) {
        if (!isRunning(waitTime)) {
          return null;
        }
      }
      return this;
    }

  Always execute this line.
  if (isImmediate && notFound) {
        return null;
  }

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1762381/+subscriptions

_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to     : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp

Reply via email to