Coder Social home page Coder Social logo

Comments (7)

extr3mal avatar extr3mal commented on June 15, 2024

Also there are no options for launching app using bundleid and udid on iOS devices

from robotframework-appiumlibrary.

jollychang avatar jollychang commented on June 15, 2024

@extr3mal thanks for your suggestion , I will check that~

from robotframework-appiumlibrary.

extr3mal avatar extr3mal commented on June 15, 2024

To enable backgrounding just add in _applicationmanagement.py following code :

 def background_app(self,time):
        """
        Background the app
        """
        self._current_application().background_app(time)

To enable udid and bundle id it will require reconstructing of open_application method inside same file . I hard coded my code inside of it so it can launch apps from real device but that method isn't good because it does not fit all possible usage cases

def open_application(self, remote_url, platform_name, platform_version, device_name, automation_name=None, app_package=None, app_activity=None, alias=None, udid=None, bundleid=None):
        """Opens a new application to given Appium server.

        | *Option*          | *Man.* | *Description* |
        | remote_url        | Yes    | Appium server url |
        | platform_name     | Yes    | platform name, either "iOS" or "Android" |
        | platform_version  | Yes    | platform version, the mobile OS version you want |
        | device_name       | Yes    | Device name, the kind of device you want, like "iPhone Simulator" |        
        | app               | Yes    | Android/iOS application path |
        | automation_name   | no     | "Selendroid" if you want to use Selendroid, otherwise, this can be omitted |
        | app_package       | no     | Android application package name |
        | app_activity      | no     | Android application activity name |
        | udid              | no     | iOS Real Device UDID |
        | bundleid          | no     | iOS Application Bundle ID |

        Examples:
        | Open Application | http://localhost:4723/wd/hub | iOS | 7.0 | iPhone Simulator | your.app |
        | Open Application | http://localhost:4723/wd/hub | Android | 4.2 | emulator:5554 | OrangeDemoApp.apk | Selendroid | com.test.orangedemo | .MainActivity |
        """
        desired_caps = {}
        desired_caps['platformName'] = platform_name
        desired_caps['platformVersion'] = platform_version
        desired_caps['deviceName'] = device_name
        #desired_caps['app'] = app
        desired_caps['automationName'] = automation_name
        # desired_caps['browserName'] = ''
        desired_caps['appPackage'] = app_package
        desired_caps['androidActivity'] = app_activity
        desired_caps['udid'] = udid
        desired_caps['bundleid'] = bundleid
        desired_caps['takesScreenshot'] = 'true'

Hope my code suggestions wil help you somehow

from robotframework-appiumlibrary.

jollychang avatar jollychang commented on June 15, 2024

it's fine
Could you send me a pull request for these?

On 2014Äê7ÔÂ29ÈÕ, at 18:53, extr3mal [email protected] wrote:

To enable backgrounding just add in _applicationmanagement.py following code :

def background_app(self,time):
"""
Background the app
"""
self._current_application().background_app(time)

To enable udid and bundle id it will require reconstructing of open_application method inside same file . I hard coded my code inside of it so it can launch apps from real device but that method isn't good because it does not fit all possible usage cases

def open_application(self, remote_url, platform_name, platform_version, device_name, automation_name=None, app_package=None, app_activity=None, alias=None, udid=None, bundleid=None):
"""Opens a new application to given Appium server.

| *Option*          | *Man.* | *Description* |
| remote_url        | Yes    | Appium server url |
| platform_name     | Yes    | platform name, either "iOS" or "Android" |
| platform_version  | Yes    | platform version, the mobile OS version you want |
| device_name       | Yes    | Device name, the kind of device you want, like "iPhone Simulator" |        
| app               | Yes    | Android/iOS application path |
| automation_name   | no     | "Selendroid" if you want to use Selendroid, otherwise, this can be omitted |
| app_package       | no     | Android application package name |
| app_activity      | no     | Android application activity name |
| udid              | no     | iOS Real Device UDID |
| bundleid          | no     | iOS Application Bundle ID |

Examples:
| Open Application | http://localhost:4723/wd/hub | iOS | 7.0 | iPhone Simulator | your.app |
| Open Application | http://localhost:4723/wd/hub | Android | 4.2 | emulator:5554 | OrangeDemoApp.apk | Selendroid | com.test.orangedemo | .MainActivity |
"""
desired_caps = {}
desired_caps['platformName'] = platform_name
desired_caps['platformVersion'] = platform_version
desired_caps['deviceName'] = device_name
#desired_caps['app'] = app
desired_caps['automationName'] = automation_name
# desired_caps['browserName'] = ''
desired_caps['appPackage'] = app_package
desired_caps['androidActivity'] = app_activity
desired_caps['udid'] = udid
desired_caps['bundleid'] = bundleid
desired_caps['takesScreenshot'] = 'true'

¡ª
Reply to this email directly or view it on GitHub.

from robotframework-appiumlibrary.

extr3mal avatar extr3mal commented on June 15, 2024

i can but there is an architecture problem with conection opener it must be remade to fit all usage cases

from robotframework-appiumlibrary.

extr3mal avatar extr3mal commented on June 15, 2024

Also reset keyword shows me strange notice
20140730 13:31:03.969 : FAIL : WebDriverException: Message: u'Not yet implemented. Please help us: http://appium.io/get-involved.html'

from robotframework-appiumlibrary.

jollychang avatar jollychang commented on June 15, 2024

fixed above, close

from robotframework-appiumlibrary.

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.