Giter Club home page Giter Club logo

appium-idb's Introduction

Stand With Ukraine

Appium

Cross-platform test automation for native, hybrid, mobile web and desktop apps.

NPM version Monthly Downloads FOSSA Status StandWithUkraine


Documentation | Get Started | Ecosystem | Changelog | Roadmap | Discussion Forum


Appium is an open-source automation framework that provides WebDriver-based automation possibilities for a wide range of different mobile, desktop and IoT platforms. Appium is modular and extensible, and supports multiple programming languages, which means there is an entire ecosystem of related software:

  • Drivers add support for automating specific platforms
  • Clients allow writing Appium tests in your programming language of choice
  • Plugins allow to further extend Appium functionality

Migrating From Appium 1 to Appium 2

As of January 1st, 2022, the Appium team no longer maintains or supports Appium 1. All officially supported platform drivers are only compatible with Appium 2.

Please read the Migration Guide if you are still using Appium 1.

Warning

If you use Appium Desktop or Appium Server GUI, you will not be able to upgrade to Appium 2, as both of these tools have been deprecated. Please use Appium Inspector in combination with a standalone Appium 2 server.

Installation

Appium can be installed using npm (other package managers are not currently supported). Please check the installation docs for the system requirements and further information.

If upgrading from Appium 1, make sure Appium 1 is fully uninstalled (npm uninstall -g appium). Unexpected errors might appear if this has not been done.

npm i -g appium

Note that this will only install the core Appium server, which cannot automate anything on its own. Please install drivers for your target platforms in order to automate them.

Drivers

Appium supports app automation across a variety of platforms, like iOS, Android, macOS, Windows, and more. Each platform is supported by one or more "drivers", which know how to automate that particular platform. You can find a full list of officially-supported and third-party drivers in Appium Ecosystem's Drivers page.

Driver management is done using Appium's Extension command-line interface:

# Install an official driver from npm (see documentation for a list of such drivers)
appium driver install <driver-name>
# Install any driver from npm
appium driver install --source=npm <driver-name>
# See documentation for installation from other sources

# List already installed drivers
appium driver list --installed
# Update a driver (it must be already installed)
# This will NOT update the major version, in order to prevent breaking changes
appium driver update <driver-name>
# Update a driver to the most recent version (may include breaking changes)
appium driver update <driver-name> --unsafe
# Uninstall a driver (it won't last forever, will it?)
appium driver uninstall <driver-name>

Clients

Client libraries enable writing Appium tests in different programming languages. There are officially-supported clients for Java, Python, Ruby, and .NET C#, as well as third-party clients for other languages. You can find a full list of clients in Appium Ecosystem's Clients page.

Plugins

Plugins allow you to extend server functionality without changing the server code. The main difference between drivers and plugins is that the latter must be explicitly enabled on Appium server startup (all installed drivers are enabled by default):

appium --use-plugins=<plugin-name>

You can find a full list of officially-supported and third-party plugins in Appium Ecosystem's Plugins page.

Similarly to drivers, plugin management is also done using Appium's Extension command-line interface:

# Install an official plugin from npm (see documentation for a list of such plugins)
appium plugin install <plugin-name>
# Install any plugin from npm
appium plugin install --source=npm <plugin-name>
# See documentation for installation from other sources

# List already installed plugins
appium plugin list --installed
# Update a plugin (it must be already installed)
# This will NOT update the major version, in order to prevent breaking changes
appium plugin update <plugin-name>
# Update a plugin to the most recent version (may include breaking changes)
appium plugin update <plugin-name> --unsafe
# Uninstall a plugin
appium plugin uninstall <plugin-name>

Server Command Line Interface

In order to start sending commands to the Appium server, it must be running on the URL and port where your client library expects it to listen. Appium's command-line interface is used to launch and configure the server:

# Start the server on the default host (0.0.0.0) and port (4723)
appium server
# You can also omit the 'server' subcommand
appium
# Start the server on the given host, port and use a custom base path prefix (the default prefix is '/')
appium --address 127.0.0.1 --port 9000 --base-path /wd/hub

Appium supports execution of parallel server processes, as well as parallel driver sessions within a single server process. Refer the corresponding driver documentations regarding which mode is optimal for the particular driver or whether it supports parallel sessions.

