AppiumLibrary, RobotFramework. How to increase default new command time out from 60 sec to may be 300 etc.

772 views
Skip to first unread message

Umair Sabzwari

unread,
May 2, 2016, 2:42:09 PM5/2/16
to robotframework-users
I am using robotframework and appiumlibrary to automate GUI app on android device.

I noticed that appium always kill the app after 60 sec, from appium logs it shows


> info: [debug] Didn't get a new command in 60 secs, shutting down...
> info: Shutting down appium session
> info: [debug] Pressing the HOME button
> info: [debug] executing cmd: C:\Android\sdk\platform-tools\adb.exe -s 4300bd0401d750db shell "input keyevent 3"
> info: [debug] Stopping logcat capture
> info: [debug] Logcat terminated with code null, signal SIGTERM
> info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"shutdown"}
> info: [debug] [BOOTSTRAP] [debug] Got command of type SHUTDOWN
> info: [debug] [BOOTSTRAP] [debug] Returning result: {"value":"OK, shutting down","status":0}
> info: [debug] [BOOTSTRAP] [debug] Closed client connection

After this my pybot command just hands in there, I have to hit the stop button on appium server manually in order pybot command to return to console normally.
My question is that how to increase new command time out with AppiumLibrary 
I am opening application with the following keyword:

Open Device Portal Samsung Tab 3
Open Application http://127.0.0.1:4723/wd/hub platformName=Android platformVersion=4.4.2 deviceName=4300bd0401d750db appPackage=com.xxx.workbench appActivity=com.com.xxx.workbench.support.WBBrowser
set appium timeout 2m


~Umair.

Jari Nurminen

unread,
May 3, 2016, 12:51:37 AM5/3/16
to umair.s...@gmail.com, robotframework-users
Hi Umair,
 
have a look at:
the "--command-timeout" server-flag (http://appium.io/slate/en/v1.2.0/#server-flags) and "newCommandTimeout" capability (http://appium.io/slate/en/v1.2.0/#appium-server-capabilities)
 
cheerio,
- Jari -
--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-u...@googlegroups.com.
To post to this group, send email to robotframe...@googlegroups.com.
Visit this group at https://groups.google.com/group/robotframework-users.
For more options, visit https://groups.google.com/d/optout.

Umair Sabzwari

unread,
May 3, 2016, 1:52:44 AM5/3/16
to Jari Nurminen, robotframework-users

Thanks Jari, Since I am new to robotframework how can I set those capabilities through it?

Jari Nurminen

unread,
May 3, 2016, 1:59:34 AM5/3/16
to Umair Sabzwari, robotframework-users
Hi Umair,
 
actually this is not a robotframework thing, those are Appium features:
"--command-timeout" is an Appium command line argument i.e. use it in the command that starts the appium server
"newCommandTimeout" like any other capability = use it when starting the application e.g. "Open Application    http://127.0.0.1:4723/wd/hub    newCommandTimeout=120    platformName=Android  ..."

Umair Sabzwari

unread,
May 3, 2016, 7:25:10 AM5/3/16
to Jari Nurminen, robotframework-users

Thank you for the help and solution Jeri.

Reply all
Reply to author
Forward
0 new messages