I am attempting to get around in issue I had with Selendroid server but I cannot get any tests to run.
I get the following error:
C:\Automation\UI-Automation\ui-automation\node_modules\selenium-webdriver\lib\go
og\async\nexttick.js:39
goog.global.setTimeout(function() { throw exception; }, 0);
^
UnknownCommandError: That URL did not map to a valid JSONWP resource
at new bot.Error (C:\Automation\UI-Automation\ui-automation\node_modules\sel
enium-webdriver\lib\atoms\error.js:108:18)
at Object.bot.response.checkResponse (C:\Automation\UI-Automation\ui-automat
ion\node_modules\selenium-webdriver\lib\atoms\response.js:106:11)
at C:\Automation\UI-Automation\ui-automation\node_modules\selenium-webdriver
\lib\webdriver\webdriver.js:160:24
at promise.ControlFlow.runInFrame_ (C:/Automation/UI-Automation/ui-automatio
n/node_modules/selenium-webdriver/lib/goog/…/webdriver/promise.js:1857:20)
at goog.defineClass.notify (C:/Automation/UI-Automation/ui-automation/node_m
odules/selenium-webdriver/lib/goog/…/webdriver/promise.js:2448:25)
at promise.Promise.notify_ (C:/Automation/UI-Automation/ui-automation/node_m
odules/selenium-webdriver/lib/goog/…/webdriver/promise.js:564:12)
at Array.forEach (native)
at promise.Promise.notifyAll_ (C:/Automation/UI-Automation/ui-automation/nod
e_modules/selenium-webdriver/lib/goog/…/webdriver/promise.js:553:15)
at goog.async.run.processWorkQueue (C:\Automation\UI-Automation\ui-automatio
n\node_modules\selenium-webdriver\lib\goog\async\run.js:125:21)
at runMicrotasksCallback (node.js:337:7)
From: Task: WebDriver.createSession()
at Function.webdriver.WebDriver.acquireSession_ (C:\Automation\UI-Automation
\ui-automation\node_modules\selenium-webdriver\lib\webdriver\webdriver.js:157:22
)
at Function.webdriver.WebDriver.createSession (C:\Automation\UI-Automation\u
i-automation\node_modules\selenium-webdriver\lib\webdriver\webdriver.js:131:30)
at Builder.build (C:\Automation\UI-Automation\ui-automation\node_modules\sel
enium-webdriver\builder.js:445:22)
at getBrowser (C:\Automation\UI-Automation\ui-automation\helpers\testrunner.
js:128:7)
at executeTestcase (C:\Automation\UI-Automation\ui-automation\helpers\testru
nner.js:140:17)
at Object.module.exports.run (C:\Automation\UI-Automation\ui-automation\help
ers\testrunner.js:328:22)
at Object. (C:\Automation\UI-Automation\ui-automation\start.js:14
2:14)
at Module._compile (module.js:460:26)
at Object.Module._extensions…js (module.js:478:10)
at Module.load (module.js:355:32)
From: Task: WebDriver.navigate().to(http://snap3.intouchfollowup.com/seymour/)
at webdriver.WebDriver.schedule (C:\Automation\UI-Automation\ui-automation\n
The js code:
getBrowser = function() {
if (common.isNullOrEmpty(cmdargs.remoteServerIP)) {
return new webDriver.Builder()
.forBrowser(configuration.browser.toLowerCase())
.build();
}
else {
var serverUrl=“http://” + cmdargs.remoteServerIP + “:4723/wd/hub”;
return new webDriver.Builder()
.withCapabilities({
browserName: configuration.browser.toLowerCase(),
version:configuration.browserVersion.toLowerCase()
})
.usingServer(serverUrl)
.build();
}
};
Android server console:
info: → POST /:4723/wd/hub/session {“desiredCapabilities”:{“browserName”:“android”,“version”:“”}}
info: [debug] Responding to client that we did not find a valid resource
info: ← POST /:4723/wd/hub/session 404 1.839 ms - 47
I have manually adding more capabilities like deviceName to the code but still no joy. So is this a matter of the Appium server not sending the JSON in the correct format that my selenium webdriver doesn’t like.
Any ideas of what else to look at? Is getting fiddler a good idea to see what is being sent back and forth?
Any help appreciated.