Coder Social home page Coder Social logo

Comments (6)

christian-bromann avatar christian-bromann commented on July 20, 2024

It would be actually nice if this could be a native Appium command. I wonder what Appium does when calling the refresh WebDriver command? We could just run above code in the Appium server.

@jlipps what do you think?

from webdriverio.

jlipps avatar jlipps commented on July 20, 2024

I guess there's no reason it couldn't be in Appium itself. What do you think @mykola-mokhnach?

from webdriverio.

mykola-mokhnach avatar mykola-mokhnach commented on July 20, 2024

I guess there's no reason it couldn't be in Appium itself. What do you think @mykola-mokhnach?

I don't see how such API could look like. In Android and iOS extensions to run apps work differently, not saying about other drivers.

For example, in order to restart an iOS app one could perform mobile: launchApp and xctest automatically terminates it if it is already running.
In Android for the mobile: startActivity API one must set stop arg to true in order for the activity to be restarted upon launch.

from webdriverio.

christian-bromann avatar christian-bromann commented on July 20, 2024

I don't see how such API could look like.

Ideally it would be great if we could the operation of restarting an app within the refresh WebDriver command (/session/{session id}/refresh). To simplify this, it would require the xcuitest and uiautomator2 driver to keep the information which app was or is currently opened. Can you confirm if these drivers are capable to do that? Maybe Appium could call getCurrentActivity for example in Android as part of the execution.

from webdriverio.

mykola-mokhnach avatar mykola-mokhnach commented on July 20, 2024

Unfortunately it's not so simple. The current activity might not be launchable. Also, we don't know what/if we need to apply any additional arguments or environment variables on startup.

from webdriverio.

christian-bromann avatar christian-bromann commented on July 20, 2024

The current activity might not be launchable.

In this case the refresh command should/would fail.

Also, we don't know what/if we need to apply any additional arguments or environment variables on startup.

Is there a way to pull these information before we shut down the app and use them when starting the app again?

from webdriverio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.