openatx / facebook-wda

Facebook WebDriverAgent Python Client Library (not official)
MIT License
1.72k stars 266 forks source link

Sessions' find_element_ids() method prepends a ** to my value name, which causes an error #34

Closed aristeia closed 5 years ago

aristeia commented 7 years ago

This issue is specific to version 0.2.1, and doesnt appear in version 0.1.2

My code selects an element from the session, then uses one of the element methods on it:

wda.DEBUG=True
passwordField = self.session(className="SecureTextField")
passwordField.set_text(self.TEST_INPUT_DATA['PASSWORD'])

Yet, this element method throws an error because of a certain ** string that gets prepended to the value:

CHAIN: **/XCUIElementTypeSecureTextField
Shell: curl -X POST -d '{"using": "class chain", "value": "**/XCUIElementTypeSecureTextField"}' 'http://127.0.0.1:8100/session/0C84F47E-06E6-43BF-AFB9-E0C882FB5112/elements'
Return (58ms): {
    "status": 13, 
    "sessionId": "0C84F47E-06E6-43BF-AFB9-E0C882FB5112", 
    "value": "Cannot parse class chain query '**/XCUIElementTypeSecureTextField'. Unexpected character detected at position 2:\n**
codeskyblue commented 7 years ago

Try to update WebDriverAgentRunner to latest to see if this issue fixed?

codeskyblue commented 5 years ago

The issue is too old, reopen it, if it is still an issue.