I’m having an encoding issue using appium 1.5 and nodejs webdriver on iOS (simulator, ios 8).
The app contains following french text “News Cinéma”, and I’m using an xpath expression to find this element: (//*[@name="News Cinéma"])[1]
Appium tells me that there is no such element.
Then, when looking at the source XML I can indeed find the element, but the accentuated character “é” has a different UTF-8 code than the one my keyboard produces.
Keyboard: é -> C3 A9
Appium: é -> 65 CC 81
Visually that’s the same character, but behind the scenes, it’s a totally different utf8 code, hence the issue.
Did anyone ever encounter such issue, or knows how I can get around it ?
ps: I don’t have this problem on Android. I recently upgraded to appium 1.5 but I’m not sure wether this issue is new to this version of appium or not
Thanks Wreed,
I could try to dig into the webdriver to see if this can be fixed there, but I’m not that experienced as a developpe., So I’ll wait a bit more and hope for more answers
I’m not sure how you are using your function. From where I stand, what happens is that I ask appium to find an element using an xpath expression. Unfortunately it cannot find it because there is an encoding issue either on appium side or directly in the app.
Here is the flow
Webdriver (node js) call to appium -> do you have following element “xpath expression” ?
Appium does its checks and cannot find a match
Appium replies to webdriver -> “no element found”
So I never get to a point where I can hold both “expected” and “actual” values in my code. It all happens within appium.
I tried to normalize my string (webdriver side) using unorm but it doesn’t help because that string is already correct, it’s the other string that should be normalized, the one held by appium.
Yeah, I tried that already, unfortunately it didn’t help as this is the string in the app / appium side causing the trouble, not the one on webdriver side.