i am new in appium
i configure my environment to work with android in .net window and when i run test
and try to click on login button i got error
info: [debug] Responding to client with error: {“status”:13,“value”:{“message”:“An unknown server-side error occurred while processing the command.”,“origValue”:“unknown error: Failed to read the ‘singleNodeValue’ property from ‘XPathResult’: The result type is not a single node.\n (Session info: chrome=33.0.0.0)\n (Driver info: chromedriver=2.10.289383,platform=Windows NT 6.1 SP1 x86_64)”},“sessionId”:“db887fcf-bd07-49b7-b2d5-b893cdf21edc”}
info: [37m<-- POST /wd/hub/session/db887fcf-bd07-49b7-b2d5-b893cdf21edc/element/0.47826279420405626-4/click [39m[31m500[39m[90m 293.799 ms - 400[39m [90m[39m
this is c# not java
all other element i can find
this button i can recognize and get his property (class etc…)
only when try to click on him i got this error
also i add some wait time before click on him
What appium version do you use?
I got the same error when element couldn’t be located.
It may be if you have several elements with same element Id “submitBtn”.
Try next :
First of all set default timeout like this
appiumDriver.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(2));
Then do next
var elements = appiumDriver.FindElements(By.Id(“submitBtn”)); and check count of elements in list.
If count is “0” - wrong element id
If count is “1” - then you are clicking too fast on this element
If count is >1 - then you have several elements with this id and should use another search criteria.
P.S: the method name with “s” at the end - FindElements.
i did as you say and got 1 element only, means this is right element ,but when i do this :
elements[0].click; again i got same error and all this check i make in debug mode so i cant understand what does it mean “clicking too fast on this element”
thanks
Once I had a situation when element was present already but OnClick event was not initialized yet, not ready to execute so it does nothing.
Try to set very long time out to be sure all background requests are finished.
For example Thread.Sleep(15000). Of course this is only for debugging need - later you should find the case of this problem and remove this line.
And if this will not help - than looks like some specific of implementation in your application so might be good idea to ask developers and fix this button. Especially if you have another the same buttons and they work - then it may be problem exactly with with button.
thanks lot
the sleep time doesn’t work so i will ask the developer
but small q :do you think that this button with the property: onclick=“submitForm();return false;”
might cause the problem?