openatx / facebook-wda

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

WDAError : class chain did not add escape character for ' or " #33

Closed lukzeg closed 7 years ago

lukzeg commented 7 years ago

If we will will want to get objects with ' or " character we observe WDAError(status 13): session(text="don't")

I think in line 600: https://github.com/openatx/facebook-wda/blob/master/wda/__init__.py

It should be added some method which will add "\" before ' or " to avoid of having issue with parsing when chain is created(line:672), as we might to catch situation: "name == 'I don't want'" which is causing mentioned by me error. Tested on WebDriverAgent - a10768631110f4b7c2d7ca328a9f11186464ae35

codeskyblue commented 7 years ago

Maybe need string escape

lukzeg commented 7 years ago

I created pull request with fix for this issue. https://github.com/openatx/facebook-wda/pull/36

codeskyblue commented 7 years ago

merged