Closed ShaliniAgrawal20 closed 4 years ago
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()
.getPageTitle()
.then(function(text)
{
// THIS CODE NEVER GETS EXECUTED
console.log("something should be here: ");
console.log("text value: ", text);
// make assertions here to verify all is well.
})
.end()
}
});
});
The below are the error logs:
E:\Automation Sessions\intern-3dd\InternBasic>node --inspect node_modules\intern\runner.js config=intern
Debugger listening on ws://127.0.0.1:9229/f747a215-14e4-4224-b769-57d15dd4d038
For help, see: https://nodejs.org/en/docs/inspector
Debugger attached.
Google
FAIL: GoogleSearch (0ms)
TypeError: this.remote.get(...).setFindTimeout(...).findbyName is not a function
at Test.GoogleSearch [as test]
Have you tried the correct case sensitivity of findByName rather than findbyName?
yes, i have tried with findByName also. But it is not able to locate the element.
Below error:
FAIL: GoogleSearch (19999ms)
NoSuchElement: [POST http://localhost:4444/wd/hub/session/58acaa9c6a820038754a4a9e664dd524/element/%5Bobject%20Object%5D/click] no such element: Element_id length is invalid
(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 <node_modules\leadfoot\Session.js:88:40>
at <node_modules\leadfoot\Session.js:109:39>
at new Promise <node_modules\dojo\Promise.ts:411:3>
at ProxiedSession._post <node_modules\leadfoot\Session.js:63:10>
at Element._post <node_modules\leadfoot\Element.js:23:31>
at Element.click <node_modules\leadfoot\Element.js:163:15>
at Command.
Since this is a usage question rather than a bug report, Stack Overflow is the best place to ask about it. I see that a question has been opened, so I'm closing this in favor of that.