dotnet-client icon indicating copy to clipboard operation
dotnet-client copied to clipboard

AppiumWebElement.Selected throws exception for UIButton

Open h3dkandi opened this issue 8 years ago • 1 comments

Description

I tried to get a UIButton selected state but it trows an exception

Environment

  • .NET client build version or git revision if you use some shapshot: 3.0.0.2
  • Appium server version or git revision if you use some shapshot: v1.6.5-beta (REV a84efcfcbb64f11710058700dc80779b88d84657)
  • Desktop OS/version used to run Appium if necessary: macOS 10.12.5 (16F73)
  • Node.js version (unless using Appium.app|exe) or Appium CLI or Appium.app|exe: 7.4.0
  • Mobile platform/version under test: iOS 10.3.1
  • Real device or emulator/simulator: real iPhone 6+

Details

Supposedly partial reproducing steps:

var syncButton = driver.FindElementByAccessibilityId("Sync");
var foo = syncButton.Selected;

Ecxeption stacktraces

OpenQA.Selenium.WebDriverException was unhandled by user code
  HResult=-2146233088
  Message=Unexpected error. Unhandled endpoint: /session/C7689F70-BB7E-4673-86F6-4D1B17410A70/element/F84E9574-76D5-472A-8EBD-A24EABCFC042/selected -- http://localhost:8100/ with parameters {
    wildcards =     (
        "session/C7689F70-BB7E-4673-86F6-4D1B17410A70/element/F84E9574-76D5-472A-8EBD-A24EABCFC042/selected"
    );
}
  Source=WebDriver
  StackTrace:
       at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse)
       at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
       at OpenQA.Selenium.Appium.AppiumDriver`1.Execute(String driverCommandToExecute, Dictionary`2 parameters)
       at OpenQA.Selenium.Remote.RemoteWebElement.get_Selected()
       <from here the stack continues to custom code>
  InnerException: 

Link to Appium logs

GET /wd/hub/session/f3a7ce90-fe7f-4fa0-b861-4534a696dd12/element/F84E9574-76D5-472A-8EBD-A24EABCFC042/selected {}
2017-07-07 12:21:42:302 - info: [MJSONWP] Driver proxy active, passing request on via HTTP proxy
2017-07-07 12:21:42:303 - info: [debug] [XCUITest] Executing command 'proxyReqRes'
2017-07-07 12:21:42:306 - info: [debug] [JSONWP Proxy] Proxying [GET /wd/hub/session/f3a7ce90-fe7f-4fa0-b861-4534a696dd12/element/F84E9574-76D5-472A-8EBD-A24EABCFC042/selected] to [GET http://localhost:8100/session/C7689F70-BB7E-4673-86F6-4D1B17410A70/element/F84E9574-76D5-472A-8EBD-A24EABCFC042/selected] with body: {}
2017-07-07 12:21:42:310 - info: [debug] [JSONWP Proxy] Got response with status 200: "{\n  \"value\" : \"Unhandled endpoint: \\/session\\/C7689F70-BB7E-4673-86F6-4D1B17410A70\\/element\\/F84E9574-76D5-472A-8EBD-A24EABCFC042\\/selected -- http:\\/\\/localhost:8100\\/ with parameters {\\n    wildcards =     (\\n        \\\"session\\/C7689F70-BB7E-4673-86F6-4D1B17410A70\\/element\\/F84E9574-76D5-472A-8EBD-A24EABCFC042\\/selected\\\"\\n    );\\n}\",\n  \"sessionId\" : \"C7689F70-BB7E-4673-86F6-4D1B17410A70\",\n  \"status\" : 1\n}"

h3dkandi avatar Jul 07 '17 13:07 h3dkandi

Did you resolve this issue?

dianhua1560 avatar Mar 22 '18 22:03 dianhua1560

@akinsolb can you have a look on this please? I see it's iOS

Dor-bl avatar Nov 05 '22 18:11 Dor-bl

@h3dkandi @dianhua1560 I know it's been more than a few years, but in case this issue is still relevant do you mind trying the above with the new Appium server 2.x and dotnet-client 5.x beta version? I don't have the option to run on iOS currently to test it myself.

Dor-bl avatar Apr 28 '23 12:04 Dor-bl

Closed as no response.

Dor-bl avatar Aug 12 '23 15:08 Dor-bl