How to launch an application on iPhone attached with VNC viewer through sikuli

Asked by Bikash Upadhyaya

Hi,
I want to launch an application which is installed in iphone through sikuli.

My scenario is like this:
1. I have sikuli installed in my machine
2. Iphone is connected to my machine through WiFi
3. Iam operating my iphone [viewing,accessing application] via mouse or keyboard of my machine [with the help of veency & Vnc viewer]
4. iphone ip address is 1.123.2.4
5. with the help of winscp i found the application path of safari is "/Applications/MobileSafari.app"

Now, i want to launch safari with the help of sikuli code.

Any kind of help will be appreciated.

Thankyou

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
TestMechanic (ndinev) said :
#1

Unless you have a special reason to do this via non UI interface, you can lunch it by clicking on the safari icon via the vnc.

BTW sikuli works great for testing on mobile devices - you just need to root the device and install VNC server.

Revision history for this message
Bikash Upadhyaya (coolmindedbikash) said :
#2

Thankyou for your reply Dinev.
Actually, i have jailbreak my iphone [in android we need to root it]. And iam able to click on safari with mouse click and even with the help of Sikuli. [with click(image) command].
But i want to launch an application installed in iPhone as we launch desktop application by openApp() command.

Revision history for this message
TestMechanic (ndinev) said :
#3

I do not know if this is possible at all. The good question here is what will be the benefit giving the fact that via UI it is possible ... via some "command" it may be hard to impossible.

I am questioning the need to start safari not via UI ... because if you do let say testing of a web site this is the way users will open the browser.

What you can do is to create functions openSafari() and implement opening via UI commands and then use this function in all your scripts. Again I am not sure why you need to skip UI opening of Safari...

Revision history for this message
Bikash Upadhyaya (coolmindedbikash) said :
#4

The reason is:
We wont be knowing on which screen of the iPhone Safari icon(or any application) available.
Hence, only to launch an application need to:
1. Slide the screen
2. Check whether that image is available after performing every sliding operation
3. At last when i get the application icon
4. We have to click on it to launch the application

So, Rather following this long step if we can directly launch an application of iPhone like what we do to launch an application [desktop] "openApp" then it will be better.

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

Since your iPhone is lailbreaked, just set up some ssh connection (or any other terminal like session) and use the open command (if it is available on iOS) or any other way, to start Safari over this connection.

In Sikuli script use os.popen or subprocess to setup and drive the connection.

Can you help with this problem?

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

To post a message you must log in.