2

But this is giving me below error:

NoSuchElement: [POST http://localhost:4444/wd/hub/session/3a9b569788f086d4d68d52d99ab95d76/element/%5Bobject%20Object%5D/click] no such element: Element_id length is invalid

define(function (require) {
    var registerSuite = require('intern!object');
    var assert = require('intern/chai!assert');
    registerSuite({
        name: 'Google',
        'GoogleSearch': function () {
            return this.remote
                .get(require.toUrl('http://www.google.co.in'))
                .setFindTimeout(5000)                
                .findByName('q')
                .click()
                .type("test")               
                .end()
                .sleep(500)
                .findByName('btnK')
                .setFindTimeout(10000)        
                .submit()               
                .end()                          
        }
    });
});
Dulaj Kulathunga
  • 1,248
  • 2
  • 9
  • 19
  • (Session info: chrome=79.0.3945.130) For documentation on this error, please visit: https://www.seleniumhq.org/exceptions/no_such_element.html Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53' System info: host: 'SAL17WIN10PLP', ip: '10.85.14.142', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_191' Driver info: driver.version: unknown at runRequest at at new Promise – Shalini Agrawal Jan 30 '20 at 10:05
  • What versions of Intern and Node are you using? At least with Intern 4.8 on Node 10, the test code seems to work as expected. – jason0x43 Jan 30 '20 at 15:41
  • I am using below versions: leadfoot@1.6.12 intern@3.3.2 node-v12.14.1 – Shalini Agrawal Feb 03 '20 at 05:33
  • Those versions of leadfoot and Intern are quite old and have no support for modern webdriver semantics. The issue is likely that chromedriver is now returning element IDs in a format that that version of leadfoot can't parse. – jason0x43 Feb 04 '20 at 13:34
  • what version should i use for this to run correctly? – Shalini Agrawal Feb 06 '20 at 05:45
  • Intern 4.x (latest is 4.8). Note that while Intern 4 can still use AMD test suites, there will be some migration involved. – jason0x43 Feb 07 '20 at 04:39

0 Answers0