Appium desktop linux install

Appium desktop linux install

Not much gossip, just take notes! ! !

(1) Install NodeJs: Whether you use the appium command line tool or the appium-desktop tool, you must first install the appropriate NodeJs tool. From the NodeJs websitedownload linkDownload the installation package, according to the websiteInstallation guideInstall nodejs.

(2) Configuration instruction tool: After installing nodejs according to step (1), then according toAppium installation guide in github websiteof $ npm install -g appium Instruction to install appium, found that there is no folder access permission under nodejs toolkit; then use $ sudo npm install -g appium Instructions to install, found no No npm command for root user , The solution to this problem is Link the npm command path to the «/usr/bin» directory:

(3) Installation appium command line tool :use npm command It is not easy to use when installing appium, there are many warnings and errors in the installation log, you can use cnpm command installation:

use cnpm command The installation is smooth,More about cnpm commands。

(4) Installation adb tool :The above steps (1) (2) can be appium command line tool Successful installation; to realize the Android real machine connection, but also Install ADB tools 。

Then configure ANDROID_HOME Environment variables, the environment variable configuration will not go into details.

(5) Configuration JAVA_HOME Environment variable: After using adb to obtain the required parameters of the mobile phone, when starting the session of the mobile phone and appium, an error message is required JAVA_HOME Environment variables, so you need to install Java SDK , I use apt-get command line Installed and then configured JAVA_HOME 。

(6) Step (2) is to install appium command tool Way, there can be installed appium-desktop interface tool Instead, the other steps above remain unchanged.

(7) I thought that appium could be started for normal use, but unfortunately after the installation of the above steps, the real machine connection was still not realized, and an error was reported when the connection was started An unknown server-side error occurred while processing the command. Original error: Could not sign with default certificate. Original error Command ‘/usr/lib/jvm/java-11-openjdk-amd64/bin/java -jar /tmp/.mount_AppiumBatHky/resources/app/node_modules/appium/node_modules/appium-adb/jars/sign.jar /tmp/20191022-6721-lflln8.lhl5/appium-uiautomator2-server-debug-androidTest.apk —override’ exited with code 1 , The problem solving process is as follows:

I thought that the permissions were not enough, but the problem was not resolved after inspection; then I checked the appium log and found a series of Fail Information, solve the problem in turn:

in Android SDK tool path Not found apkanalyzer tool , The reason is that the above step (4) uses the command to install adb tool Led to the lack of aapt tool use $ sudo apt-get install aapt The command can solve it, but install apkanalyzer tool Can’t solve it. Suggest fromGoogle website command-tools download address Download the android sdk compressed package , Then unzip to android-sdk path Just download.
will be found shortly afterwards apksigner tool with zipalign tool , I use these two instruction tools $ sudo apt-get install Command to install, and then add these two command tools to Under the tools package under the android-sdk path OK.

(8) At this point, after the above installation and configuration, the appium command line Tool (or appium-desktop interface tool ) The real machine connection can be carried out normally.

Читайте также:  Ошибка 0xc0000225 при загрузке windows 10 как исправить

(9) The last success chart! ! !

Источник

Appium desktop linux install

This doc will get you up and running with a simple Appium test and introduce you to some basic Appium ideas. For a more comprehensive introduction to Appium concepts, please check out the conceptual introduction.

Installing Appium

Appium can be installed in one of two ways: via NPM or by downloading Appium Desktop, which is a graphical, desktop-based way to launch the Appium server.

Installation via NPM

If you want to run Appium via an npm install , hack with Appium, or contribute to Appium, you will need Node.js and NPM (use nvm, n, or brew install node to install Node.js. Make sure you have not installed Node or Appium with sudo , otherwise you’ll run into problems). We recommend the latest stable version, though Appium supports Node 10+.

The actual installation is as simple as:

Installation via Desktop App Download

Simply download the latest version of Appium Desktop from the releases page.

Driver-Specific Setup

You probably want to use Appium to automate something specific, like an iOS or Android application. Support for the automation of a particular platform is provided by an Appium «driver». There are a number of such drivers that give you access to different kinds of automation technologies, and each come with their own particular setup requirements. Most of these requirements are the same requirements as for app development on a specific platform. For example, to automate Android applications using one of our Android drivers, you’ll need the Android SDK configured on your system.

At some point, make sure you review the driver documentation for the platform you want to automate, so your system is set up correctly:

  • The XCUITest Driver (for iOS and tvOS apps)
  • The Espresso Driver (for Android apps)
  • The UiAutomator2 Driver (for Android apps)
  • The Windows Driver (for Windows Desktop apps)
  • The Mac Driver (for Mac Desktop apps)

Verifying the Installation

To verify that all of Appium’s dependencies are met you can use appium-doctor . Install it with npm install -g appium-doctor , then run the appium-doctor command, supplying the —ios or —android flags to verify that all of the dependencies are set up correctly.

Appium Clients

When all is said and done, Appium is just an HTTP server. It sits and waits for connections from a client, which then instructs Appium what kind of session to start and what kind of automation behaviors to enact once a session is started. This means that you never use Appium just by itself. You always have to use it with a client library of some kind (or, if you’re adventurous, cURL!).

Luckily, Appium speaks the same protocol as Selenium, called the WebDriver Protocol. You can do a lot of things with Appium just by using one of the standard Selenium clients. You may even have one of these on your system already. It’s enough to get started, especially if you’re using Appium for the purpose of testing web browsers on mobile platforms.

Appium can do things that Selenium can’t, though, just like mobile devices can do things that web browsers can’t. For that reason, we have a set of Appium clients in a variety of programming languages, that extend the regular old Selenium clients with additional functionality. You can see the list of clients and links to download instructions at the Appium clients list.

