observe hidden window while working myself on the screen
I\m using Opera web browser. It is not using windows like IE, it uses tabs.
When I use focus on app.window() it seems to treat only the window and not the tab. So I need to have the right tab in focus, for it to observe anything.
it recognizes/finds the tab title, so why would it not focus on the right tab?
my question is, how do I get it to observe one tab, when I'm working in another tab?
code snippet:
while 1:
myApp = App("title here")
myRegion = myApp.window()
if not myRegion:
break
myApp.focus() <---------- doesn't do anything, not bringing it to front, besides I want the tab to come to front not the window
while not exists("X.png"): <-------- does not fire unless its showing on screen
wait(30)
myRegion.
click("X.png") <--------------- fails the second time read below
I have problem with not being able to stop the script. alt+c or alt+shift+c do not work.
but also there is a problem second time it is executing the loop, it tries to click twice and fails. thus I get back the IDE:
lets say the window IS current
it then detects the X
highligts window and clicks X and that window goes away
then it sleeps till next time
it finds X
it highlights and clicks X
window dissapears
then it highlights and tries to click... then it fails..
fyi: X is closing a window inside a game in the browser. its not a real windows window.
[error] Error message: Traceback (most recent call last):
File "C:\DOCUME~
click("X.png")
Line 1, in file C:\DOCUME~
at org.sikuli.
at org.sikuli.
at org.python.
at sun.reflect.
at sun.reflect.
at sun.reflect.
at java.lang.
org.sikuli.
Line 1, in file C:\DOCUME~
writing only my first lines of code I don't know, is it my code or sikuli that is buggy? :D
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Anton for more information if necessary.