Skip to main content
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
edited title
Link
IAmMilinPatel
  • 7.8k
  • 7
  • 43
  • 68

When I run my appiumAppium script I am getting error "TypeError [ERR_INVALID_ARG_TYPE]"which[ERR_INVALID_ARG_TYPE]" which I am not able to understand

Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user

when i When I run my appium script iI am getting error "TypeError [ERR_INVALID_ARG_TYPE]"which iI am not able to understand

I wrote a script to automate my app using appium with java-script(nodejs),but but when iI run it iI am getting error.

This is the code which iI have written.

var webdriverio = require('webdriverio'); 
var except = require('chai').expect; 
var config = require(
{
 port: 4723,
 desiredCapabilities: {
   platformName: "Android",
   platformVersion: "8.1.0",
   deviceName: "00b8afc289da4196",
   app: "/home/user/auto_test/xxx.apk",
   automationName: "UiAutomator2"
  }
}); 
const client = webdriverio.remote(config);

//addition testing 
describe("Simple cases", function () {
  before(function () { 
    this.timeout(50000);
    return client.init();
});
afterEach(function(){
    this.timeout(50000);
    return client.init();
});
describe("test-signup", function(){

    it("signup_click", function(){
    client
        .click('android=new UiSelector().resourceId("com.xxx.xxx:id/txt_log_in")')      
    });
});
after(function() {
return client.end(); 
  });
});
var webdriverio = require('webdriverio'); 
var except = require('chai').expect; 
var config = require(
{
 port: 4723,
 desiredCapabilities: {
   platformName: "Android",
   platformVersion: "8.1.0",
   deviceName: "00b8afc289da4196",
   app: "/home/user/auto_test/xxx.apk",
   automationName: "UiAutomator2"
  }
}); 
const client = webdriverio.remote(config);

//addition testing 
describe("Simple cases", function () {
  before(function () { 
    this.timeout(50000);
    return client.init();
});
afterEach(function(){
    this.timeout(50000);
    return client.init();
});
describe("test-signup", function(){

    it("signup_click", function(){
    client
        .click('android=new UiSelector().resourceId("com.xxx.xxx:id/txt_log_in")')      
    });
});
after(function() {
return client.end(); 
  });
});

And this is the error which iI am getting  .

when i run my appium script i am getting error "TypeError [ERR_INVALID_ARG_TYPE]"which i am not able to understand

I wrote a script to automate my app using appium with java-script(nodejs),but when i run it i am getting error.

This is the code which i have written.

var webdriverio = require('webdriverio'); 
var except = require('chai').expect; 
var config = require(
{
 port: 4723,
 desiredCapabilities: {
   platformName: "Android",
   platformVersion: "8.1.0",
   deviceName: "00b8afc289da4196",
   app: "/home/user/auto_test/xxx.apk",
   automationName: "UiAutomator2"
  }
}); 
const client = webdriverio.remote(config);

//addition testing 
describe("Simple cases", function () {
  before(function () { 
    this.timeout(50000);
    return client.init();
});
afterEach(function(){
    this.timeout(50000);
    return client.init();
});
describe("test-signup", function(){

    it("signup_click", function(){
    client
        .click('android=new UiSelector().resourceId("com.xxx.xxx:id/txt_log_in")')      
    });
});
after(function() {
return client.end(); 
  });
});

And this is the error which i am getting  .

When I run my appium script I am getting error "TypeError [ERR_INVALID_ARG_TYPE]"which I am not able to understand

I wrote a script to automate my app using appium with java-script(nodejs), but when I run it I am getting error.

This is the code which I have written.

var webdriverio = require('webdriverio'); 
var except = require('chai').expect; 
var config = require(
{
 port: 4723,
 desiredCapabilities: {
   platformName: "Android",
   platformVersion: "8.1.0",
   deviceName: "00b8afc289da4196",
   app: "/home/user/auto_test/xxx.apk",
   automationName: "UiAutomator2"
  }
}); 
const client = webdriverio.remote(config);

//addition testing 
describe("Simple cases", function () {
  before(function () { 
    this.timeout(50000);
    return client.init();
});
afterEach(function(){
    this.timeout(50000);
    return client.init();
});
describe("test-signup", function(){

    it("signup_click", function(){
    client
        .click('android=new UiSelector().resourceId("com.xxx.xxx:id/txt_log_in")')      
    });
});
after(function() {
return client.end(); 
  });
});

And this is the error which I am getting.

Source Link
manoj
  • 117
  • 6
  • 16

when i run my appium script i am getting error "TypeError [ERR_INVALID_ARG_TYPE]"which i am not able to understand

I wrote a script to automate my app using appium with java-script(nodejs),but when i run it i am getting error.

This is the code which i have written.

var webdriverio = require('webdriverio'); 
var except = require('chai').expect; 
var config = require(
{
 port: 4723,
 desiredCapabilities: {
   platformName: "Android",
   platformVersion: "8.1.0",
   deviceName: "00b8afc289da4196",
   app: "/home/user/auto_test/xxx.apk",
   automationName: "UiAutomator2"
  }
}); 
const client = webdriverio.remote(config);

//addition testing 
describe("Simple cases", function () {
  before(function () { 
    this.timeout(50000);
    return client.init();
});
afterEach(function(){
    this.timeout(50000);
    return client.init();
});
describe("test-signup", function(){

    it("signup_click", function(){
    client
        .click('android=new UiSelector().resourceId("com.xxx.xxx:id/txt_log_in")')      
    });
});
after(function() {
return client.end(); 
  });
});

And this is the error which i am getting .

2019-01-02T11:49:15.769Z DEBUG wdio-config: wdio-sync not found, running tests asynchronous
TypeError [ERR_INVALID_ARG_TYPE]: The "id" argument must be of type string. Received type object
at Module.require (internal/modules/cjs/loader.js:653:11)
at require (internal/modules/cjs/helpers.js:22:18)
at Object.<anonymous> (/home/user/automation/tile2.js:3:14)
at Module._compile (internal/modules/cjs/loader.js:723:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:734:10)
at Module.load (internal/modules/cjs/loader.js:620:32)
at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
at Function.Module._load (internal/modules/cjs/loader.js:552:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:776:12)
at executeUserCode (internal/bootstrap/node.js:342:17)