Error encountered when WebDriverIO attempted to connect to Appium due to a lack of compatible capabilities

I'm currently facing an issue while attempting to link my virtual Android Device through Appium with my Webdriverio script for the purpose of automating some testing tasks.

Here are the capabilities that I have set:

capabilities: [{

        // Necessary default configurations in your script
        platformName: 'Android',
        browserName: 'chrome',
        maxInstances: 1,
        // For W3C compliance, all appium capabilities should include an extension prefix
        // Details can be found here: http://appium.io/docs/en/writing-running-appium/caps/
        'appium:automationName': 'uiautomator2',
        'appium:platformVersion': '12.0',
        'appium:deviceName': 'emulator-5554',
        'appium:noReset': 'true'
    }],
    

Furthermore, both chromedriver and Appium services are up and running:

services: ['appium', 'chromedriver']
    

However, I consistently encounter this error whenever I attempt to execute my script:

ERROR webdriver: Request failed with status 500 due to session not created: session not created: No matching capabilities found
    

I've made attempts to adjust the capabilities by trying different device names and even removing the appium prefix from the capability names, yet these adjustments only result in additional errors.

Any assistance on this matter would be highly appreciated.

Answer №1

Hey there, it looks like you might be overlooking a key capability. In my experience, using the 'chromedriverExecutableDir' capability in Appium Desktop has proven to be effective. This capability requires the absolute path to the folder containing the Chrome driver executable. Don't forget to verify the Chrome version on your simulator and adjust accordingly.

 "platformName": "Android",
  "platformVersion": "11",
  "automationName": "UiAutomator2",
  "deviceName": "Pixel5",
  "browserName": "chrome",
  "chromedriverExecutableDir": "C:\\absolute\\path\\to\\chromedriver"

You can find more information in the Appium documentation: Also, here's how you can check the Chrome Driver version in your simulator: https://i.sstatic.net/jbHif.png

If you need help testing your capabilities in Appium Desktop, refer to this screenshot: https://i.sstatic.net/TwbCQ.png

Feel free to reach out if you have any further questions. https://i.sstatic.net/RT6Vu.png

Answer №2

When conducting testing on a mobile device using an installed app, it is recommended to incorporate the appium:appPackage and appium:appActivity properties. Here's an example of how to open the wdio.demo app:

   capabilities: [{
        "platformName": "Android",
        "appium:udid": "emulator-5554",
        "appium:automationName": "UiAutomator2",
        "appium:appPackage": "io.appium.android.apis",
        "appium:appActivity": ".ApiDemos",
        "appium:platformVersion": "11"
      }]

Additionally, it's important to include the following details in the wdio.conf.js file:

services: [
    ['appium', {
        args: {
            address: 'localhost',
            port: 4723
        },
        logPath:'./',
    }]
],

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Display a remote page on hover using Javascript, CSS, and HTML without providing any clickable link

How can I display a preview of another page within a div container without actually making the text clickable? I want the preview to show when the mouse hovers over specific text, but I need the original text to stay on the main page. I've experiment ...

Issue: The function (0, react__WEBPACK_IMPORTED_MODULE_1__.useActionState) is not recognized as a valid function or its output is not iterable

I found a great example of using useActionState at this source. Currently, I am implementing it in my project with Next.js and TypeScript. app/page.tsx: "use client"; import { useActionState } from "react"; import { createUser } from ...

Navigating a JSON message received from a websocket: Best practices

