WinAppDriver icon indicating copy to clipboard operation
WinAppDriver copied to clipboard

findelement fails when xpath or name contains French text

Open amitchouksey opened this issue 6 years ago • 2 comments

Hello, I have been working on automating an application which supports multiple UI language. Most of the time I search elements either by Name or xpath containing certain text and I get the text from resource files to build my xpath depending on the UI language set on the application. I have run tests with English, Spanish, Chinese, German and they all run without any issue. However whenever I run test on French it randomly fails saying that unable to find the element. Following are just 2 examples.

//Text[contains(@Name,"Résumé des 90 derniers jours")]
//Text[contains(@Name,"Pilotes et téléchargements :")]

These failures are also quite machine dependent. For example first xapth fails say in machine 'A' but passes in machine 'B' where as second passes in Machine 'A' but fails in 'B'. Initially i though the failures could be due to char 'é' but I have noticed that same char in other places works without any issue.

I am running tests on win10 and its an UWP app. I have written tests in C#

Could anyone help in this.

amitchouksey avatar Oct 19 '20 12:10 amitchouksey

Is the page source same in both the machines?

anunay1 avatar Nov 18 '20 12:11 anunay1

Hello @anunay1 Yes its same.

amitchouksey avatar Nov 25 '20 13:11 amitchouksey