Before moving forward, make sure you have a client downloaded in your favorite language and ready to go.

Starting Appium

Now we can kick up an Appium server, either by running it from the command line like so (assuming the NPM install was successful):

Читайте также:  Учебники по windows для чайников

Or by clicking the huge Start Server button inside of Appium Desktop.

Appium will now show you a little welcome message showing the version of Appium you’re running and what port it’s listening on (the default is 4723 ). This port information is vital since you will have to direct your test client to make sure to connect to Appium on this port. If you want to change, the port, you can do so by using the -p flag when starting Appium (be sure to check out the full list of server parameters).

Running Your First Test

In this section we’ll run a basic «Hello World» Android test. We’ve chosen Android because it’s available on all platforms. We’ll be using the UiAutomator2 Driver so ensure you’ve read through that doc and gotten your system set up appropriately. We’ll also be using JavaScript as the language so that we don’t have to deal with additional dependencies.

(Chances are, you’ll eventually want to automate something other than Android using something other than JavaScript. In that case, check out our sample-code, which has code samples for many languages and platforms.)

Prerequisites

  • We’ll assume you have an Android 8.0 emulator configured and running (the example will work on lower versions, just fix the version numbers accordingly)
  • We’ll assume you have this test APK downloaded and available on your local filesystem

Setting up the Appium Client

For this example, we’ll use Webdriver.io as our Appium client. Create a directory for this example, then run:

Once the project has been initialized, install webdriverio :

Session Initialization

Now we can create our test file, named index.js , and initialize the client object:

The next thing we need to do is to start an Appium session. We do this by defining a set of server options and Desired Capabilities, and calling wdio.remote() with them. Desired Capabilities are just a set of keys and values that get sent to the Appium server during session initialization, that tell Appium what kind of thing we want to automate. The minimum set of required capabilities for any Appium driver should include:

  • platformName : the name of the platform to automate
  • platformVersion : the version of the platform to automate
  • deviceName : the kind of device to automate
  • app : the path to the app you want to automate (but use the browserName capability instead in the case of automating a web browser)
  • automationName : the name of the driver you wish to use

For more information on Desired Capabilities and for a list of all the Capabilities you can use in Appium, see our Capabilities doc.

So here is how we begin to construct a session in our test file:

Running Test Commands

You can see that we’ve specified our Appium port and also constructed our Desired Capabilities to match our requirements (but don’t forget to replace the path with the actual download path for your system). We’ve registered this fact with webdriverio and now have a client object which will represent the connection to the Appium server. From here, we can go ahead and start the session, perform some test commands, and end the session. In our case, we will simply type into a text field and check that the correct text was entered:

What’s going on here is that after creating a session and launching our app, we’re instructing Appium to find an element in the app hierarchy and type into it. The same field is then queried for its text, which is asserted to be what we expect.

Читайте также:  Dns record windows server

Putting it all together, the file should look like:

You can try and run this test on your own. Simply save it and execute it using node :

If everything is set up correctly, you’ll see Appium begin spitting out lots of logs and eventually the app will pop up on the screen and start behaving as if an invisible user were tapping on it!

What’s Next

We’ve only scratched the surface of what you can do with Appium. Check out these resources to help you on your journey:

    The Appium command reference — learn about what commands are available, how to use them with specific client libraries, etc.

The sample-code directory, where lots more code samples are available

discuss.appium.io — this is the Appium community forum, which is a great first place to go for help getting started, or if you think you may have run into a bug

  • The Appium issue tracker — let the Appium maintainers know here if you think you’ve found a bug
  • Источник

    AppImageHub

    AppImage applications for Linux without installation

    appium-desktop

    Graphical interface for the Appium server, and an app inspector

    Usage

    appium-desktop is available as an AppImage which means «one app = one file», which you can download and run on your Linux system while you don’t need a package manager and nothing gets changed in your system. Awesome!

    AppImages are single-file applications that run on most Linux distributions. Download an application, make it executable, and run! No need to install. No system libraries or system preferences are altered. Most AppImages run on recent versions of Arch Linux, CentOS, Debian, Fedora, openSUSE, Red Hat, Ubuntu, and other common desktop distributions.

    Running appium-desktop on Linux without installation

    Behold! AppImages are usually not verified by others. Follow these instructions only if you trust the developer of the software. Use at your own risk!

    Download the appium-desktop AppImage and make it executable using your file manager or by entering the following commands in a terminal:

    Then double-click the AppImage in the file manager to open it.

    Sandboxing appium-desktop

    If you want to restrict what appium-desktop can do on your system, you can run the AppImage in a sandbox like Firejail. This is entirely optional and currently needs to be configured by the user.

    Updating appium-desktop

    If you would like to update to a new version, simply download the new appium-desktop AppImage.

    Integrating AppImages into the system

    If you would like to have the executable bit set automatically, and would like to see appium-desktop and other AppImages integrated into the system (menus, icons, file type associations, etc.), then you may want to check the optional appimaged daemon.

    Note for application authors

    Thanks for distributing appium-desktop in the AppImage format for all common Linux distributions. Great! Here are some ideas on how to make it even better.

    Pro Tips for further enhancing the appium-desktop AppImage

    Please consider to add update information to the appium-desktop AppImage and ship a .zsync file so that it can be updated using AppImageUpdate. Tools like appimagetool and linuxdeployqt can do this for you easily.

    Improve this entry by shipping an AppStream metainfo file inside the AppImage in the usr/share/metainfo directory. We have an online tool that makes it easy to make one.

    The screenshot for appium-desktop has been automatically taken during a fully automated test. You can specify the URL to a nicer one by shipping an AppStream metainfo file.

    If you would like to see a donation link for the application here, please include one in the AppStream data.

    Источник

    Оцените статью