Method: Appium::Core::Base::Driver#background_app

Defined in:
lib/appium_lib_core/common/base/driver.rb

#background_app(duration = 0) ⇒ String

Backgrounds the app for a set number of seconds. This is a blocking application

Examples:


@driver.background_app
@driver.background_app(5)
@driver.background_app(-1) #=> the app never come back. https://github.com/appium/appium/issues/7741

Parameters:

  • duration (Integer) (defaults to: 0)

    How many seconds to background the app for.

Returns:

  • (String)


604
605
606
# File 'lib/appium_lib_core/common/base/driver.rb', line 604

def background_app(duration = 0)
  @bridge.background_app(duration)
end