← Back to team overview

sikuli-driver team mailing list archive

[Bug 747006] Re: [request] Ubuntu: app.window() returns None - not supported on Linux yet

 

I found a bug here,  
The original  patch can't search appName through all tailing string of winLine with space characters, It often fails.
Since my  source has been formatted so i  can't make a patch, so i just provide a fix here.

=== modified file 'sikuli-script/src/main/java/org/sikuli/script/LinuxUtil.java'
-	       if(!ok && winLine[7].toLowerCase().indexOf(appName)>=0) {
-		  ok=true;
-	       } 
+              int from = str.indexOf(winLine[7]);
+              if (!ok && str.substring(from).toLowerCase().indexOf(appName) >= 0) {
+                ok = true;
+              }

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

Title:
  [request] Ubuntu: app.window() returns None - not supported on Linux
  yet

Status in Sikuli:
  Fix Released

Bug description:
  Ubuntu 10.10 32Bit and 64Bit / Sikuli X-1.0rc2 (32Bit and 64Bit)

  only App.open(), App.close() and App.focus() work
  *****************************************

  app.window()/App.focusedWindow() can return the region of the
  application's window on Mac and Window. However, it returns NONE on
  Ubuntu.

  For instance, the following code results in error on Ubuntu, but works well on Mac and Windows.
  ff = App("firefox")
  wait(3)
  print ff.window().getY()

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


References