In CentOS, "getPID" "isRunning" is not working properly

Asked by Rathinavel

Hi,

Am using SikulixIDE 1.1.1 in CentOS Linux release 7.3.1611 (Core)

I am trying to get the PID of the window "cids". The below code is working perfectly in Windows. Returning process id if it is running or -1 if it is not running.

sim=App.focus("cids")
id=sim.getPID()
print id

But while running the same script in CentOS, Returning process id if it is running, showing below error if it is not running:

[error] App.focus failed: [-1:cids ()] cids
[error] script [ getID ] stopped with error in line 4
[error] AttributeError ( 'NoneType' object has no attribute 'getPID' )

[error] switchApp: could not identify process with search name 'cids'

Help me to resolve the issue.

Thanks in advance !

Reagrds,
Rathinavel

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:

This question was reopened

Revision history for this message
RaiMan (raimund-hocke) said :
#1

sorry for the glitch:
getPid() is not implemented for Linux.

Try another solution for that on Linux.

Revision history for this message
Rathinavel (ratnasatya) said :
#3

Is there anyway to check, particular window is running or not in Linux......

Revision history for this message
RaiMan (raimund-hocke) said :
#4

the basic App implementation internally uses wmctrl

You have to check the other App features or issue a wmctrl command using subprocess.

Can you help with this problem?

Provide an answer of your own, or ask Rathinavel for more information if necessary.

To post a message you must log in.