[check] App.open should support command line options on Windows

Bug #701363 reported by Bulkan
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
SikuliX
In Progress
Medium
RaiMan

Bug Description

Environement
-----------------
Windows 7
Sikuli-X-1.0rc1-win32
JAVA_HOME = C:\Program Files (x86)\Java\jre6

Trying to do the following does not work, Firefox does not start up.

App.open(r"firefox -profile C:\testing\FF\SikuliUser")

Looking at the code (Win32Util.cc) it seems like there is some quoting issues when calling CreateProcess

http://msdn.microsoft.com/en-us/library/ms682425(v=vs.85).aspx

Tags: fkt-app
RaiMan (raimund-hocke)
summary: - App.open does not support command line options on Windows
+ X 1.0rc1 App.open does not support command line options on Windows
RaiMan (raimund-hocke)
Changed in sikuli:
importance: Undecided → Wishlist
summary: - X 1.0rc1 App.open does not support command line options on Windows
+ [request] App.open should support command line options on Windows
Revision history for this message
Bulkan (bulkan) wrote : Re: [request] App.open should support command line options on Windows

I can't even start firefox with a URL passed in i.e

App.open("firefox http://localhost:8080")

So I need to add steps to click on URL bar and type in the URL

Revision history for this message
RaiMan (raimund-hocke) wrote :

As stated above: this is not possible yet! only path to a program or part of the window title for open windows is possible.

look: http://sikuli.org/docx/globals.html#controlling-applications-and-their-windows

how to start applications on Windows.

to get FF to open a web page tis is the easiest way:

App.focus("Firefox")
type('l', KEY_CTRL) # goes to address field and selects content
paste("http://localhost:8080/")
type(Key.ENTER)

Changed in sikuli:
status: New → Fix Committed
milestone: none → x1.0-rc3
RaiMan (raimund-hocke)
Changed in sikuli:
status: Fix Committed → Fix Released
Revision history for this message
Tom Hallett (tomhallett) wrote :

Hi, sorry to bump this old thread.

This issue was marked "Fix Committed" and "Fix Released" for x1.0-rc3, but I'm unclear how it was fixed. What is the recommended usage?

Mac OS X: 10.6.7
Sikuli: X-1.0rc3 (r930)
Firefox: 19.0.2

The following works: App.open("Firefox")
But this doesn't (which is what Bulkan recommended he'd like todo): App.open("Firefox http://cnn.com")

The error I get is:

[log] App.open Firefox http://cnn.com(0)
[log] openApp: "Firefox http://cnn.com"
[error] App.open failed: Firefox http://cnn.com not found

Does "issue fixed" mean the correct way todo this task is App.focus("Firefox"), type("l", KEY_CTRL), paste("http://cnn.com"), etc...? Or is there a way to open an app with parameters and it's just not documented?

Thanks a lot! I'm really enjoying sikuli!
Tom

RaiMan (raimund-hocke)
Changed in sikuli:
status: Fix Released → In Progress
assignee: nobody → RaiMan (raimund-hocke)
milestone: x1.0-rc3 → x1.0
Revision history for this message
Tom Hallett (tomhallett) wrote :

RaiMan,

Thanks for reopening this and working on it! I'm working on an open source rubygem for sikuli which makes integrating sikuli in a ruby project a breeze! This fix will really help me open browser in a clean state and with advanced command line arguments.

Thanks again,
Tom
github.com/tommyh

RaiMan (raimund-hocke)
Changed in sikuli:
importance: Wishlist → Low
milestone: x1.0 → x1.1
tags: added: fkt-app
RaiMan (raimund-hocke)
Changed in sikuli:
milestone: 1.1.0 → 1.2.0
RaiMan (raimund-hocke)
Changed in sikuli:
milestone: 2.0.0 → 2.1.0
summary: - [request] App.open should support command line options on Windows
+ [check] App.open should support command line options on Windows
RaiMan (raimund-hocke)
Changed in sikuli:
importance: Low → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.