Why Appium?

  1. You usually don't have to recompile your app or modify it in any way, due to the use of standard automation APIs on all platforms.
  2. You can write tests with your favorite dev tools using any WebDriver-compatible language such as Java, Python, Ruby and C#. There are also third party client implementations for other languages.
  3. You can use any testing framework.
  4. Some drivers like xcuitest and uiautomator2 have built-in mobile web and hybrid app support. Within the same script, you can switch seamlessly between native app automation and webview automation, all using the WebDriver model that's already the standard for web automation.
  5. You can run your automated tests locally and in a cloud. There are multiple cloud providers that support various Appium drivers (mostly targeting iOS and Android mobile automation).
  6. Appium Inspector can be used to visually inspect the page source of applications across different platforms, facilitating easier test development.

Investing in the WebDriver protocol means you are betting on a single, free, and open protocol for testing that has become a web standard. Don't lock yourself into a proprietary stack.

For example, if you use Apple's XCUITest library without Appium, you can only write tests using Obj-C/Swift, and you can only run tests through Xcode. Similarly, with Google's UiAutomator or Espresso, you can only write tests in Java/Kotlin. Appium opens up the possibility of true cross-platform native app automation, for mobile and beyond!

If you are looking for a more comprehensive description of what this is all about, please read our documentation on How Does Appium Work?.

License

Apache-2.0

FOSSA Status

appium-idb's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar dpgraham avatar greenkeeper[bot] avatar imurchie avatar kazucocoa avatar mykola-mokhnach avatar rerorero avatar semantic-release-bot avatar umutuzgur avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

appium-idb's Issues

Could not connect to simulator - Make sure both host and port are correct and reachable (IDB)

I install Appium 1.15 and install appium IDB. However, it ended up with the error as the above subject title.

The original report is filed in
https://github.com/appium/appium-desktop/issues/1123

Launching the simulator will have an error in appium
Make sure both host and port are correct and reachable. The workaround is to uninstall IDB.

This is working when I have xcode 10 and older appium 1.41. The setup is correct as Appium-doctor indicate it is configurate correctly.

This is my desired capabilities (in form of json)
"deviceName": "iPhone 11",
"platformName": "IOS",
"automationName": "XCuiTest",
"app": /Users//johnlim//Fintool//API//app//FintoolTracker-1.app",
"platformVersion" : "13.1"

Environment

Appium CLI
Mac OS 10.15 Catalina
Appium 15.0 CLI

Below is the full appium log :

https://gist.github.com/johnlim-tech/3dd93915d9be3c3df22b0fdcdaf62a9b

Command for setting location using underscore instead of hyphen

Hey, I just started trying out this stuff, and got an error when setting the location. It's trying to use the command set_location, but I think idb is expecting set-location.

(I had a quick look at the other commands, and the same may be true for clear-keychain)

Here's the log from my run:

