sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #13148
Re: [Question #208456]: Problem with InternetExplorer 9 app.focus
Question #208456 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/208456
RaiMan posted a new comment:
The App class's internal implementation is system dependent and same
goes for the behavior.
On Windows, it is best to use
App.open(path_to_executable) # which is a class method (Java static).
and then define an App object based on the window title (or significant parts of it to group windows)
browser = App("Internet Explorer") # just as Bekir suggested
So in your case, your coding could be: (not sure about indentation)
name = "Internet Explorer" # somewhere, somehow before usage
browserExecutable = 'c:\\Program Files (x86)\\Internet Explorer\\iexplore.exe'
app = App(name)
if not app.window(): # no window found - browser is not open
print "## Opening new browser window ##"
App.open(browserExecutable) # use static class method
wait(3)
# while not app.window(): wait(1) # would be more general
# maximize the screen
type(Key.UP, KEY_WIN)
else: app.focus() # only needed if already open
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.