How can I cycle through various types of JSON messages received from WebSocket and trigger a function based on the type to modify observables in MobX? Can anyone assist with this? For instance, one of the simple messages looks like this: { name: "as ...

The final version of the React App is devoid of any content, displaying only a blank page

As a beginner in learning React, I must apologize for any basic issues I may encounter. I recently created a shoe store App (following this helpful tutorial on React Router v6) Everything seems to be working perfectly in the development build of my app. ...

What sets apart 'hasClass' from 'is'? Additionally, is there a substitute to retrieve a Jquery element instead?

Similar Question: jQuery .hasClass() vs .is() Sample HTML code: <div class="results"> <div class="table"> <form class="tr" action="#" method="post"> <div class="td"> <input class="dat ...

How can we display or conceal text indicating the age of a patient based on the value returned from selectedPatient.age in a React application?

Hello, I am looking to dynamically display the age in years on the screen based on the value retrieved from selectedPatient.age, toggling between visible and hidden states. import React, { useContext } from 'react'; import { useHistory } from &ap ...

Choosing elements in jQuery

Having some trouble with the subnav on my current website project. I think the issue lies in how I am selecting items in my jquery code. It seems like a small fix that needs to be made, but I'm unsure of the correct approach. http://jsfiddle.net/ZDEr ...

Effortlessly initiate the consecutive playback on SoundCloud

I'm currently working on my music blog and I'm looking for some guidance in implementing a feature where the widgets start playing one after the other. Specifically, I have both SoundCloud and YouTube widgets, but I would like to focus on achievi ...

JQuery Templates - when recursion becomes overwhelming

Utilizing jquery templates to create a tree structure for showcasing sections and items in a treeview format. The data layout is structured as follows, with each section containing items and subsections, while each item can potentially have additional sub ...

What is the best way to incorporate my Switch component into my Table component as a distinct column, while also maintaining separate states for each component?

My journey into learning React.js has been exciting so far. However, I am facing some confusion when it comes to stateful components. Currently, I am utilizing Bootstrap tables for creating a table and successfully fetching data using GET requests. Additio ...

I am looking to retrieve a particular entry from a JSON data array and make some modifications to it

Initially, I fetched JSON data from the web server using the following code: $.getJSON(url,function(){ //my callback function; }); Now, I have received the data in the format shown below: {entries:[{title:'foo',id:'UUID',finished:nul ...

Tips for including the % symbol in the Y-axis labels on a HighChart graph

https://i.sstatic.net/Ym7Uz.png I am attempting to incorporate the % symbol after the value of 100 or -100 on the yAxis in the chart shown above. I made an attempt to add the % symbols as follows: quotes.data.frequency_counts[i].negative = Math.round(ne ...

What is the best way to update image CSS following a rotation using JavaScript?

Discover a neat CSS trick for always centering an image in a div, regardless of its size or aspect ratio. <style> .img_wrap { padding-bottom: 56.25%; width: 100%; position: relative; overflow: hidden; } #imgpreview { display: bl ...

Exploring the creation of a dynamic graph with d3.js

I'm new to d3 and attempting to create a graph layout. var w = 1000; var h = 500; var dataset = { nodes: [{ name: 'Alice' }, { name: 'David' ...

Navigation guard error: Caught in an infinite redirect loop

I have set up a new vue3 router and configured different routes: const routes = [ { path: "/", name: "home", component: HomeView, }, { path: "/about", name: "about", component: () => ...

Connect your Nuxt.js application with Mailchimp for seamless integration

I've tried the solution recommended in this thread, but unfortunately, it's not working for me. Every time I run npm run dev, I encounter an error message: ERROR - Compilation failed with 1 error at 11:21:24 The following dependency was not fo ...

After the request.send() function is called, the request is not properly submitted and the page automatically redirects

I'm currently working on a basic ajax comment form that includes a textarea and a yes/no radio button. If the user selects 'yes', their comments are posted and then they are redirected to a new page. If the user selects 'no', th ...

Integration of a QR code scanner on a WordPress website page

I'm in the process of setting up a QR code scanner on my Wordpress site or within a popup. The goal is for users to be able to scan a QR code when they visit the page/popup link. Specifically, the QR code will represent a WooCommerce product URL, and ...

Steps to troubleshoot the TypeError: cv.Mat is not a constructor in opencv.js issue

Encountering a problem while trying to use opencv.js for detecting aruco markers from my camera. Each time I attempt to utilize the method let image = new cv.imread('img'); An error keeps popping up: TypeError: cv.Mat is not a constructor ...

Example of Node-gallery used in isolation, displaying an error event with the message "ENOENT"

I am currently experiencing an issue with the node-gallery npm module. After installing dependencies inside the /example directory, I attempted to run the app. The result was a localhost:3000/gallery page, but upon the page fully loading, I encountered the ...