Re: [Sikuli-driver] [Question #274127]: Not working methods of the class App - close(), focus(),

2015-11-18 Thread Eugene S
Question #274127 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/274127

Eugene S proposed the following answer:
You are having this problem because of how you define your firefox
variable.

When you write:
firefox = App.open(r"C:\Program Files (x86)\Mozilla Firefox\firefox.exe")

you assign the output of whatever value that is created as a result of
EXECUTING the FireFox browser

The error:
[error] AttributeError ( 'NoneType' object has no attribute 'close' )

says exactly that.


To make it work properly, you must do it like was offered by @masuo and first 
create an instance of the type App. The you will be able to use the App methods 
on it.

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

___
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


Re: [Sikuli-driver] [Question #274127]: Not working methods of the class App - close(), focus(),

2015-11-16 Thread masuo
Question #274127 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/274127

Status: Open => Answered

masuo proposed the following answer:
I can't run previous version of SikuliX now, but the following code works 
correctly on SikuliX1.1.0 .
[Environment:]Windows7, SikuliX1.1.0
[code:]
myApp = App("firefox")
App.open(r"C:\Program Files\Mozilla Firefox\firefox.exe")
while not myApp.isRunning():
wait(1)
myApp.focus()
myApp.close()

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

___
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


Re: [Sikuli-driver] [Question #274127]: Not working methods of the class App - close(), focus(),

2015-11-13 Thread masuo
Question #274127 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/274127

masuo posted a new comment:
I can't run previous  version of SikuliX now, but the following code
works correctly on SikuliX1.1.0 .

[Environment:]Windows7, SikuliX1.1.0

[code:]
myApp = App("firefox")
App.open(r"C:\Program Files\Mozilla Firefox\firefox.exe")
while not myApp.isRunning():
wait(1)
myApp.focus()
myApp.close()

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

___
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