WinAppDriver icon indicating copy to clipboard operation
WinAppDriver copied to clipboard

Click() fails with {"status":13,"value":{"error":"unknown error","message":"An unknown error occurred in the remote end while processing the command."}}

Open iknair1 opened this issue 7 years ago • 5 comments

System Details: WinAppDriver v1.1.1 AppiumWebdriver - 3.0.0.2 and 4.0.0

I am currently writing tests against a UWP app and I am using WinAppDriver v 1.1.1 The test correctly locates the AutomationId but when trying to click the same element it throws 500 Internal Server Error. I have started WinAppDriver as an Admin. Here is the log from the terminal:

POST /session/86943257-456A-4AEC-85F6-881FDE6196B7/element HTTP/1.1 Accept: application/json, image/png Content-Length: 68 Content-Type: application/json;charset=utf-8 Host: 127.0.0.1:4723

{"using":"accessibility id","value":"OperatorUnlinkedMessageButton"} HTTP/1.1 200 OK Content-Length: 101 Content-Type: application/json

{"sessionId":"86943257-456A-4AEC-85F6-881FDE6196B7","status":0,"value":{"ELEMENT":"42.2429446.4.16"}}

========================================== POST /session/86943257-456A-4AEC-85F6-881FDE6196B7/element/42.2429446.4.16/click HTTP/1.1 Accept: application/json, image/png Content-Length: 2 Content-Type: application/json;charset=utf-8 Host: 127.0.0.1:4723

{} HTTP/1.1 500 Internal Error Content-Length: 133 Content-Type: application/json

{"status":13,"value":{"error":"unknown error","message":"An unknown error occurred in the remote end while processing the command."}}

Is there something I am missing? Has anyone got this working? Any help is deeply appreciated.

iknair1 avatar Sep 30 '19 14:09 iknair1

I have also downgraded to v1.1 and 0.9 and it still does not work for me. Can someone who has got it working kindly shed some light?

iknair1 avatar Sep 30 '19 14:09 iknair1

can you share the code

anunay1 avatar Oct 01 '19 05:10 anunay1

Driver SetUp: ` AppiumOptions opt = new AppiumOptions(); opt.AddAdditionalCapability("appiumVersion", "1.9.1"); opt.AddAdditionalCapability("WindowsDeviceName", "WindowsPC"); opt.AddAdditionalCapability("WindowsPlatformName", "Windows"); opt.AddAdditionalCapability("app", "31e6402e-0407-4419-a6c3-7c6d18576017_8sedpwrx9t26a!App");

driver = new WindowsDriver(new Uri("http://127.0.0.1:4723"), opt);`

FeatureFile: Given the manager login page is displayed When a single site manager authenticates with valid credentials Then the device is linked

Steps: [Given(@"the device linking page is displayed")] public void GivenTheDeviceLinkingPageIsDisplayed() { wait.Until(SeleniumExtras.WaitHelpers.ExpectedConditions.ElementToBeClickable(_linkDevicePage.LinkDeviceButton)); }

[Given(@"the manager login page is displayed")] public void GivenTheManagerLoginPageIsDisplayed() { _linkDevicePage.LinkDeviceButton.Click(); wait.Until(SeleniumExtras.WaitHelpers.ExpectedConditions.ElementToBeClickable(_managerLoginPage.AuthenticateButton)); }

It fails on _linkDevicePage.LinkDeviceButton.Click();

I have defined the locator like this: public AppiumWebElement LinkDeviceButton => Driver.FindElementByAccessibilityId("OperatorUnlinkedMessageButton");

iknair1 avatar Oct 01 '19 07:10 iknair1

I have faced same issue. As in my application, each control list under 'Custom' with its child as 'WPF Control' having same automationid. So check how your controls are listing using Inspect.exe, and you may try by identifying control with multiple search properties as shown below Driver.FindElementByAccessibilityId("OperatorUnlinkedMessageButton").FindElementByClassName("ClassName") as WindowsElement;

VijayHugar avatar Oct 01 '19 13:10 VijayHugar

This issue is now resolved for me. The problem was with the SyncFusionButtons not supporting automationId's. Once the problem was fixed from their side, the same test worked fine.

iknair1 avatar Nov 18 '19 08:11 iknair1