[HTTP]
[HTTP] --> POST /wd/hub/session/91236dbb-b00c-45ba-adf6-3c8f7f7cde66/location
[HTTP] {"location":{"altitude":0,"latitude":53.551086,"class":"org.openqa.selenium.html5.Location","longitude":9.993682}}
[debug] [W3C (91236dbb)] Calling AppiumDriver.setGeoLocation() with args: [{"altitude":0,"latitude":53.551086,"class":"org.openqa.selenium.html5.Location","longitude":9.993682},"91236dbb-b00c-45ba-adf6-3c8f7f7cde66"]
[debug] [XCUITest] Executing command 'setGeoLocation'
[debug] [IDB] Setting location (53.551086, 9.993682) on the device '8ACBF6E8-2D38-486B-A3BB-69880954A8F8'
[debug] [IDB] Running '/usr/local/bin/idb set_location 53.551086 9.993682 --udid 8ACBF6E8-2D38-486B-A3BB-69880954A8F8'
[debug] [W3C (91236dbb)] Encountered internal error running command: Error executing idb. Original error: 'Command '/usr/local/bin/idb set_location 53.551086 9.993682 --udid 8ACBF6E8-2D38-486B-A3BB-69880954A8F8' exited with code 2'; Stdout: ''; Stderr: 'usage: idb [-h]
[debug] [W3C (91236dbb)]            {add-media,approve,boot,clear-keychain,connect,contacts,crash,daemon,debugserver,describe,disconnect,dsym,dylib,file,focus,framework,install,instruments,kill,launch,list-apps,list-targets,log,open,pull,push,record,screenshot,set-location,terminate,ui,uninstall,video,record-video,xctest}
[debug] [W3C (91236dbb)]            ...
[debug] [W3C (91236dbb)] idb: error: argument root_command: invalid choice: 'set_location' (choose from 'add-media', 'approve', 'boot', 'clear-keychain', 'connect', 'contacts', 'crash', 'daemon', 'debugserver', 'describe', 'disconnect', 'dsym', 'dylib', 'file', 'focus', 'framework', 'install', 'instruments', 'kill', 'launch', 'list-apps', 'list-targets', 'log', 'open', 'pull', 'push', 'record', 'screenshot', 'set-location', 'terminate', 'ui', 'uninstall', 'video', 'record-video', 'xctest')'; Code: '2'
[debug] [W3C (91236dbb)] Error: Command '/usr/local/bin/idb set_location 53.551086 9.993682 --udid 8ACBF6E8-2D38-486B-A3BB-69880954A8F8' exited with code 2
[debug] [W3C (91236dbb)]     at ChildProcess.proc.on.code (/usr/local/lib/node_modules/appium/node_modules/teen_process/lib/exec.js:94:19)
[debug] [W3C (91236dbb)]     at ChildProcess.emit (events.js:188:13)
[debug] [W3C (91236dbb)]     at maybeClose (internal/child_process.js:978:16)
[debug] [W3C (91236dbb)]     at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)
[HTTP] <-- POST /wd/hub/session/91236dbb-b00c-45ba-adf6-3c8f7f7cde66/location 500 463 ms - 2495
[HTTP]

[question] Is appium-idb used by default in appium?

I've searched the internet for a clear answer to no avail.

Is appium-idb an alternative to appium-ios-device or libimobiledevice, or are they complementary? I'm using appium version 1.17.0. Is appium-idb used by default in it to communicate with iOS devices and simulator, or you have to set a flag somewhere for it to be used?

Any insight on these aspects would be helpful, as I seem to lack some understanding of the inner workings of Appium, and all its submodules related to iOS.

Installation of Idb-Companion failed

==> ./idb_build.sh idb_companion build /usr/local/Cellar/idb-companion/1.0.14
Last 15 lines from /Users/liuwz/Library/Logs/Homebrew/idb-companion/01.idb_build.sh:
  "_ares_strerror", referenced from:
      grpc_dns_lookup_ares_continue_after_check_localhost_and_ip_literals_locked(grpc_ares_request*, char const*, char const*, char const*, grpc_pollset_set*, bool, int, grpc_combiner*) in libgrpc.a(grpc_ares_wrapper.o)
      l003 in libgrpc.a(grpc_ares_wrapper.o)
      l004 in libgrpc.a(grpc_ares_wrapper.o)
      l005 in libgrpc.a(grpc_ares_wrapper.o)
      grpc_ares_ev_driver_create_locked(grpc_ares_ev_driver**, grpc_pollset_set*, int, grpc_combiner*, grpc_ares_request*) in libgrpc.a(grpc_ares_ev_driver.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

** BUILD FAILED **


The following build commands failed:
	Ld /tmp/idb-companion-20201030-81041-2knzbq/idb-1.0.14/build/Build/Products/Debug/idb_companion normal x86_64
(1 failure)

I failed when I tried brew Install idb-companion

XCTAutomationSupport.framework doesn't supported from XCode 14 onwards

Somehow my Mac got updated to Mac OS 13 :( and now I have to forcefully use XCode 14 and above to build and test the XCode for iPhones used in Automation.

While building XCode for test iPhone, I was getting the following error while building and build gets Failed:
ld: cannot link directly with dylib/framework, your binary is not an allowed client of /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/PrivateFrameworks/XCTAutomationSupport.framework/XCTAutomationSupport for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

None of solutions works for me, as it is very complex to do workarounds in the full-fledged Automation system.

XCode team should provide the support of XCTAutomationSupport.framework as it was running fine till latest XCode 13 OR If you want to remove this then please provide proper guidance to use alternative which should work flawlessly !!!

XCode team I am in dead-lock condition right now. Please find solution for this problem and provide a release asap.

Thanks in advance !

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.